Skip to content

Comments

fix: move proto code generation output to OUT_DIR, out of tree#1703

Draft
drahnr wants to merge 3 commits intonextfrom
bernhard-externalize-protobuf-artifacts
Draft

fix: move proto code generation output to OUT_DIR, out of tree#1703
drahnr wants to merge 3 commits intonextfrom
bernhard-externalize-protobuf-artifacts

Conversation

@drahnr
Copy link
Contributor

@drahnr drahnr commented Feb 24, 2026

Motivation

It's considered bad practice to commit bad practice to commit generated files into the source tree, the decision predates me.
We're effectively dropping 10k from our codebase and avoid a little friction on changes in protobuf.
Any decent editor that's using rust-analyzer can resolve include! directives, so the location isn't relevant anymore.

Note

We have a bit of machinery built around the proto generation, so I kept the integration bits by using the generated/mod.rs to pull in concat!(env!(OUT_DIR), "/generated/..*") files. The main purpose is to minimize the already gigantic changeset and avoid having to adapt import paths across the repository.

Open Questions

While this is desirable in principle, it implies

Side effects

We are effectively dropping the special casing of docs.rs builds based on BUILD_PROTO=1

@drahnr drahnr added no changelog This PR does not require an entry in the `CHANGELOG.md` file labels Feb 24, 2026
@drahnr drahnr requested a review from sergerad February 24, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant