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

Return errorcode 6 when settings are constrained to not support the current environment #5163

Closed
monsdar opened this issue May 17, 2019 · 4 comments · Fixed by #5178 or #5421
Closed

Comments

@monsdar
Copy link
Contributor

monsdar commented May 17, 2019

There are two approaches to restrict the environment a recipe is working for: Constrain Settings and Options

When using the first approach and raising a ConanInvalidConfiguration Conan returns with errorcode 6. This could be further processed by scripts/CI perfectly. However the second approach with constraining the settings does not return with errorcode 6, but results in an error and errorcode 1 instead.

Is there a reason why both return with different behaviour? It would be perfect if both would return with errorcode 6, so developers could use both methods and scripts/CI can react on that in the same way.

@lasote
Copy link
Contributor

lasote commented May 20, 2019

I think you are right, make sense to return 6 too. Do you agree @memsharded ?
I've open a PR with the fix and assigned to the release.

@fourbft
Copy link

fourbft commented Jun 28, 2019

Conan version 1.6.1 handles constrained settings correctly now, when calling "create" (returns error code 6 on unsupported environments), but "info" still returns error code 1 in such a case.

@monsdar
Copy link
Contributor Author

monsdar commented Jun 28, 2019

@lasote or @memsharded: Could you reopen the issue? It seems that it's only partially implemented, at least conan info is missing this return code.

@monsdar
Copy link
Contributor Author

monsdar commented Jul 1, 2019

I did a PR which right now only tests for the issue...

memsharded pushed a commit that referenced this issue Jul 2, 2019
* Added: Unittest for casing

* Added: Case-sensitive checking

* Added: Tests that show that `conan info` is not working as expected

* Added: Missing raise check when conan info gets called as well
@memsharded memsharded modified the milestones: 1.18, 1.17 Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment