eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
444 stars 22 forks source link

Remove error prone `Service::{list|does_exist}_with_custom_config` #238

Closed elfenpiff closed 1 week ago

elfenpiff commented 1 week ago

(Code) Example Of Cumbersome API

See title.

From @elBoberido I think this is error prone. A user should always explicitly provide a config. I think this is a general flaw in the API. everywhere a config is required it should explicitly be passed to the function. Worst case would be a line with let config = Config::get_global_config();. The way it is handled now makes it error prone when a user moves to a custom config and does not realize that instead of list, list_with_custom_config needs to be called.