-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Implement a --use-cache flag closes #100 #104
Conversation
…che folder for reuse later
Note that for the integration tests, if you wish, cache could be used. Particularly:
Or, having a global cache for all the tests, would accelerate them all anywhere where the internet is not super fast (and running the tests will hit the hosting servers less). But this may mess with expectations of the tests or their particular goals. I did not want to implement that in case it was too controversial. |
i don't think this is necessary. but as mentioned in #104 (comment), i think it would be nice to assert that the SHA stays the same even with cache |
Oh, also, there's no short-version of the So, yeah, if it should have a short-version, you should probably be the ones to decide which :) Also, I chose to make |
i think only having a long version should be fine here
sounds sensible 👍🏻 |
@pavelzw all ready, I think :) |
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 for implementing this so quickly!
Thank you for the tool and the opportunity! Any comment in regards of the code/tests? For me to learn, basically |
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.
thanks, code looks good to me!
failing ci is intended as |
Motivation
Following up on #100 (thanks for the opportunity @pavelzw !).
As the README of this PR states, having a cache for downloads is useful when:
pixi
's cache is for already-extracted packages, but here we need them un-extracted, so implementing an optional (behind the--use-cache
flag) cache for downloads.I have little experience in Rust[1], let me know if this is an okay implementation.
There are some formatting changes, I used the autoformat feature from VSCode with the rust-analyzer extension.
Changes
--use-cache CACHE_DIR
flag.[1] It's so easy to jump into a project thanks to cargo! I just cloned, ran
cargo build
, thencargo test
(which failed due to my slow internet)... and then I could justcargo run
to test my changes (before I added my test, which I should probably have done first).closes #100