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

conan export-pkg command not passing --version to the recipe with Conan 2.2.3 #16223

Closed
1 task done
sharadupadhyaya opened this issue May 8, 2024 · 10 comments · Fixed by #16224
Closed
1 task done
Assignees
Milestone

Comments

@sharadupadhyaya
Copy link

What is your question?

I was using Conan 2.0.0 and conan export-pkg --version "xyz" was working fine with version passed from command.
Recently started using latest Conan version 2.2.3. With this conan export-pkg command is not passing the --version value to the recipe. When I printed the version in recipe it shows None.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@sharadupadhyaya sharadupadhyaya changed the title conan export-pkg command not passing --version to the script with Conan 2.2.3 conan export-pkg command not passing --version to the recipe with Conan 2.2.3 May 8, 2024
@memsharded memsharded self-assigned this May 8, 2024
@memsharded
Copy link
Member

Hi @sharadupadhyaya

I am afraid I cannot reproduce. I have tried locally and this seems to work correctly.
Please provide:

  • A full conanfile.py that allows to reproduce the issue.
  • The exact command you are typing
  • The full output of the command

@sharadupadhyaya
Copy link
Author

sharadupadhyaya commented May 8, 2024

Please see the example attached.
I am using attached conanrecipe.py that uses a python-require package.
test.tar.gz

Command to create the python-require package:
conan create test/testmodule.py
Command to reproduce the issue:

conan install conanrecipe.py --version 1.0+0

conan export-pkg --version 1.0+0 conanrecipe.py
Output:
None
ERROR: conanfile.py: Invalid configuration: Version not passed

@sharadupadhyaya
Copy link
Author

Above works fine with Conan2.0.0.

@sharadupadhyaya
Copy link
Author

This worked till Conan 2.0.11, started failing from Conan2.0.12.

@memsharded
Copy link
Member

Thanks very much, that really helped to reproduce the issue. It was being caused by the python-requires inheritance.
I am having a look to provide a fix.

@memsharded
Copy link
Member

I am proposing a fix for this in #16224

Indeed, the addition of some checks back then caused this issue. Please note from https://docs.conan.io/2/introduction.html

Only the latest released patch (major.minor.patch) of every minor version is supported and stable.

So as this behavior was already in latest 2.0.17, it cannot be considered a regression, but a regular bugfix.
Still I am assigning this to the next patch release 2.3.1, so it can be released as soon as possible.

Thanks very much for reporting!

@sharadupadhyaya
Copy link
Author

Thanks, I will wait for patch release 2.3.1.

@memsharded memsharded added this to the 2.3.1 milestone May 8, 2024
@memsharded
Copy link
Member

Closed by #16224, it will be in next 2.3.1

@memsharded
Copy link
Member

2.3.1 is out

@sharadupadhyaya
Copy link
Author

sharadupadhyaya commented May 22, 2024 via email

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

Successfully merging a pull request may close this issue.

2 participants