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
Support scheme-agnostic projects #486
base: main
Are you sure you want to change the base?
Conversation
270c9b7
to
c0bbe50
Compare
this.package != null | ||
) | ||
const local function isUriLocal(uri1: String, uri2: String): Boolean = | ||
uri1.substring(0, uri1.indexOf(":")) == uri2.substring(0, uri2.indexOf(":")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the perfect check. This should also check that the URIs have the same authority. This is hard to implement without a URI API within the stdlib though.
I think we can improve this if/when we move pkl.experimental.uri to the standard library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave this comment in the code so we don't forget it.
c0bbe50
to
30b3a03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'd add some note to our language reference explaining that projects can be loaded from different module keys, not only files. Probably in the Resolving Dependencies
or Local Dependencies
section.
@@ -34,4 +34,9 @@ examples { | |||
["glob-read absolute package uri"] { | |||
read*("package://localhost:0/birds@0.5.0#/catalog/*.pkl") | |||
} | |||
|
|||
// https://github.com/apple/pkl/issues/166 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// https://github.com/apple/pkl/issues/166 | |
// https://github.com/apple/pkl/issues/166 |
this.package != null | ||
) | ||
const local function isUriLocal(uri1: String, uri2: String): Boolean = | ||
uri1.substring(0, uri1.indexOf(":")) == uri2.substring(0, uri2.indexOf(":")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave this comment in the code so we don't forget it.
Thanks for picking this up! I've looked through the changes made for SPICE-0005 conformance and everything makes sense to me. This also closes #166, which I'm delighted to see! |
Supercedes and closes #255