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

options patterns warning #16233

Merged
merged 8 commits into from May 16, 2024

Conversation

memsharded
Copy link
Member

Changelog: Fix: Warn when using options without pattern scope, to improve UX of users expecting -o shared=True to apply to dependencies.
Docs: conan-io/docs#3720

@memsharded memsharded added this to the 2.4.0 milestone May 10, 2024
ConanOutput().warning("Unscoped option definition is ambiguous.\n"
f"Use '&:{k}={v}' to refer to the current package.\n"
f"Use '*:{k}={v}' or other pattern if the intent was to apply to "
f"dependencies")
Copy link
Member

Choose a reason for hiding this comment

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

I'd add a tag here too, but not sure which one

Copy link
Member

Choose a reason for hiding this comment

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

legacy seems to be a winner here

juansblanco and others added 3 commits May 14, 2024 14:35
…eps (conan-io#16231)

* add legacy variable prefix for cmakedeps

* fix implementation

* improve template variables

* simplify code

* improve test

* add support for multiple cmake variable names and simplify test

* improve code
@memsharded memsharded added type: feature component: ux No changes to core business logic and removed type: look into labels May 14, 2024
@memsharded memsharded merged commit 99bd072 into conan-io:develop2 May 16, 2024
2 checks passed
@memsharded memsharded deleted the ux/warn_options_patterns branch May 16, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ux No changes to core business logic type: feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants