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

Fix shared module read bucket for proto file refs and include_package_files #3512

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions private/bufpkg/bufmodule/module_read_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,12 @@ func (b *moduleReadBucket) getIsTargetFileForPathUncached(ctx context.Context, p
// We've now deferred having to get fastscan.Results as much as we can.
protoFileTargetFastscanResult, err := b.getFastscanResultForPath(ctx, b.protoFileTargetPath)
if err != nil {
// In the case where multiple modules may have shared module roots through the includes key
// in the module configs, the protoFileTargetPath may not exist in the target module.
// In that case, we just return false.
if errors.Is(err, fs.ErrNotExist) {
return false, nil
}
return false, err
}
if protoFileTargetFastscanResult.PackageName == "" {
Expand Down
Loading