Skip to content
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

Remove manual cargo:rerun-if-changed when building protos #5750

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

pronebird
Copy link
Contributor

@pronebird pronebird commented Feb 1, 2024

It seems that tonic_build::compile_protos() already injects "cargo:rerun-if-changed" statements for cargo: https://github.com/hyperium/tonic/blob/v0.10.0/tonic-build/src/prost.rs#L40

If you run cargo build -vv you'll see the following statements already added by tonic_build:

[mullvad-management-interface 0.0.0] cargo:rerun-if-changed=proto/management_interface.proto
[mullvad-management-interface 0.0.0] cargo:rerun-if-changed=proto

Hence no need to do that manually.


This change is Reviewable

Copy link
Member

@faern faern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice little improvement! We have five invocations of tonic_build::compile_protos in this git repository. Would you mind fixing all of them?

@pronebird
Copy link
Contributor Author

@faern sure, patched all invocations of tonic_build

@pronebird
Copy link
Contributor Author

Can't say why nightly is failing. Perhaps needs a re-run.

@faern faern merged commit 9c7888a into mullvad:main Feb 6, 2024
5 of 6 checks passed
@faern
Copy link
Member

faern commented Feb 6, 2024

Merged! Thank you for the simplification :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants