Skip to content

Conversation

@gabrik
Copy link
Contributor

@gabrik gabrik commented Mar 13, 2025

This PR changes the behavior of the configuration parser to ignore unknown fields.
This allows to load the DDS plugin multiple times, and thus to connect to multiple DDS domains at once.
See how to load a plugin multiple times in Zenoh: eclipse-zenoh/zenoh#1060

@gabrik gabrik added the enhancement New feature or request label Mar 13, 2025
@gabrik gabrik requested a review from sashacmc March 13, 2025 07:06
@gabrik gabrik self-assigned this Mar 13, 2025
@JEnoch
Copy link
Member

JEnoch commented Mar 13, 2025

The drawback of this change will be that a typo in the config will be silently ignored. This could lead to lot of confusions.

@gabrik
Copy link
Contributor Author

gabrik commented Mar 13, 2025

The drawback of this change will be that a typo in the config will be silently ignored. This could lead to lot of confusions.

I agree, but I did not find a way to let serde emit a warn when the field is not known.

Another solution can be to remove all the fields like __<something>__ before passing the configuration to plugins.
But this needs to be done in Zenoh code.

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.

4 participants