Skip to content

Send BSR module names to check plugins - #4718

Merged
pkwarren merged 4 commits into
mainfrom
pkw/bufplugin-module-name
Oct 6, 2026
Merged

pkwarren merged 4 commits into
mainfrom
pkw/bufplugin-module-name

Conversation

@pkwarren

@pkwarren pkwarren commented Oct 6, 2026

Copy link
Copy Markdown
Member

If available, pass BSR module names to check plugins as additional context. If the name in buf.yaml isn't a valid module name (fails protovalidate), ignore it and omit the module name.

Add an e2e test that verifies that module names make it to check plugins.

If available, pass BSR module names to check plugins as additional
context. If the name in buf.yaml isn't a valid module name (fails
protovalidate), ignore it and omit the module name.

Add an e2e test that verifies that module names make it to check
plugins.
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 6, 2026, 7:01 PM

name: buf.build/acme/weather
- path: unnamed
- path: invalid
name: buf.build/acme/x

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.

This is accepted as a name for local development but will fail if pushed to the BSR. https://github.com/bufbuild/bufplugin/blob/30a1a690760135168833b86885cebc29e83717ae/buf/plugin/descriptor/v1/module_name.proto#L29-L35 constrains this value.

var fileAnnotationSet bufanalysis.FileAnnotationSet
if !errors.As(err, &fileAnnotationSet) {
if errors.Is(err, context.Canceled) || ctx.Err() != nil {
if errors.Is(err, context.Canceled) {

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.

Can remove this workaround now that pluginrpc/pluginrpc-go#17 has landed upstream.

@pkwarren pkwarren changed the title Pass BSR module names to check plugins Send BSR module names to check plugins Oct 6, 2026
@pkwarren
pkwarren merged commit e94a918 into main Oct 6, 2026
10 checks passed
@pkwarren
pkwarren deleted the pkw/bufplugin-module-name branch October 6, 2026 19:09
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