-
Notifications
You must be signed in to change notification settings - Fork 19
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 Projects loaded from arbitrary URIs #21
Conversation
* In `EvaluatorOptions`, replace `ProjectDir` with `ProjectBaseURI` (API breaking) * `WithResourceReader` and `WithModuleReader` now append `:` to the scheme when appending to the allow-lists * Correct typo in `DeclaredProjectDepenedencies` (API breaking) * Add DEVELOPMENT.adoc with instructions on how to debug the `pkl server` subprocess * Miscellaneous doc comment clarifications
|
||
= Pkl Go Development Guide | ||
|
||
== Debugging the Pkl Server |
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.
@HT154 Does this work generally for debugging Pkl? I was just finding myself yesterday a bit annoyed at not being able to put breakpoints in Pkl sources.
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.
For debugging "regular" pkl eval
invocations, you don't need to fuss with this, you can do it straight from intellij by finding the entrypoint (pkl-cli/src/main/kotlin/org/pkl/cli/Main.kt
) and starting to run/debug from the main
function. You can also modify the run configuration in that menu to pass CLI args, env vars, etc. as needed.
The approach documented here does work for general debugging as well, but it's required for debugging pkl server
because the host process (eg. via pkl-go) currently must spawn the pkl
process.
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.
That's very cool, thanks Josh!
@bioball Is this good to merge now that apple/pkl#486 has merged? |
@HT154 yup--we're going to do a release soon so I'll get this in. |
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.
LGTM, thanks!
Builds on apple/pkl#255 to allow fully in-memory evaluation of Pkl codebases using projects.
EvaluatorOptions
, replaceProjectDir
withProjectBaseURI
(API breaking)WithResourceReader
andWithModuleReader
now append:
to the scheme when appending to the allow-listsDeclaredProjectDepenedencies
(API breaking)pkl server
subprocess