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

Can stack delete unused folders in .stack-work/downloaded? #3567

Closed
mitchellwrosen opened this issue Nov 10, 2017 · 2 comments
Closed

Can stack delete unused folders in .stack-work/downloaded? #3567

mitchellwrosen opened this issue Nov 10, 2017 · 2 comments

Comments

@mitchellwrosen
Copy link
Contributor

Is it possible for stack to compare the current stack.yaml's packages to the contents of .stack-work/downloaded and remove the unused folders? These tend to accumulate when working on a project with fast-moving GitHub-hosted dependencies. Thanks.

@mgsloan mgsloan added this to the P3: Optional milestone Nov 13, 2017
@mgsloan
Copy link
Contributor

mgsloan commented Nov 13, 2017

Indeed, it'd be good to garbage collect those. One tricky thing here is that users may have multiple stack.yaml files that refer to different git repos. I suppose one approach could be to read all *.yaml in the dir, and GC based on those.

Could potentially have an explicit command to clean up such things - #133 - note that stack clean --full is one approach, but that's a rather big hammer since it throws away everything.

A further complication is that it's likely that downloaded git repos will be shared between different projects - #3551 . One approach that'd apply generally to garbage collection would be to have it maintain a list of locations of stack configuration files, possibly storing last usage time.

So, in summary, it would definitely be good to fix this, probably while addressing the other garbage collection issues.

@snoyberg
Copy link
Contributor

snoyberg commented Apr 8, 2019

With Pantry, we're no longer writing this directories at all, closing

@snoyberg snoyberg closed this as completed Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants