Comments (10)
Avoiding resolution is fair enough. We were debating whether download-package
should exist. Its current UI does not know about PklProject
, through. This is why pkl download-package
does not (yet?) work to download all project packages. Some more thinking required, but points taken.
from pkl.
My understanding is that packages are always cached unless --no-cache
is specified.
Nevertheless, something like pkl project resolve --download
or pkl download-package
(without arguments) could certainly be useful.
from pkl.
Instead of adding a --download
argument, we're considering just always downloading (unless --no-cache
is specified).
from pkl.
Is there a benefit in keeping resolution and download decoupled? That was the idea behind pkl download-package
without arguments. If resolution ever becomes non-deterministic, for example due to supporting some concept of “latest”, decoupling will be essential.
from pkl.
We did discuss it. When using pkl project resolve --no-cache
, it would not download things. That does feel less that optimally discoverable, to be sure, but our thinking so far is that scenarios where download should actively be avoided are rare enough not to create a whole separate command for the downloading. Why would you say latest
would make decoupling essential? latest
would only be newer-than-what-we-have-downloaded-in-cache when you resolve
(not on a normal eval
; otherwise latest
means you can never build without an internet connection).
from pkl.
It’s about actively avoiding resolution, not actively avoiding download. If all I want is to download, I should never have to worry about PklProject.deps.json
changing as a side effect. According to the docs, the download-package
command already exists, so I’m not sure what you mean by “whole separate command”.
from pkl.
Good point about pkl project resolve
maybe not being deterministic in the future. But, I don't think it relates to "pkl project resolve
should not populate the cache dir". Downloading dependencies is a matter of saving network I/O, and making subsequent pkl eval
executions faster.
If we do want to lean on this being the method for "I want to download all my project dependencies", we can maybe add a flag for "don't update already-resolved dependencies" in the future, if "latest" becomes a thing.
BTW: "I want to download all my dependencies" can also be a shell script:
cat PklProject.deps.json \
| jq -c -r '.resolvedDependencies[] | select(.type == "remote") | (.uri[7:] + "::" + .checksums.sha256)' \
| xargs -I {} pkl download-package {}
from pkl.
I guess I don’t mind if pkl project resolve
also downloads packages, although I don’t really see the need either. I don’t think it saves much network I/O as packages will only be downloaded once in any case. Also, downloading as part of resolving won’t help all the other folks that didn’t run the resolve command themselves. Overall, not downloading by default feels more consistent with Pkl’s lazy attitude.
My gut feeling is that there should be an easy way to download all package dependencies without resolving. If the download-package
command is here to stay, I’d expect it to be capable of this.
from pkl.
The resolve command does need to download in order to build the resolved dependency list. Since it's already downloading, it's actually a little strange that it's not writing them to the cache dir.
My gut feeling is that there should be an easy way to download all package dependencies without resolving. If the download-package command is here to stay, I’d expect it to be capable of this.
Fair; I can definitely see a mode in download-package
that just downloads project dependencies. Maybe something like: pkl download-package --project=my-project/
from pkl.
Oh I thought that pkl project resolve
would just download metadata. If it has to download the packages, it should definitely store them in the cache, at least by default.
from pkl.
Related Issues (20)
- Automatic formatting of Pkl files HOT 1
- Stack overflow when parameter name is same as object property name HOT 2
- Type constraints on `typealias`es are evaluated eagerly HOT 3
- Question: Submit to CNCF HOT 3
- `gw buildNative` runs aarch64 tasks on amd64 HOT 1
- Allow overriding Java/Kotlin package name in codegen
- Rendering lists in XML may produce unexpected results HOT 1
- Type constraints are sometimes not enforced. HOT 2
- Unable to create test for non-empty constraint on listing HOT 2
- Add SLSA provenance to your releases
- Disable "Allow merge commits" and "Allow rebase merging" in GitHub UI HOT 3
- Non-constant globbed reads return wrong results
- Reads with same glob pattern return same result even if located in different modules/directories
- better source listing for IntelliJ to include line numbers? HOT 2
- Provide an ability to depend on a local project module from a non-project module
- Feature Request: Add `hcl` format
- [Feature Request] Type parameters for Classes
- Unexpected caching with pkl-go and Evaluator.EvaluateOutputText HOT 1
- Output path placeholders don't expose `ValueRenderer.extension`
- Optimization: `const` members should be cached for all children in prototype chain
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pkl.