Skip to content

Clean but avoiding cloning the source repository packages again? #8832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
philderbeast opened this issue Mar 6, 2023 · 2 comments
Open

Comments

@philderbeast
Copy link
Collaborator

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.

@ulysses4ever
Copy link
Collaborator

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

Absolutely. A PR would be welcome.

@michaelpj
Copy link
Collaborator

michaelpj commented Mar 7, 2023

Perhaps related: #7506

(So you can avoid doing a full cabal clean in more circumstances)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants