Proposing new flags plugin for compatibility#19879
Merged
czoido merged 42 commits intoApr 28, 2026
Merged
Conversation
…in both contexts with different settings (conan-io#19208) * Add failing test for compat when different context reuires different packages potential path forward What? Maybe simplify test make test valid in windows too Bump version * This also fails with update * fixes * fixes * Simplify --------- Co-authored-by: memsharded <james@conan.io>
This was referenced Apr 20, 2026
jcar87
approved these changes
Apr 28, 2026
|
|
||
| def _flags_plugin(self): | ||
| plugin_path = os.path.join(self._conan_api.home_folder, "extensions", "plugins", | ||
| "flags.py") |
Contributor
There was a problem hiding this comment.
probably call it compiler_flags.py?
Member
Author
There was a problem hiding this comment.
Yes, agree flags.py is too generic.
Member
Author
There was a problem hiding this comment.
And what about:
def flags_plugin(conanfile, elements, **kwargs):
czoido
approved these changes
Apr 28, 2026
czoido
pushed a commit
to czoido/conan
that referenced
this pull request
Apr 28, 2026
* investigating consumer flags per compiler * new approach of using directly the settings of the consumer node * explore new concept * new approach with callables * new approach with callables and transparent * adding lambda oneliner test * wip * wip * Fix assert when finding compatible binaries of a package that exists in both contexts with different settings (conan-io#19208) * Add failing test for compat when different context reuires different packages potential path forward What? Maybe simplify test make test valid in windows too Bump version * This also fails with update * fixes * fixes * Simplify --------- Co-authored-by: memsharded <james@conan.io> * wip * wip * fix * test json generation * wip * wip * wip * review * fix test * new approach * wip * review without default flags mapping * wip * fix * review * review --------- Co-authored-by: Abril Rincón Blanco <5364255+AbrilRBS@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog: Feature: New compiler flags
flags_map()Python plugin to be able to translate, remove or handle compiler flags coming from compatible binaries built with a different compiler trying to inject compiler flags for that compiler.Docs: conan-io/docs#4437
Third iteration of #18727 and #19545
Close #18613