-
Notifications
You must be signed in to change notification settings - Fork 294
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
Labels
modules
Issues related to CUE modules and the experimental implementation
Comments
mvdan
added
the
modules
Issues related to CUE modules and the experimental implementation
label
May 10, 2024
This sounds good to me. |
cueckoo
pushed a commit
that referenced
this issue
May 30, 2024
This acts as a nice regression test and visualization, and we will see the impact of future changes like https://cuelang.org/issue/3139. Note that ./mod/modcache already covers the presence of specific cache files via its Go unit tests, but this added testscript check is a nice complement which covers all files and shows the entire structure. For #3139. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I2ffa32f7ccb44b52c0bfad1bfe56f93a450d5a70
cueckoo
pushed a commit
that referenced
this issue
May 30, 2024
Downloads used to go to ${CUE_CACHE_DIR}/cache/download, such as ~/.cache/cue/cache/download, which often repeated "cache" and wasn't clear about it relating to the caching of modules. Extracted module archives went directly under ${CUE_CACHE_DIR}, which also didn't clearly hint at a modules cache. Worse, by not using a namespace, it made the top-level ${CUE_CACHE_DIR} less useful and more confusing for other caching needs in the future. Now both are under ${CUE_CACHE_DIR}/mod: * ${CUE_CACHE_DIR}/mod/download for downloaded modules * ${CUE_CACHE_DIR}/mod/extract for extracted modules Note that this does make absolute file paths for extracted modules slightly longer by twelve characters, but that seems an OK tradeoff. Update the testscript and unit tests accordingly. Fixes #3139. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I12d5926b9afc9242d056839855ff51b58545295a
cueckoo
pushed a commit
that referenced
this issue
May 30, 2024
This acts as a nice regression test and visualization, and we will see the impact of future changes like https://cuelang.org/issue/3139. Note that ./mod/modcache already covers the presence of specific cache files via its Go unit tests, but this added testscript check is a nice complement which covers all files and shows the entire structure. For #3139. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I2ffa32f7ccb44b52c0bfad1bfe56f93a450d5a70
cueckoo
pushed a commit
that referenced
this issue
May 30, 2024
Downloads used to go to ${CUE_CACHE_DIR}/cache/download, such as ~/.cache/cue/cache/download, which often repeated "cache" and wasn't clear about it relating to the caching of modules. Extracted module archives went directly under ${CUE_CACHE_DIR}, which also didn't clearly hint at a modules cache. Worse, by not using a namespace, it made the top-level ${CUE_CACHE_DIR} less useful and more confusing for other caching needs in the future. Now both are under ${CUE_CACHE_DIR}/mod: * ${CUE_CACHE_DIR}/mod/download for downloaded modules * ${CUE_CACHE_DIR}/mod/extract for extracted modules Note that this does make absolute file paths for extracted modules slightly longer by twelve characters, but that seems an OK tradeoff. Update the testscript and unit tests accordingly. Fixes #3139. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I12d5926b9afc9242d056839855ff51b58545295a
cueckoo
pushed a commit
that referenced
this issue
May 30, 2024
This acts as a nice regression test and visualization, and we will see the impact of future changes like https://cuelang.org/issue/3139. Note that ./mod/modcache already covers the presence of specific cache files via its Go unit tests, but this added testscript check is a nice complement which covers all files and shows the entire structure. For #3139. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I2ffa32f7ccb44b52c0bfad1bfe56f93a450d5a70 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195517 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Paul Jolly <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After cleaning my entire
~/.cache/cue
and runningcue mod tidy
on a module which depends on another module, I see:~/.cache/cue/cache/download
is unnecessarily repetitive; we should not insert a "cache" directory inside... CUE's cache directory.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.The text was updated successfully, but these errors were encountered: