haskell / haskell/cabal

Clean but avoiding cloning the source repository packages again?

Open
#8,832 2 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/clean cabal-install: source-repository-package type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Is there a way to `cabal clean` without the next `cabal build` having to clone the source repository packages again? Can these clones be preserved?

```
$ cabal clean
$ cabal build
...
Cloning into '/.../dist-newstyle/src/amazonka...'
remote: Enumerating objects: 941841, done.
remote: Counting objects: 100% (171/171), done.
remote: Compressing objects: 100% (101/101), done.
remote: Total 941841 (delta 66), reused 151 (delta 59), pack-reused 941670
Receiving objects: 100% (941841/941841), 1.22 GiB | 28.97 MiB/s, done.
Resolving deltas: 100% (785798/785798), done.
```

I checked the help:

```
$ cabal clean --help
Clean the package store and remove temporary files.

Usage: cabal new-clean [FLAGS]

Removes all temporary files created during the building process (.hi, .o,
preprocessed sources, etc.) and also empties out the local caches (by
default).

Flags for clean:
-h, --help Show this help text
-v, --verbose[=n] Control verbosity (n is 0--3, default
verbosity level is 1)
--builddir=DIR The directory where Cabal puts generated build
files (default dist)
--project-file=FILE Set the name of the cabal.project file to
search for in parent directories
-s, --save-config Save configuration, only remove build
artifacts
```

Shouldn't this help now say `(default dist-newstyle)` now that the v2 commands are the default?

I tried `--save-config` but this didn't help.

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.