You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation
As far as I know cabal currently only supports wiping out all build artefacts.
Yet, I'm often in a situation where I only want to do this to a package or component.
This can be worked around by doing something like rm -r dist-newstyle/$PACKAGE, but it would be nice if cabal-install supported this directly.
Proposal cabal clean when not given any further arguments stays as it is.
cabal clean [targets] wipes out only the build artefacts for targets.
If this sounds reasonable I'd be happy to give implementing it a go.
Seems reasonable enough. My one question/concern would be the proper behavior if one is cleaning something lower in the build tree -- I'd think that "clean" would have to calculate that it needs to also clean the things dependent on it -- i.e. if one has a library, with a dependent executable, cleaning the lib would necessarily also mean cleaning the exe.
@TeofilC: if you are satisfied the other ticket covers your needs, please do close this one and keep the discussion/work alive on the other one. Thank you for your feedback!
Activity
gbaz commentedon Dec 6, 2021
Seems reasonable enough. My one question/concern would be the proper behavior if one is cleaning something lower in the build tree -- I'd think that "clean" would have to calculate that it needs to also clean the things dependent on it -- i.e. if one has a library, with a dependent executable, cleaning the lib would necessarily also mean cleaning the exe.
jneira commentedon Dec 6, 2021
This could be aligned with some discussion around #7851 about implementing
cabal clean script.shbacchanalia commentedon Dec 6, 2021
This overlaps directly with the work I'm doing right now on scripts as is affects both how targets are calculated and the clean command.
michaelpj commentedon Dec 8, 2021
Dupe? #7506
TeofilC commentedon Dec 8, 2021
What's the procedure for duplicate tickets? Should this be closed in favour of the pre-existing one?
Mikolaj commentedon Dec 8, 2021
Duplicate of #7506
cabal clean(add support for targets) #7506Mikolaj commentedon Dec 8, 2021
@TeofilC: if you are satisfied the other ticket covers your needs, please do close this one and keep the discussion/work alive on the other one. Thank you for your feedback!
TeofilC commentedon Dec 8, 2021
Sounds good to me!