eclipse-zenoh / zenoh

zenoh unifies data in motion, data in-use, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.
https://zenoh.io
Other
1.44k stars 151 forks source link

`zenohd`'s directory is the last searched path for plugin loading #1236

Closed fuzzypixelz closed 2 weeks ago

fuzzypixelz commented 2 months ago

Describe the bug

/example/path/to/zenohd searches for plugins in the following order:

  1. $PWD
  2. $HOME/.zenoh/lib
  3. /opt/homebrew/lib
  4. /usr/local/lib
  5. /usr/lib
  6. /example/path/to

This is because the search path Vec is ordered from first to last searched path, but (6) is inserted at the end here:

https://github.com/eclipse-zenoh/zenoh/blob/9e1c4a8680a04b34f09dd2776d07958c8aae6f92/commons/zenoh-util/src/lib_loader.rs#L73-L87

To reproduce

  1. touch libzenoh_plugin_rest.dylib
  2. cargo run --bin zenohd

System info

fuzzypixelz commented 2 weeks ago

Resolved in https://github.com/eclipse-zenoh/zenoh/pull/1278.