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

[bug] Alias resolution bug when mixing fix-version and alias #8966

Closed
Doome161 opened this issue May 17, 2021 · 2 comments · Fixed by #9217
Closed

[bug] Alias resolution bug when mixing fix-version and alias #8966

Doome161 opened this issue May 17, 2021 · 2 comments · Fixed by #9217
Milestone

Comments

@Doome161
Copy link

Doome161 commented May 17, 2021

conan_mix_fix_versions_with_alias.zip

The bug occurs when using fixed versions and aliases in a dependency tree. The order of the requirements in the conanfiles plays a decisive role. If, for example, the requires are swapped in component CD, everything runs through successfully. It seems that this issue is related to #2576 which is already marked as fixed.

I have tested various conan versions and was able to reproduce the bug: 1.19, 1.22, 1.26, 1.35 and 1.36.

Environment Details (include every applicable attribute)

  • Operating System+version: Linux
  • Compiler+version: gcc+7
  • Conan version: 1.35.0
  • Python version: 3.6.5

Steps to reproduce (Include if Applicable)

To reproduce the bug I have attached a zipfile. Just run the build.sh and the bug will appear.
The script executes a conan create . user/test for each component and then creates an alias via conan alias ....

Logs (Executed commands with output) (Include/Attach if Applicable)

WARN: CB/1.0.0@user/test: requirement CA/1.0.0@user/test overridden by CC/1.0.0@user/test to CA/RELEASE@user/test 
ERROR: CB/1.0.0@user/test: Incompatible requirements obtained in different evaluations of 'requirements'
    Previous requirements: [CA/1.0.0@user/test]
    New requirements: [CA/RELEASE@user/test]
@monsdar
Copy link
Contributor

monsdar commented May 19, 2021

We also get many of these warnings: WARN: geotiff/1.6.0@thirdparty/release: requirement libtiff/4.1.0@thirdparty/release overridden by gdal/3.1.2 to libtiff/LATEST@thirdparty/release where the LATEST-alias points to the exact same version that is required (LATEST == 4.1.0).

Seems that the timepoint where alias-resolution happens is not correct.

@memsharded
Copy link
Member

#9217 implemented new alias syntax that would resolve this issue, in 1.39.
Thanks for reporting this, let us know how it works!

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 a pull request may close this issue.

3 participants