-
Notifications
You must be signed in to change notification settings - Fork 173
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
Zenoh: Fix badly behaved build.rs scripts. #885
Conversation
* Zenoh: Fix badly behaved build.rs scripts. build.rs should only ever modify OUT_DIR. These scripts were modifying local files which caused a git index update which caused them to rebuild due to the git-version appearing out of date.
Thanks for your contribution @chachi! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Please run cargo fmt
and commit the changes.
Fixed! |
Hi @chachi, thanks for the fix. This is, as you pointed out, not a recommended practice which led to some internal issues: #897 @milyin @fuzzypixelz what's your take? |
I would either:
|
No problem. Let me know if I should make any changes to this PR or you'd like to take it from here. Happy to help! |
Yes, please do update this PR if you can. I suggest going with option (2), failing the build when the config schema file doesn't match the |
See #885 Instead of writing out the result of the parsing of the schema, after this change the build of the plugins will simply fail. * plugins/zenoh-plugin-rest/build.rs: - don't write out the result of the parsing of the schema in zenoh-plugin-rest/config_schema.json5, - if the schema does not match the default config.json5, panic. * plugins/zenoh-plugin-storage-manager/build.rs: - don't write out the result of the parsing of the schema in zenoh-plugin-storage-manager/config_schema.json5, - if the schema does not match the default config.json5, panic. Signed-off-by: Julien Loudet <[email protected]>
See #939 |
See #885 Instead of writing out the result of the parsing of the schema, after this change the build of the plugins will simply fail. * plugins/zenoh-plugin-rest/build.rs: - don't write out the result of the parsing of the schema in zenoh-plugin-rest/config_schema.json5, - if the schema does not match the default config.json5, panic. * plugins/zenoh-plugin-storage-manager/build.rs: - don't write out the result of the parsing of the schema in zenoh-plugin-storage-manager/config_schema.json5, - if the schema does not match the default config.json5, panic. Signed-off-by: Julien Loudet <[email protected]>
build.rs should only ever modify OUT_DIR. These scripts were modifying local files which caused a git index update which caused them to rebuild due to the git-version appearing out of date.