Skip to content
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

How to remove a requirement? #277

Open
nicolasfranck opened this issue Apr 14, 2021 · 3 comments
Open

How to remove a requirement? #277

nicolasfranck opened this issue Apr 14, 2021 · 3 comments

Comments

@nicolasfranck
Copy link

If I remove a requirement from cpanfile, and run carton install again,
the requirement is not removed from the snapshot.

If I remove the requirement manually from the snapshot and cpanfile, and run carton install again,
the requirement is added again to the snapshot. It is like the dependency tree
is derived from the directory tree, and not from the snapshot.

If I remove the requirement from the cpanfile, the snapshot and from the filesystem,
only then it stays out of the snapshot ..

Any idea how to make this more manageable? Because like this old dependencies
will remain forever..

@bbrtj
Copy link

bbrtj commented Jan 23, 2022

If anyone is looking for a solution - seems like deleting dependency from cpanfile, module directory from local/lib/perl5/envname/.meta (local/lib/perl5/amd64-freebsd/.meta on my machine) and then running carton install is the way to remove something from the cpanfile.snapshot. Sadly, think its dependencies are not removed, so you have to snipe those manually.

Edit: Of course its simpler just to remove the entire local directory, but then you will have to reinstall everything. May be a better solution though

@miyagawa
Copy link
Contributor

miyagawa commented May 7, 2022

Yes, that's correct, Carton doesn't have a clean way to remove a module, since that state is not managed by Carton and is preserved in local - You have to blow away local (to get everything installed from scratch, which takes time) or manually remove files from local (tedious, but could save time).

plug: Carmel has a much better way of doing updates like this and I'm actively working on it.

@jonasbn
Copy link

jonasbn commented May 7, 2022

Carmel can be found at: https://github.com/miyagawa/carmel

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

No branches or pull requests

4 participants