-
Notifications
You must be signed in to change notification settings - Fork 2k
gsl-lite: add None option for on_contract_violation #25157
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
base: master
Are you sure you want to change the base?
gsl-lite: add None option for on_contract_violation #25157
Conversation
recipes/gsl-lite/all/conanfile.py
Outdated
@@ -24,7 +24,7 @@ class GslLiteConan(ConanFile): | |||
# 3. GSL_UNENFORCED_ON_CONTRACT_VIOLATION: nothing happens | |||
# | |||
options = { | |||
"on_contract_violation": ["terminate", "throw", "unenforced"] | |||
"on_contract_violation": ["terminate", "throw", "unenforced", "None"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None is not a good name in this case, it gets too close to options being able to not be defined
Conan v1 pipeline ✔️All green in build 1 (
Conan v2 pipeline ✔️
All green in build 1 (
|
In terms of implementation, easiest in these cases, rather than have secondary to this, changing the behaviour of a default option will impact users that may already be relying on the previous default behaviour. we may break them or cause their own apps to behave differently. We need to evaluate the risk in this case (and any cases where we change a default). I would try and determine that before merging this PR. And more generally - we should re-evalaute the pattern in Conan Center for header only libraries to propagate compiler flags to consumer via Conan options. The typical use outside of Conan would be for the consumers to do a |
default_options = { | ||
"on_contract_violation": "terminate", | ||
"on_contract_violation": None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has this pattern not come up before, where we decide to leave the value undefined instead? I think it achieves the same effect in the package ID ?
Summary
Changes to recipe: gsl-lite/all
Motivation
In this very old PR #5521, user request to have the possibility of not defining a concrete
on_contract_violation
policy. Instead, let downstream decide.Details
Close #5521