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

the access to Config elements is internal now, add this to migration guide #1565

Closed
milyin opened this issue Oct 27, 2024 · 2 comments
Closed
Assignees
Labels
release Part of the next release

Comments

@milyin
Copy link
Contributor

milyin commented Oct 27, 2024

Describe the release item

From @kydos

the following code does not compile:

fn main() {
    let mut c = zenoh::Config::default();
    c.set_mode(zenoh::config::WhatAmI::Client);
}

Found the issue, in 1.0.0 these APIs are internal and need to be activated via:
zenoh = { version = "1.0.0", features = ["internal", "internal_config"] }
We should have this on the Migration Guide.

@milyin milyin added the release Part of the next release label Oct 27, 2024
@fuzzypixelz fuzzypixelz self-assigned this Oct 28, 2024
@Mallets
Copy link
Member

Mallets commented Oct 28, 2024

The API is marked as internal, so I'm not sure it should be covered in the migration guide.
IMHO it would be better to use insert_json5 API also in our examples and eventually adding a dedicated examples showing how to programmatically configuring zenoh.

@samcarey
Copy link

samcarey commented Nov 1, 2024

it would be better to use insert_json5

Why is insert_json5 being promoted for manipulating a Rust struct?
Why not use setter methods for the individual fields, so the inserted fields and values are type-checked at compile time instead of being parsed from strings at runtime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Part of the next release
Projects
Status: Done
Development

No branches or pull requests

4 participants