stefan-hoeck / idris2-pack

BSD 3-Clause "New" or "Revised" License
90 stars 23 forks source link

[ gc ] Make `gc` command to not to clean up too much #262

Closed buzden closed 8 months ago

buzden commented 8 months ago

If we have local pack.tomls with alternative Idris commits set, currently pack gc will clean up all but only those in the localmost pack.toml, including the version from the current pack collection. This commit fixes it, pack gc now does not clean up an Idris commit mentioned in the current pack collection and in all local pack.tomls all way up. It fixes #246.

NB: if alternative Idris commit is not set in any local pack.tomls, the behaviour of pack gc should not change.

Additonally, this PR has a small commit with changes not worth a separate PR.

buzden commented 8 months ago

Almost two weeks passed, there were no comments (however, I'm not sure anyone has seen this). So, I'm going to merge this, since this is anyway a fix of undesired behaviour. Anyway, if @stefan-hoeck is against some of these changes, they are not fundamental and can be reverted easily.

stefan-hoeck commented 8 months ago

Truly sorry for not replying on this, and thanks for the fix!