Ensure OPP CDT models build before contracts#336
Open
huangminghuang wants to merge 1 commit into
Open
Conversation
heifner
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes the
contracts_project-buildExternalProject step depend directly onopp_cdt_models.protos.Why this is necessary
sysio.opregand other system contracts include the generated CDT protobuf headers frombuild/<config>/libraries/opp/generated-cdt. The parent build already created anopp_cdt_models.protostarget for those headers and attached it to the outercontracts_projecttarget, butcontracts_projectis anExternalProject.With Ninja, depending on the outer ExternalProject target is not enough to order the actual
contracts_project-buildstep. Ninja could schedule the contract sub-build before regenerating stale CDT protobuf headers. That happened locally:attestations.protocontainedACTION_TYPE_WITHDRAW,actor,wire_account, andSlashOperator, but the generated CDT header still had the olderACTION_TYPE_WITHDRAW_REMIT/op_addressshape. As a result,sysio.opregfailed to compile even though the proto source was correct.By adding the dependency to the generated ExternalProject build target itself,
contracts_project-buildnow waits foropp_cdt_models.protosbefore compiling contracts.Verification
contracts_project.build/debug/libraries/opp/generated-cdt/sysio/opp/attestations/attestations.pb.hppregenerated with the currentOperatorActionfields.The full build completed successfully.