-
Notifications
You must be signed in to change notification settings - Fork 990
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
[bug] Exact version range [==...]
not working anymore with conan2
#16066
Comments
Hi @araffin Thanks for pointing this out. The truth is that Conan 1 never intended to support So it seems the python-node-semver implemented it and it "slipped" as a feature in Conan 1 we were not very aware, because the recommended approach for pinned dependencies in Conan both 1 and 2 is As we implemented our own version ranges in Conan 2, the I'll check if possible to throw a better error, or at least document it. |
@araffin Is there any reason to use |
I was thinking of allowing the |
Thanks for the swift answer, I guess a better error message would be helpful then.
To give a bit more context, I wrote a script to automatically convert python packages (from PyPi) to conan ones, and this was the most natural way to do the translation (for pinned version. For other version ranges, it is more hacky because pip and conan don't agree). Side note: |
I would argue, that the error message for
So if introducing a message for |
That explains it. The way we understood the Python/pip requirements is that I am submitting a PR to raise a better error message. |
#16069 merged, it will cover both above cases, it will be in next Conan 2.3, thanks! |
Describe the bug
Hello,
I'm currently in the process of upgrading recipes from conan1 to conan 2 and I found out that
package/[==1.0.0]
is no longer working with conan2 (but I couldn't find anything about that in the doc) and conan doesn't throw an error like for[~=1.0]
which is now explicitly invalid.It would be nice to either throw a proper error message ("this version range is no longer supported, please upgrade to ..." and update the doc) or fix the bug and re-add support for it.
How to reproduce it
conan install --requires "any_pkg/[==1.0.0]@user/channel"
vsconan install --requires "any_pkg/1.0.0@user/channel"
The text was updated successfully, but these errors were encountered: