Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a config option to avoid passing include_source_info #1212

Merged
merged 4 commits into from
Dec 30, 2024

Conversation

kgrech
Copy link
Contributor

@kgrech kgrech commented Dec 27, 2024

Fixes #1213

We already support passing disable_comments to disable comment processing during the code generation.

However, when we compile FileDescriptorSet, we always pass --include_source_info. These might cause a problem, especially when the file is later included into the final binary using include_bytes! e.g. because of the following:

  • The comments might contain sensitive private information (comments + file location) which we don't want to be visible in the binary (e.g. when someone disassemble it).
  • It increases the size of the binary

Therefore, adding the skip_source_info argument allowing to disable it. Altnerative fix could be to add it protoc_args by default, but this is not backwards compatible, because protoc_args are currently additive only.

@LucioFranco LucioFranco added this pull request to the merge queue Dec 30, 2024
@LucioFranco LucioFranco removed this pull request from the merge queue due to a manual request Dec 30, 2024
Co-authored-by: David Barsky <me@davidbarsky.com>
LucioFranco and others added 2 commits December 30, 2024 10:57
Co-authored-by: David Barsky <me@davidbarsky.com>
@LucioFranco LucioFranco added this pull request to the merge queue Dec 30, 2024
Merged via the queue into tokio-rs:master with commit 68cf18a Dec 30, 2024
16 checks passed
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.

Make include_source_info protoc flag configurable
3 participants