haskell / haskell/cabal

Per package/component `cabal clean` (add support for targets)

Open
#7,506 10 comments 5 reactions 0 assignees View on GitHub
blocked: decision-needed cabal-install: cmd/clean type: bug type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

`cabal clean` is both simple and effective, by virtue of just deleting everything. However, in a multi-package project, I usually want to clean just one package or component that I'm working on.

Of course, the current implementation works for this, but once you accrue a few local packages and a few `source-repository-package`s, redoing *all* the work instead of just the last bit becomes painful.

At the moment I work around this by deleting targeted fragments of `dist-newstyle/build`. This works, but:
- it's clumsy
- it's not discoverable
- it's probably not comprehensively cleaning the package (I have no idea if it gets all the files!)

I think it would be nice to provide a per package/component `cabal clean`, and hopefully it would just be a matter of listing all the relevant files and deleting them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.