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

Implement carmel pin Module@version #39

Merged
merged 2 commits into from
May 7, 2022
Merged

Implement carmel pin Module@version #39

merged 2 commits into from
May 7, 2022

Conversation

miyagawa
Copy link
Owner

@miyagawa miyagawa commented May 7, 2022

Imagine you have cpanfile:

requires 'JSON', '4';

and the snapshot has the version 4.00.

You can update to the latest version available from CPAN with carmel update JSON. Let's say you don't want the version on CPAN today, and want to pin to a specific version. You can update cpanfile:

requires 'JSON', '== 4.04';

This works fine, but then you need to unpin every time you update to newer versions.

The new carmel pin command allows you to keep the version specification in cpanfile (so that future run of carmel update will update to the latest), while pinning to the specified version, rather than whatever is the latest on CPAN when you run it.

carmel pin JSON@4.04 is essentially the same as:

  • manually update cpanfile to have requires 'JSON', '== 4.04';
  • run carmel install to pin the JSON version in the snapshot
  • revert cpanfile to requires 'JSON', '4';

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

Successfully merging this pull request may close these issues.

None yet

1 participant