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

cmd/cue: the directory tree structure of the modules cache is inconsistent #3139

Open
mvdan opened this issue May 10, 2024 · 0 comments
Open
Assignees
Labels
modules Issues related to CUE modules and the experimental implementation

Comments

@mvdan
Copy link
Member

mvdan commented May 10, 2024

After cleaning my entire ~/.cache/cue and running cue mod tidy on a module which depends on another module, I see:

$ find .cache/cue -type f
.cache/cue/cache/download/github.com/mvdan/test-repo/@v/v0.0.11.lock
.cache/cue/cache/download/github.com/mvdan/test-repo/@v/v0.0.11.zip
.cache/cue/cache/download/github.com/mvdan/test-repo/@v/v0.0.11.mod
.cache/cue/github.com/mvdan/test-repo@v0.0.11/cue.mod/module.cue
.cache/cue/github.com/mvdan/test-repo@v0.0.11/foo.cue
  • ~/.cache/cue/cache/download is unnecessarily repetitive; we should not insert a "cache" directory inside... CUE's cache directory.
  • The unzipped modules are extracted straight inside CUE's cache directory, causing namespace issues for future kinds of caches we might want to use.

My thinking is that we should use ${CUE_CACHE_DIR}/mod/download/${modpath} for downloaded artifacts (e.g. zip files), and ${CUE_CACHE_DIR}/mod/extract/${modpath} for the contents of extracted archives. This way they are nicely grouped together, and there is some hierarchy that describes their contents as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modules Issues related to CUE modules and the experimental implementation
Projects
Status: Planned
Status: v0.9.0-rc.1
Development

No branches or pull requests

2 participants