- 
                Notifications
    
You must be signed in to change notification settings  - Fork 338
 
Open
Description
with 0.29, opaque uris are invalid: https://pkl-lang.org/main/current/release-notes/0.29.html#opaque-file-uris-are-invalid
the error message says:
–– Pkl Error ––
Resource URI `file:../path/.manifest.yml` has invalid syntax.
30 | const manifest = yamlParser.parse(read("file:../\(manifestPath)"))
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at Common#manifest (file:///pkl/Common.pkl, line 30)
File URIs must have a path that starts with `/` (e.g. file:/path/to/my_module.pkl).
To resolve relative paths, remove the scheme prefix (remove "file:").
However, read requires a Resource which mandates the file: prefix.
It is a bit awkward to do
const workingDirectory = read("env:PWD")
const manifest = yamlParser.parse(read("file:\(workingDirectory)/../\(manifestPath)"))
Are there any alternatives?
Metadata
Metadata
Assignees
Labels
No labels