Skip to content

Add an option to delete all sources from a sandbox #2458

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

Closed
danclien opened this issue Mar 8, 2015 · 4 comments
Closed

Add an option to delete all sources from a sandbox #2458

danclien opened this issue Mar 8, 2015 · 4 comments

Comments

@danclien
Copy link

danclien commented Mar 8, 2015

Any one have thoughts on adding a cabal sandbox delete-all-sources or cabal sandbox delete-sources that removes all sources from the sandbox?

On the random occasion I move or rename one of my source directories, it's easier for me to script deleting all the sources and adding all of them back in (using bash) than manually doing delete-source and add-source.

I would rather have the functionality to delete all the sources built into cabal since my bash script is brittle due to parsing cabal sandbox list-sources's output. I'm willing to attempt a PR.

@danclien danclien changed the title Add a cabal sandbox delete-all-sources Add an option to delete all sources from a sandbox Mar 8, 2015
@lspitzner
Copy link
Collaborator

makes sense. for now you might get the desired effect by doing some manual

rm -r .cabal-sandbox/packages
cabal sandbox init

which should delete the add-sources, but leave the installed packages. no guaranties, though :)

@BardurArantsson
Copy link
Collaborator

AFAICT this would be somewhat at odds with #2631 in that we surely don't want to add even more ways to mutate the state of sandboxes -- thus making for even more edge cases, etc. It seems to me that #2631 is moving towards a less stateful model where Cabal will itself pick up whatever sources you have and "do the right thing"(TM).

@BardurArantsson
Copy link
Collaborator

... therefore I suggest this be closed as "WONTFIX".

@phadej
Copy link
Collaborator

phadej commented Aug 31, 2020

sandbox functionality is removed.

@phadej phadej closed this as completed Aug 31, 2020
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

8 participants