RosLibRust / roslibrust

An async first rust client for ROS1 native and rosbridge.
https://docs.rs/roslibrust
MIT License
50 stars 6 forks source link

Build.rs Change Detection Should be Directory Based #193

Open Carter12s opened 3 months ago

Carter12s commented 3 months ago

If the path points to a directory, it will scan the entire directory for any modifications.

Currently our recommend approach to message generation is the build.rs file in example-package. However, this does not automatically detect NEW message files being added to the ROS search paths.

https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed

Says that if we emit folders instead of specific files, cargo will re-run if "any" modification occurs.

We should test this behavior and if it does what it says on the side of the box, we should switch to specifying paths.

ALSO (maybe a different issue):

https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-env-changed <- allows us to trigger message generation if ROS_PACKAGE_PATH is changed...