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

remove default_opts from buf.plugin.yaml #1582

Merged
merged 4 commits into from
Nov 10, 2022

Conversation

pkwarren
Copy link
Member

After using buf.plugin.yaml for a bit, we discovered that 'default_opts' had more potential to confuse users than make their lives easier. It also was unclear how a user could reset options to no options if a plugin used 'default_opts'.

As a result, we've migrated to remove all use of 'default_opts' so a plugin behaves the same when executed locally or remotely in buf.gen.yaml. We also make use of the 'opts' field under 'registry:' to set appropriate options for generated code by the Go module proxy or NPM registries.

After using buf.plugin.yaml for a bit, we discovered that 'default_opts'
had more potential to confuse users than make their lives easier. It
also was unclear how a user could reset options to no options if a
plugin used 'default_opts'.

As a result, we've migrated to remove all use of 'default_opts' so a
plugin behaves the same when executed locally or remotely in
buf.gen.yaml. We also make use of the 'opts' field under 'registry:' to
set appropriate options for generated code by the Go module proxy or NPM
registries.
Copy link
Member

@mfridman mfridman left a comment

Choose a reason for hiding this comment

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

I'd still suggest reordering the fields, but otherwise this lgtm!

@pkwarren pkwarren merged commit 35fde3e into main Nov 10, 2022
@pkwarren pkwarren deleted the pkw/BSR-794-remove-default-opts branch November 10, 2022 21:54
Monirul1 pushed a commit to Monirul1/buf that referenced this pull request Apr 30, 2023
After using buf.plugin.yaml for a bit, we discovered that 'default_opts'
had more potential to confuse users than make their lives easier. It
also was unclear how a user could reset options to no options if a
plugin used 'default_opts'.

As a result, we've migrated to remove all use of 'default_opts' so a
plugin behaves the same when executed locally or remotely in
buf.gen.yaml. We also make use of the 'opts' field under 'registry:' to
set appropriate options for generated code by the Go module proxy or NPM
registries.
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