-
Notifications
You must be signed in to change notification settings - Fork 15
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
Carmel::App adds version requirements incorrectly #33
Comments
This is You should either use Update: this is not an expected behavior, but is a corner case issue when the build artifact cache is empty. See below. |
I investigated this further and cannot reproduce this locally in a regular workflow as you described. It turns out, this seems to me an edge case bug that could occur if:
With this, carmel tries to find previously used version specified in the snapshot, but then pass it on to the cpanfile, so that When the artifact repo is empty, the missing callback you quoted runs, and applies the exact match I suspect you shouldn't have seen this issue you run That said the bug is a bug and I will keep this open. There're several workarounds:
|
Previously, the version is pinned to the version found in snapshot with the exact match (==) so that it can be pulled from BackPAN using MetaCPAN search, but that's not necessary anymore since the snapshot is now passed to the cpanm as --mirror-index, so all the dists in the snapshot are already preferred, while allowing the updates with a submodule update.
This commit will fix this particular problem, but with one caveat: as I noted in the comment, the fix will only work half the time due to perl's hash randomization, because depending on the order, cpanm could still encounter a conflicting version requirement. This is not a bug in Carmel, and is a common issue in cpanm and Carton as well. It might be rare for you to encounter this with Carton because with Carton you either a) don't have Ideal fix would be that we should be able to hint the order of dependency resolution based on the order of dependencies written in
|
I wonder if
so it will pull the latest version of Foo to update the version in the snapshot without affecting the others. |
I merged the above commit to master, but turns out Previously, the This is clearly a use case that I can consider to stop supporting, but at least there was a reason for that pinning. I added b8810c5 to show that it can be worked around if you run |
The change is released to CPAN as v0.1.40. |
I have a cpanfile with a number of versioned dependencies in it, all expressed just as "requires 'module', '1.23';" (i.e. "give me at least this version").
I updated the dependency of one module to a version that itself has a prereq for another module
already mentioned in the cpanfile, but which specifies an earlier version, and I got an error:
e.g.
When running carmel install, the error is:
I believe this is coming from Carmel::App line 137:
This should be adding the version as ">= $ver", not "== $ver".
The text was updated successfully, but these errors were encountered: