[#1958] Add configurable Cargo build warning - #1959
Conversation
elBoberido
left a comment
There was a problem hiding this comment.
The PR is fine. This option was actually meant to make the life of the developers easier. I still don't fully understand the use case for production build, but that's fine. For example, the CLI tools are not build with the cmake build and one would still need to invoke cargo. But if it makes life easier, then I'm all for merging the PR.
You might need to sign the ECA. If you already did, it might take some time to sync everything and make the CI happy.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1959 +/- ##
==========================================
- Coverage 76.53% 76.51% -0.03%
==========================================
Files 452 452
Lines 46046 46046
Branches 1489 1489
==========================================
- Hits 35243 35230 -13
- Misses 9541 9554 +13
Partials 1262 1262
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@jcfr friendly ping. Did you have time to look into the issue with the ECA? You also need to rebase the branch in order to fix the merge conflict. |
Notes for Reviewer
This adds the opt-in CMake option
IOX2_SUPPRESS_CARGO_BUILD_WARNING. It defaults toOFF, preserving the existing warning unchanged. When enabled, the same diagnostic is emitted as a status message so embedding projects that intentionally use the Cargo source-build path can acknowledge that policy without carrying a downstream patch.The change affects diagnostic severity only. Cargo target selection, build flags, generated build recipes, artifacts, and installation behavior are unchanged.
No corresponding Bazel change is needed: Bazel builds Rust targets directly through
rules_rustand has neither the CMakeRUST_BUILD_ARTIFACT_PATHchoice nor an equivalent Cargo source-build warning.Focused validation covered three configurations:
IOX2_SUPPRESS_CARGO_BUILD_WARNING=ON: configure succeeds, emits the diagnostic as status, and emits no CMake warning.IOX2_SUPPRESS_CARGO_BUILD_WARNING=ONwithRUST_BUILD_ARTIFACT_PATH: configure succeeds and emits neither Cargo source-build diagnostic.The generated
iceoryx2-ffi-c-build-steprecipes for the default and opt-in Cargo configurations are identical after normalizing their build-directory paths.git diff --checkalso passes.Pre-Review Checklist for the PR Author
Convert to draft)iox2-123-introduce-posix-ipc-example)[#123] Add posix ipc example)PR Reviewer Reminders
References
Closes #1958