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

Hide zenoh_config internals #1419

Merged
merged 16 commits into from
Sep 17, 2024
Merged

Hide zenoh_config internals #1419

merged 16 commits into from
Sep 17, 2024

Conversation

fuzzypixelz
Copy link
Member

@fuzzypixelz fuzzypixelz commented Sep 13, 2024

Addresses #1417 and #1304 with the following changes:

  • Replace zenoh::Config with zenoh::config::Config leaving zenoh_config::Config unchanged.
  • Add a new zenoh_config::Config with the following public items:
    • Default, Debug, Clone and Default impls
    • Deref<Target = InternalConfig> and DerefMut<Target = InternalConfig> impls with cfg(feature = "unstable_config")]
    • from_env, from_file, insert_json5, get and remove
  • Reduce zenoh::config to the following public items:
    • Config
    • InsertionError
    • LookupError
    • LookupGuard
    • WhatAmI (for zenoh::scout)
    • WhatAmIMatcher (for zenoh::scout)
    • Notifier (for zenoh::Session::config)
    • Notification (for zenoh::config::Notifier)
  • Move Notifier to the zenoh crate with the following API:
    • new (not sure about this one)
    • subscribe
    • notify
    • lock
    • remove
    • insert_json5
    • get

Older code using the zenoh_config::Config API will still compile provided that items such as ModeDependentValue are imported from zenoh_config.


I believe the Config API changes is ready to be propagated to bindings. Here are CI runs to know what's going wrong:

@fuzzypixelz fuzzypixelz force-pushed the internal-config branch 2 times, most recently from 194d58b to 034dad8 Compare September 13, 2024 15:55
@fuzzypixelz fuzzypixelz added bug Something isn't working breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime) labels Sep 13, 2024
@fuzzypixelz fuzzypixelz self-assigned this Sep 13, 2024
@eclipse-zenoh eclipse-zenoh deleted a comment from github-actions bot Sep 13, 2024
@eclipse-zenoh eclipse-zenoh deleted a comment from github-actions bot Sep 13, 2024
@eclipse-zenoh eclipse-zenoh deleted a comment from github-actions bot Sep 13, 2024
@fuzzypixelz fuzzypixelz changed the title Make configuration structure internal Hide zenoh_config internals Sep 16, 2024
@fuzzypixelz fuzzypixelz force-pushed the internal-config branch 3 times, most recently from fd76a91 to e23527b Compare September 16, 2024 09:01
@fuzzypixelz fuzzypixelz force-pushed the internal-config branch 5 times, most recently from 3b9d8fb to 984f955 Compare September 16, 2024 12:40
@fuzzypixelz fuzzypixelz requested a review from wyfo September 16, 2024 12:40
@fuzzypixelz fuzzypixelz force-pushed the internal-config branch 3 times, most recently from ae0bf38 to 95b9d1e Compare September 16, 2024 13:15
@fuzzypixelz fuzzypixelz marked this pull request as ready for review September 16, 2024 13:39
zenoh/src/api/config.rs Outdated Show resolved Hide resolved
zenoh/src/api/config.rs Outdated Show resolved Hide resolved
zenoh/src/api/config.rs Outdated Show resolved Hide resolved
@fuzzypixelz fuzzypixelz enabled auto-merge (squash) September 17, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime) bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants