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

proposal for important! options #15571

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Jan 31, 2024

Changelog: Feature: New "important" options values definition, with higher precedence over regular option value definitions.
Docs: conan-io/docs#3585

Close #14764
Close #15519

@memsharded memsharded added this to the 2.1 milestone Jan 31, 2024
@memsharded memsharded requested a review from czoido January 31, 2024 15:59
Copy link
Contributor

@franramirez688 franramirez688 left a comment

Choose a reason for hiding this comment

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

I think the idea is great, but I was wondering if it could be =! instead of !=. IMO, I think of != could be a bit confusing. About the strong name, could it be override instead? Would it not be clearer?

@memsharded
Copy link
Member Author

think the idea is great, but I was wondering if it could be =! instead of !=. IMO, I think of != could be a bit confusing. About the strong name, could it be override instead? Would it not be clearer

The specific syntax is a proposal, but I'd say that the implementation is easier if it is in the option name. Also, in theory, options values can be anything, while options names cannot contain "!" at their definition, which makes a bit more unlikely that someone with an option finishing in ! will make it fail.

Regarding override, I am not sure, it will be ovelapping with the requirements overrides, which is a different concepts. Strong options can also override strong options, and regular options can override regular options... We can look for another name, I agree, but override I am not sure.

@AbrilRBS
Copy link
Member

AbrilRBS commented Feb 1, 2024

We can look for another name, I agree, but override I am not sure.

Just by simliarity with CSS's !important (Both have an !), we can call them important options 🤔

@czoido
Copy link
Contributor

czoido commented Feb 2, 2024

We can look for another name, I agree, but override I am not sure.

Just by simliarity with CSS's !important (Both have an !), we can call them important options 🤔

I like the idea of calling them important options and using the !

@memsharded memsharded marked this pull request as ready for review February 5, 2024 13:01
@memsharded memsharded requested review from jcar87 and AbrilRBS February 5, 2024 13:01
@memsharded memsharded changed the title proposal for strong options proposal for important! options Feb 5, 2024
@memsharded memsharded merged commit c305708 into conan-io:develop2 Feb 7, 2024
2 checks passed
@memsharded memsharded deleted the feature/strong_options branch February 7, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants