-
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
PklBugException when given a file:
URI with a host
#616
Labels
bug
Something isn't working
Comments
@bioball Hi, may I try to fix the bug? I will change the code to like below public static URL toUrl(URI uri) throws IOException {
try {
if ("file".equalsIgnoreCase(uri.getScheme()) && uri.getHost() != null) {
throw new UnsupportedOperationException("Remote file URIs are not supported: " + uri);
}
return uri.toURL();
} catch (Error e) {
// best we can do for now
// rely on caller to provide context, e.g., the requested module URI
if (e.getClass().getName().equals("com.oracle.svm.core.jdk.UnsupportedFeatureError")) {
throw new IOException("Unsupported protocol: " + uri.getScheme());
}
throw e;
}
} If assign the bug to me, I will try my best to support remote files by download the file or other ways. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pkl currently hard-fails if given a
file:
URI with a host set.For example:
Produces:
We should either support remote files, or throw a meaningful error here.
The text was updated successfully, but these errors were encountered: