Skip to content
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

Consider moving CAS to platform-standard cache directories #47

Closed
kamalmarhubi opened this issue Nov 27, 2022 · 4 comments · Fixed by #49
Closed

Consider moving CAS to platform-standard cache directories #47

kamalmarhubi opened this issue Nov 27, 2022 · 4 comments · Fixed by #49
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@kamalmarhubi
Copy link

kamalmarhubi commented Nov 27, 2022

Ran across this project via pantsbuild.slack.com lurking.

Small suggestion: instead of ~/.nce, store the CAS in $XDG_CACHE_HOME/{scie,nce,whatever} on systems that follow XDG, and in ~/Library/Caches/{scie,nce,whatever} on macos—and probably somewhere under %localappdata% on Windows; less sure about that one.

This makes it clear it's fine to blow away (eg, to free up space), and also removes some clutter from $HOME. It's probably easier to change this before widespread use of scie-packaged programs. :-)

Edit: I just saw #9 which probably conflicts with the idea that the CAS can be blown away. In that case, the equivalent of $XDG_DATA_HOME might be better?

@jsirois jsirois added bug Something isn't working enhancement New feature or request labels Nov 27, 2022
@jsirois
Copy link
Collaborator

jsirois commented Nov 27, 2022

This should definitely be done. IIUC this crate is the thing to use: https://crates.io/crates/dirs

@kamalmarhubi do you want to take a crack at this?

@jsirois
Copy link
Collaborator

jsirois commented Nov 27, 2022

To be clear, ~/.nce is just the default. It will be good to get that default conforming to XDG / Mac / Windows standards for user caches, but the author of a lift manifest can also explicitly set scie.lift.base. Since lift manifests are, by definition, platform specific, this works. Its more effort than needed though and defaulting correctly would be great.

@jsirois
Copy link
Collaborator

jsirois commented Nov 27, 2022

As to #9, the CAS definitely can always be blown away in normal use. The self-modifying idea is aimed at system installers; i.e.: /var/nce or /var/lib/nce or something like that would be used by the system and the installs would run as root. No one could easily blow away that sort of NCE cache.

@jsirois jsirois self-assigned this Nov 28, 2022
@jsirois jsirois added the in progress Indicates the assignee is actively working on the item. label Nov 28, 2022
jsirois added a commit to jsirois/jump that referenced this issue Nov 29, 2022
jsirois added a commit that referenced this issue Nov 29, 2022
@jsirois jsirois removed the in progress Indicates the assignee is actively working on the item. label Nov 29, 2022
@jsirois
Copy link
Collaborator

jsirois commented Nov 30, 2022

This is now released in 0.4.0: https://github.com/a-scie/jump/releases/tag/v0.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants