PengZheng opened a new pull request, #838: URL: https://github.com/apache/celix/pull/838
### Key Changes #### 1. Shift from Deduction to Detection in `conanfile.py` * **Removed Automatic Option Setting**: The code that used to force dependencies (like `libzip`, `libcurl`, `openssl`, etc.) to be `shared=True` based on Celix options has been removed. * **Implemented `validate()` Logic**: A new validation loop was added to the `validate()` method. It checks if the current configuration (e.g., `build_utils=True`) matches the actual state of the dependencies. * **Detailed Error Reporting**: If a dependency is not configured as required (e.g., if `libcurl` is static but Celix needs it shared), Conan now throws a `ConanInvalidConfiguration` error with a clear message explaining which Celix option requires which dependency setting. #### 2. Infrastructure & Workflow Updates * **CI Configuration**: Since Conan no longer automatically sets these options, the GitHub Actions workflows (e.g., `ubuntu.yml`, `macos.yml`) were updated to explicitly pass `-o *:shared=True` and `-o mosquitto/*:broker=True`. This ensures that the CI environment continues to use the correct shared library configurations. * **Documentation**: The building instructions (e.g., `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). This 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.py` acts 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 (and thus it is slow with hundreds of package, each of which can have dozens of options). And it never works for Conan 2.x. ### Verification of the Change This PR implemented this following suggestions from a Conan issue ([conan-io/conan#19692](https://github.com/conan-io/conan/issues/19692)), ensuring that the Celix recipe is more robust and compliant with modern Conan standards. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
