Skip to content
Discussion options

You must be logged in to vote

Hi there!

The closest you get to mvn install with Pkl is writing the built package zip directly to Pkl's package cache (currently ~/.pkl/cache by default). You can customize the path to this cache in a PklProject file, and you can even do so conditionally, e.g. based on an environment variable (read?("env:BLAH")).

Another approach is influencing a dependency itself using a similar technique to swap in a local import without having to directly edit PklProject directly:

amends "pkl:Project"

dependencies {
  ["dsl"] {
    uri = "package://pkg.pkl-lang.org/github.com/org/dsl@1.0.0-SNAPSHOT"
  }
} {
  when (read?("env:LOCAL_DSL") != null) {
    ["dsl"] = import(".../dsl/PklProject")
  }
}

Th…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by nwsepl
Comment options

You must be logged in to vote
1 reply
@HT154
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants