-
Notifications
You must be signed in to change notification settings - Fork 996
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
[feature] check_min_cppstd
should specifically report on an unknown compiler
#6547
Comments
Yes, indeed. When a compiler is not specified, it should throw an error. About supporting different compiler, I would prefer adding them directly to Conan code base, so we can re-use for other cases. |
I meant that we should let users an ability to handle that use case since it's not necessarily a hard error. |
Signed-off-by: Uilian Ries <uilianries@gmail.com>
That's why we have |
You misunderstood. The situation when the tool itself doesn't know about a compiler is a different outcome from a situation if the cppstd is not valid. |
Forgot to mention, this specified exception is required to correctly handle the standard version as described here: conan-io/conan-center-index#54 (comment) |
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* #6547 Raise exception for unknown compiler Signed-off-by: Uilian Ries <uilianries@gmail.com> * #6547 Show message with specific compiler-version Signed-off-by: Uilian Ries <uilianries@gmail.com> * #6547 Update exception to ConanInvalidConfiguration Signed-off-by: Uilian Ries <uilianries@gmail.com>
Oh, snap. Sorry folks, but I think I've missed a very important moment: These two places raise the same exception. Meaning that there is no way to distinguish these two situations. It effectively blocks all new compiler versions until they and their logic are added into the Conan repository. The use case: https://github.com/conan-io/conan-center-index/blob/master/recipes/abseil/all/conanfile.py#L51 |
I've made a slight extension of |
The
check_min_cppstd
works, or is intended to work, with default compilers. But it should handle unknown compilers that could be added by users.Right now it doesn't handle the
None
value returned by thededuced_cppstd
and proceeds to compare it. Should probably throw a specialized error?https://github.com/conan-io/conan/blob/develop/conans/client/tools/settings.py#L51
The text was updated successfully, but these errors were encountered: