Skip to content
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

Support for zenoh features #715

Merged

Conversation

DenisBiryukov91
Copy link
Contributor

Support for zenoh features
Closes #626

Copy link

PR missing one of the required labels: {'bug', 'documentation', 'enhancement', 'internal', 'new feature', 'breaking-change', 'dependencies'}

@DenisBiryukov91 DenisBiryukov91 added the enhancement New feature or request label Sep 24, 2024
@DenisBiryukov91 DenisBiryukov91 force-pushed the support-for-zenoh-features branch from 5195843 to e62e278 Compare September 24, 2024 10:12
- name: Run clippy
run: cargo clippy --all-targets --all-features -- --deny warnings
- name: Run clippy without default features
run: cargo clippy --all-targets --no-default-features --features unstable,shared-memory -- --deny warnings
Copy link
Contributor

Choose a reason for hiding this comment

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

if "without default features" then why unstable and shared-memory features are enabled?

Copy link
Contributor Author

@DenisBiryukov91 DenisBiryukov91 Sep 24, 2024

Choose a reason for hiding this comment

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

Default features are those of zenoh, so we do not really have any code behind them - so clippy will only lint zenoh code (also --all-features does not work on windows). On the other hand we have a lot of zenoh-c code behind unstable and shared-memory features which we want to lint.

CMakeLists.txt Outdated
if (("${cargo_flags}" MATCHES ^.*shared-memory.*$) AND NOT(ZENOHC_BUILD_WITH_SHARED_MEMORY))
set(ZENOHC_BUILD_WITH_SHARED_MEMORY TRUE)
message(STATUS "Due to ZENOHC_CARGO_FLAGS setting ZENOHC_BUILD_WITH_SHARED_MEMORY = TRUE")
elseif(ZENOHC_BUILD_WITH_SHARED_MEMORY)
Copy link
Contributor

Choose a reason for hiding this comment

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

Conditions can be simplified:

if(ZENOHC_BUILD_WITH_SHARED_MEMORY)
    ...
elseif("${cargo_flags}" MATCHES ^.*shared-memory.*$)
    ...
endif()

CMakeLists.txt Outdated
set(cargo_flags ${cargo_flags} --features=shared-memory)
endif()

if(ZENOHC_BUILD_WITH_UNSTABLE_API)
if (("${cargo_flags}" MATCHES ^.*unstable.*$) AND NOT(ZENOHC_BUILD_WITH_UNSTABLE_API))
Copy link
Contributor

Choose a reason for hiding this comment

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

See above

@yellowhatter yellowhatter merged commit 4935f8f into eclipse-zenoh:main Sep 25, 2024
17 checks passed
@DenisBiryukov91 DenisBiryukov91 deleted the support-for-zenoh-features branch December 16, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support all zenoh features
2 participants