Skip to content

Garbage collection - #1482

Closed
cdrnet wants to merge 4 commits into
fsprojects:masterfrom
cdrnet:garbage-collection
Closed

cdrnet wants to merge 4 commits into
fsprojects:masterfrom
cdrnet:garbage-collection

Conversation

@cdrnet

@cdrnet cdrnet commented Feb 18, 2016

Copy link
Copy Markdown
Member

I've started on a proposal how we could implement garbage collection to clean up packages no longer needed in the packages folder (and if possible the same for paket-files). Addresses #1416.

Since the packages folder is typically excluded from version control, we do not always have explicit information about a package being removed. What we do know is what packages are currently extracted in the packages folder, and what packages we actually expect to be there according to the lock file.

The proposed algorithm essentially goes through the subdirs of the packages folder, tries to imply group and package names, and drops all of these folders which we identify as a extracted package but are not known by the lock file (ignoring the version).

Questions:

  • Is it safe to assume that the name of the extracted nuspec file matches the package id, or do we need to parse it to be sure? We could also interpret the folder name instead, which we do construct ourselves (with or without version).
  • When/where would we want to do this? Should it be explicit? Only on demand? Currently it is rather aggressive: always after add, remove and install, unless --no-install is set, and always after restore. I expect this to be too aggressive in practice.

@cdrnet cdrnet changed the title [WIP] Garbage collection Garbage collection Feb 22, 2016
@forki

forki commented Feb 29, 2016

Copy link
Copy Markdown
Member

I think GC is very important, but can you please send this against the v3 branch? I think this feature might come with some complications and therefor we should play it safe and add it to Paket 3.0

@cdrnet

cdrnet commented Feb 29, 2016

Copy link
Copy Markdown
Member Author

Of course, I'll open a new PR on v3 (rebased)

@forki forki closed this Feb 29, 2016
@forki

forki commented Feb 29, 2016

Copy link
Copy Markdown
Member

thx

@cdrnet cdrnet mentioned this pull request Feb 29, 2016
@cdrnet
cdrnet deleted the garbage-collection branch March 1, 2016 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants