Skip to content

Proposing new flags plugin for compatibility#19879

Merged
czoido merged 42 commits into
conan-io:develop2from
memsharded:fix/package_info_consumer_flags3
Apr 28, 2026
Merged

Proposing new flags plugin for compatibility#19879
czoido merged 42 commits into
conan-io:develop2from
memsharded:fix/package_info_consumer_flags3

Conversation

@memsharded

@memsharded memsharded commented Apr 16, 2026

Copy link
Copy Markdown
Member

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

memsharded and others added 30 commits August 1, 2025 13:58
…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>
Comment thread conan/api/conan_api.py Outdated

def _flags_plugin(self):
plugin_path = os.path.join(self._conan_api.home_folder, "extensions", "plugins",
"flags.py")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

probably call it compiler_flags.py?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, agree flags.py is too generic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

And what about:

def flags_plugin(conanfile, elements, **kwargs):

@memsharded memsharded marked this pull request as ready for review April 28, 2026 08:26
@memsharded memsharded added this to the 2.28.0 milestone Apr 28, 2026
@czoido czoido merged commit 48dca6c into conan-io:develop2 Apr 28, 2026
17 checks passed
@memsharded memsharded deleted the fix/package_info_consumer_flags3 branch April 28, 2026 08:57
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feedback] compatibility can't handle cpp_info cxxflags

4 participants