-
Notifications
You must be signed in to change notification settings - Fork 280
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
Implement SPICE-0009 External Readers #660
Conversation
337ab5a
to
9d8a587
Compare
f6d8810
to
19bc962
Compare
a935e9d
to
9251522
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.
Did a first pass.
This is looking pretty good! Looks pretty polished, with just a couple of issues.
Design question: what do we want to do about env vars or CWD of the process?
What should users expect if thay do:
pkl --env-var foo=bar --external-module-reader ldap=my-ldap-reader
Should my-ldap-reader
receive foo=bar
as an env var? Or should there be some way to configure the env vars that get passed to this reader?
Same question applies for --working-dir
.
Thoughts: probably not appropriate to pass these values into the process, but it should be clearly documented. But, we should probably have some way to configure env var, as well as CWD for these processes.
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/commands/BaseOptions.kt
Show resolved
Hide resolved
pkl-core/src/main/java/org/pkl/core/externalProcess/ExternalProcessImpl.java
Outdated
Show resolved
Hide resolved
4fc48da
to
98ec98f
Compare
9323690
to
e561cc3
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.
One more pass. Getting close!
pkl-core/src/main/java/org/pkl/core/module/ModuleKeyFactories.java
Outdated
Show resolved
Hide resolved
pkl-config-java/src/main/java/org/pkl/config/java/ExternalReaderRuntime.java
Outdated
Show resolved
Hide resolved
pkl-core/src/main/java/org/pkl/core/externalReader/package-info.java
Outdated
Show resolved
Hide resolved
pkl-core/src/main/java/org/pkl/core/resource/ResourceReaders.java
Outdated
Show resolved
Hide resolved
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.
Overall LGTM! Great work!
This also needs eyes from @holzensp @stackoverflow because it touches the core language.
f5ba7c7
to
5d3aa97
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. Some small things.
pkl-core/src/main/java/org/pkl/core/messaging/AbstractMessagePackEncoder.java
Show resolved
Hide resolved
e5e2c3e
to
8b3ecdd
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.
I had some minor nits remaining, but they all got addressed ;) LGTM.
36f535f
to
9972d3d
Compare
This is preparatory work for [SPICE-0009](apple/pkl-evolution#10). It is being contributed in a separate pull request to ease review. The Message, Message(En|De)coder, and MessageTransport types have been ported to Java and moved to a new `org.pkl.core.messaging` package.
[SPICE-0009](apple/pkl-evolution#10) New close flow
Box Bytes, fix error CLI handling during project load Bytes equals compare
Co-authored-by: Daniel Chao <[email protected]> Apply suggestions from code review Co-authored-by: Daniel Chao <[email protected]> Rename --external-* CLI flags to --external-*-reader Rename ExternalProcess -> ExternalReaderProcess Add org.pkl.core.util.Readers.closeQuietly and deprecate ModuleReaders.closeQuietly Clean up doc comments Refactor ExternalReaderRuntime into pkl-config-java Refactor out External*Resolver classes, rename ResourceReaders.ExternalDelegate and ModuleKeys.External to MessageTransport
…al resolvers into module/resource packages
Co-authored-by: Islon Scherer <[email protected]>
280ef78
to
06708b6
Compare
Work around weird kt interop issue
06708b6
to
e3f777a
Compare
SPICE-0009
Includes the changes from #640
Adoption of this feature in language binding libraries: