hedera-sdk-rust icon indicating copy to clipboard operation
hedera-sdk-rust copied to clipboard

fix: Prevent proto package recompiling on every build

Open tr11 opened this issue 11 months ago • 4 comments

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

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

tr11 avatar May 03 '25 16:05 tr11

@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

gsstoykov avatar May 09 '25 07:05 gsstoykov

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 ( https://github.com/hiero-ledger/hiero-sdk-rust/pull/864 ) but it broke a few months later and we haven't had the chance to fix it again. Thanks @tr11.

mehcode avatar Aug 09 '25 18:08 mehcode

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

gsstoykov avatar Aug 15 '25 10:08 gsstoykov

Formatting updated and rebased to the 0.40 version.

tr11 avatar Sep 05 '25 16:09 tr11