Skip to content

fix: Prevent proto package recompiling on every build#941

Open
tr11 wants to merge 10 commits intohiero-ledger:mainfrom
tr11:fix-proto-recompiling
Open

fix: Prevent proto package recompiling on every build#941
tr11 wants to merge 10 commits intohiero-ledger:mainfrom
tr11:fix-proto-recompiling

Conversation

@tr11
Copy link
Copy Markdown

@tr11 tr11 commented May 3, 2025

Description:
Prevent the hedera and hedera-proto packages from recompiling on every built of dependent crates.

Related issue(s): None

Fixes #

Currently the proto package will trigger a recompilation of both hedera and hedera-proto packages even if nothing changed in the protobufs folder. This PR changes the emit_rerun_if_changed behavior before compiling the modified proto files from services folder to ensure reruns only trigger when there are modifications.

Notes for reviewer:

Test by compiling twice any crate dependent on this package.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@tr11 tr11 requested review from a team as code owners May 3, 2025 16:03
@tr11 tr11 requested review from RickyLB and Sheng-Long May 3, 2025 16:03
@gsstoykov
Copy link
Copy Markdown
Contributor

@tr11 Thanks for the contribution! DCO checks will fail when commits are not signed. Take a look at https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key

@tr11 tr11 force-pushed the fix-proto-recompiling branch 2 times, most recently from d9d6ce1 to 13639aa Compare May 9, 2025 22:27
tr11 added 2 commits May 9, 2025 18:28
Signed-off-by: Tiago Requeijo <tiago.requeijo.dev@gmail.com>
Signed-off-by: Tiago Requeijo <tiago.requeijo.dev@gmail.com>
@tr11 tr11 force-pushed the fix-proto-recompiling branch from 13639aa to 6f033d5 Compare May 9, 2025 22:28
@tr11 tr11 force-pushed the fix-proto-recompiling branch from fedcef3 to 1884cee Compare June 27, 2025 01:31
@mehcode
Copy link
Copy Markdown
Contributor

mehcode commented Aug 9, 2025

Can we please get this merged?

And if there is anyway to add a test to ensure this behavior isn't broken, can we please do that as well. Our team fixed this last year ( #864 ) but it broke a few months later and we haven't had the chance to fix it again. Thanks @tr11.

@gsstoykov
Copy link
Copy Markdown
Contributor

@mehcode @tr11 PR needs to be formatted. Will try to get this in ASAP.

@tr11 tr11 changed the title Prevent proto package recompiling on every build fix: Prevent proto package recompiling on every build Sep 5, 2025
tr11 added 3 commits September 5, 2025 12:16
Signed-off-by: Tiago Requeijo <tiago.requeijo.dev@gmail.com>
@tr11
Copy link
Copy Markdown
Author

tr11 commented Sep 5, 2025

Formatting updated and rebased to the 0.40 version.

@tr11 tr11 force-pushed the fix-proto-recompiling branch from 9956ac7 to 7600f80 Compare September 11, 2025 11:49
@tr11 tr11 requested a review from a team as a code owner September 11, 2025 11:49
@tr11 tr11 requested a review from PavelSBorisov September 11, 2025 11:49
@tr11 tr11 force-pushed the fix-proto-recompiling branch from 7600f80 to c35a582 Compare March 10, 2026 23:44
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.

3 participants