Skip to content

Generate PreconditionFailure - #2333

Merged
palfrey merged 1 commit into
TraceMachina:mainfrom
palfrey:precondition-generate
May 14, 2026
Merged

palfrey merged 1 commit into
TraceMachina:mainfrom
palfrey:precondition-generate

Conversation

@palfrey

@palfrey palfrey commented May 14, 2026 •

Copy link
Copy Markdown
Member

Description

nativelink-util/src/precondition_failure.rs had a hardcoded copy of PreconditionFailure when we've done all the other gRPC messages via generation from .proto files. This PR redoes it with that mechanism, and then uses the existing TypeUrl trait to be able to put the TYPE_URL constant in a slightly more organised location.

Type of change

Please delete options that aren't relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

bazel test //...

Checklist

  • Updated documentation if needed
  • Tests added/amended
  • bazel test //... passes locally
  • PR is contained in a single commit, using git amend see some docs

This change is Reviewable

name = "doc_test",
timeout = "short",
crate = ":nativelink-proto",
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For some annoying reason, the new proto makes some things that look like doc tests, but fail. Given all the code is generic generated code, it shouldn't really have any doc tests anyways.

@palfrey
palfrey force-pushed the precondition-generate branch 2 times, most recently from 9a06d0a to 68aa158 Compare May 14, 2026 14:47
@palfrey
palfrey force-pushed the precondition-generate branch from 68aa158 to 7dab4e9 Compare May 14, 2026 15:30
@palfrey
palfrey marked this pull request as ready for review May 14, 2026 15:54

@MarcusSorealheis MarcusSorealheis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should have done this but iteration is most important.

@palfrey
palfrey merged commit b1cea14 into TraceMachina:main May 14, 2026
42 checks passed
@palfrey
palfrey deleted the precondition-generate branch May 14, 2026 16:07
rejuvenile pushed a commit to rejuvenile/nativelink that referenced this pull request Aug 19, 2026
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