fix: cache clear now deletes dep files from disk, not just JSON#2449
Open
Bhumika-SN wants to merge 2 commits into
Open
fix: cache clear now deletes dep files from disk, not just JSON#2449Bhumika-SN wants to merge 2 commits into
Bhumika-SN wants to merge 2 commits into
Conversation
Collaborator
|
this looks right - but would be nice with an actual test to verify the behavour |
quintesse
requested changes
May 8, 2026
Collaborator
|
Hmm. Not sure what that comment was partially coming from :) Thanks for checking @quintesse ! |
Contributor
Author
|
Hi @quintesse and @maxandersen, I've moved the fix to Could you please re-review? Thank you! |
Contributor
Author
|
Hi @maxandersen and @quintesse, I've moved the fix to The CI failures appear to be in Java 25 integration tests and smoke Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
jbang cache clearwas not actually clearing the dependency cache from disk.The
DependencyCache.clear()method only set the in-memorydepCacheto null,but never deleted the actual cached files on disk. This means running
jbang cache clearwould leave all downloaded JARs and the dependency_cache.jsonfile still present on disk.
Fix
Updated
DependencyCache.clear()to also:dependency_cache.jsonfile from diskdepcachedirectory containing actual downloaded JARsRelated Issue
Fixes #475