Skip to content

[migration] Add clarification for validate() for header only #2778

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

Merged
merged 3 commits into from
Dec 29, 2022

Conversation

danimtb
Copy link
Member

@danimtb danimtb commented Oct 6, 2022

@prince-chrismc
Copy link
Contributor

prince-chrismc commented Oct 6, 2022

🤔 Trying to see why my PR is failing the 2.0 pipeline... I hit this issue

https://github.com/conan-io/conan-center-index/blob/318053389c781d02566c2609e9e77a1e205ca00a/recipes/expected-lite/all/conanfile.py#L23-L25

Fails with 2.0 with 'self.settings' access in 'validate()' method is forbidden

I am also having problems with check_min_vs failing for the same reason

string-view-lite/1.6.0: Compatible package ID da39a3ee5e6b4b0d3255bfef95601890afd80709 equal to the default package ID
variant-lite/2.0.0: Compatible package ID da39a3ee5e6b4b0d3255bfef95601890afd80709 equal to the default package ID
ERROR: restinio/0.6.17: Error in validate() method, line 100
        check_min_vs(self, 190)
        ConanException: 'self.settings' access in 'validate()' method is forbidden
 ✘ christopherm@christopherm-mac  ~/conan-center-index/recipes/restinio   update/restinio ±  conan --version
Conan version 2.0.0-beta3

@memsharded
Copy link
Member

Yes, that is true, and this is one of the reasons this issue is being problematic, the migration path 1.X->2.0 is not clear yet.

@prince-chrismc
Copy link
Contributor

This needs some attention https://github.com/conan-io/docs/pull/2778/files#diff-633dc3f2388dc1689eaab8f6f51e1435bf9be9a28e73d49d302a583de6360789R185 should be more clear about validate vs package_id

@prince-chrismc
Copy link
Contributor

This PR matches the current recommendations and it's doesn’t have any open questions AFAIK so I will go ahead and merge this tiny snippet

@prince-chrismc prince-chrismc merged commit a276b7e into conan-io:master Dec 29, 2022
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.

6 participants