Open
Conversation
Replace expensive and broken dependencies option deduction with conflict detection, following the suggestions given in conan-io/conan#19692
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #838 +/- ##
=======================================
Coverage 91.36% 91.36%
=======================================
Files 235 235
Lines 28686 28686
=======================================
+ Hits 26209 26210 +1
+ Misses 2477 2476 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Key Changes
1. Shift from Deduction to Detection in
conanfile.pylibzip,libcurl,openssl, etc.) to beshared=Truebased on Celix options has been removed.validate()Logic: A new validation loop was added to thevalidate()method. It checks if the current configuration (e.g.,build_utils=True) matches the actual state of the dependencies.libcurlis static but Celix needs it shared), Conan now throws aConanInvalidConfigurationerror with a clear message explaining which Celix option requires which dependency setting.2. Infrastructure & Workflow Updates
ubuntu.yml,macos.yml) were updated to explicitly pass-o *:shared=Trueand-o mosquitto/*:broker=True. This ensures that the CI environment continues to use the correct shared library configurations.dev_celix_with_clion.md) were updated to reflect Conan 2.x usage.Why this change was made
Automatic dependency option deduction is both expensive (NP-hard) and completely broken (for conan 2.x). There is a known limitation in Conan 2, where attempting to modify dependency options from a downstream package (Celix) can lead to graph inconsistencies or unexpected behavior. By moving to "conflict detection," the responsibility of providing a compatible graph is shifted to the user (or the CI profile), while the
conanfile.pyacts as a guard to ensure requirements are met before building.Note that to make dependency option deduction to work in my day job, we have to patch Conan 1.x (without any upstream blessing) to redraw the dependency graph wherever an option conflict is encountered. Therefore, it is slow with hundreds of packages, each of which can have dozens of options.
Verification of the Change
This PR implemented this following suggestions from a Conan issue (conan-io/conan#19692), ensuring that the Celix recipe is more robust and compliant with modern Conan standards.