-
Notifications
You must be signed in to change notification settings - Fork 108
[#1244] Make tunnel backend compilation opt-in #1245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[#1244] Make tunnel backend compilation opt-in #1245
Conversation
| [target.'cfg(not(target_os = "freebsd"))'.dependencies] | ||
| iceoryx2-tunnel-zenoh = { workspace = true, optional = true } | ||
| zenoh = { workspace = true } | ||
| iceoryx2-tunnel-zenoh = { path = '../iceoryx2-tunnel/zenoh', optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will potentially break for pubishing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elBoberido Maybe but it's not clear to me. But since the crates are publish individually, not as a workspace, maybe it works?
EDIT: I looked into it, you are probably correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can do this in our script:
- Publish
iceoryx2-tunnel-zenoh - Update this Cargo.toml to depend on the uploaded version in crates.io
- Publish this crate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have seen another solution somewhere. Need to find it.
| "Win32_System_SystemServices", | ||
| "Win32_System_ProcessStatus", | ||
| ] } | ||
| zenoh = { version = "1.3.4", features = ["default", "unstable"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be kept by making the dependency optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elBoberido I tried that, but even if the dependency is optional, it is built when running either of:
cargo build
cargo build --workspaceWith the approach in this PR, the dependency is only built when building the crate that uses it with the corresponding feature activated.
| iceoryx2-tunnel = { version = "0.7.0", path = "iceoryx2-tunnel/tunnel" } | ||
| iceoryx2-tunnel-backend = { version = "0.7.0", path = "iceoryx2-tunnel/backend" } | ||
| iceoryx2-tunnel-conformance-tests = { version = "0.7.0", path = "iceoryx2-tunnel/conformance-tests" } | ||
| iceoryx2-tunnel-zenoh = { version = "0.7.0", path = "iceoryx2-tunnel/zenoh" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might also be problematic for publishing
| serde_json = { workspace = true } | ||
| zenoh = { workspace = true } | ||
| serde_json = { version = "1.0", default-features = false, features = ["alloc"] } | ||
| zenoh = { version = "1.3.4", features = ["default", "unstable"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try to update zenoh to 1.7.1? Maybe there is no effort in this otherwise we do it later.
Notes for Reviewer
The zenoh tunnel backend
iceoryx2-tunnel-zenohis removed from the workspace and made an optional dependency to crates that use it (iceoryx2-cli).When the corresponding feature flag is enabled, the backend is compiled.
Building the workspace with
cargo build --workspacewill not build the backend.Pre-Review Checklist for the PR Author
Convert to draft)iox2-123-introduce-posix-ipc-example)[#123] Add posix ipc example)Tests follow the best practice for testingtask-list-completed)PR Reviewer Reminders
References
Closes #