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

Read required_conan_version in text mode before loading the recipe #11908

Conversation

lasote
Copy link
Contributor

@lasote lasote commented Aug 18, 2022

Changelog: Feature: Fail sooner and with a meaningful error if the specified required version is not satisfied.
Docs: omit

Conan will try to read the required_conan_version from the recipes without loading the recipe (python interpreter) to be able to check it even if there are imports broken/missing for the user conan current installed version. So Conan can fail sooner and with a meaningful error if the specified required version is not satisfied.

Close #11239

@lasote lasote requested review from czoido and memsharded August 18, 2022 11:25
@lasote lasote added this to the 1.52 milestone Aug 18, 2022
conans/client/loader.py Outdated Show resolved Hide resolved
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better only at import error time.

conans/client/loader.py Show resolved Hide resolved
conans/client/loader.py Outdated Show resolved Hide resolved
conans/client/loader.py Outdated Show resolved Hide resolved
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.

[bug] required_conan_version is not evaluated before python imports
3 participants