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 additional options for generating imports #243

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Conversation

smaye81
Copy link
Member

@smaye81 smaye81 commented Dec 5, 2024

Including imports is not enabled by default in the Buf CLI. As a result, users have been getting tripped up on generating code when they have dependencies on protovalidate.

This adds some additional guidance in our generating code docs to make sure they include imports since these should essentially always be included when generating with Protobuf-ES.

@smaye81 smaye81 requested a review from timostamm December 5, 2024 16:15
Copy link

vercel bot commented Dec 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
connect ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2024 4:29pm

Comment on lines 107 to 108
# Also generate any well-known type dependencies
include_wkt: true
Copy link
Member

Choose a reason for hiding this comment

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

Can you give an example for why this is useful?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually just realized we probably don't need that in the docs and should probably just use include_imports. Will update

@smaye81 smaye81 force-pushed the sayers/add_addl_opts branch from 57fac02 to 14a11ca Compare December 5, 2024 16:29
@smaye81 smaye81 requested a review from timostamm December 5, 2024 16:29
@smaye81 smaye81 changed the title Add additional options for generating WKT and imports Add additional options for generating imports Dec 5, 2024
@smaye81 smaye81 merged commit d69a15c into main Dec 5, 2024
6 checks passed
@smaye81 smaye81 deleted the sayers/add_addl_opts branch December 5, 2024 16:59
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