-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glob reading with the file:
schema fails on some paths
#582
Comments
The underlying issue here is that Right now, When globbing using a file scheme, the path part must be a hierarchical path. For example, |
In that situation, how are we meant to use Also these nuances aren't described in the docs. The docs mention the Also for the |
I don't see a strong need for relative paths with
I think this is a tangential but definitely a problem. Ideally, you should be able to use relative file imports from within the REPL. |
That sounds reasonable. I guess then my issue is that docs aren't very clear. It's not obvious that using |
Agree that we should improve our docs here. We have a section on relative paths, but it's easily missed and a common source of confusion. |
The handling of files reads using
read*
is a bit broken at the moment. Behaviour changes depending on whether or not thefile:
schema is used, and behaviour in apkl
vs the REPL doesn't always seem consistent. Additionally there are a number of simple glob patterns that causeNullPointerExceptions
s or similar incorrect behaviour.Pkl REPL:
This error is is caused by the unsafe assumption that
.getPath
always returns a value. We should probably be using. getSchemeSpecificPart
instead.Evaling the following will work
but not (addition of the
file:
schema)and running
read*("**/*.txt")
in the REPL results inThe text was updated successfully, but these errors were encountered: