Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
cmd/buf/buf
cmd/protoc-gen-buf-breaking/protoc-gen-buf-breaking
cmd/protoc-gen-buf-lint/protoc-gen-buf-lint
private/buf/cmd/buf/cache/
private/buf/cmd/buf/command/protoc/internal/protoc-gen-insertion-point-receiver/protoc-gen-insertion-point-receiver
private/buf/cmd/buf/command/protoc/internal/protoc-gen-insertion-point-writer/protoc-gen-insertion-point-writer
private/buf/cmd/buf/workspacetests/other/proto/workspacetest/cache/
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/cmd/buf/buf
/cmd/protoc-gen-buf-breaking/protoc-gen-buf-breaking
/cmd/protoc-gen-buf-lint/protoc-gen-buf-lint
/private/buf/cmd/buf/cache/
/private/buf/cmd/buf/command/protoc/internal/protoc-gen-insertion-point-receiver/protoc-gen-insertion-point-receiver
/private/buf/cmd/buf/command/protoc/internal/protoc-gen-insertion-point-writer/protoc-gen-insertion-point-writer
/private/buf/cmd/buf/workspacetests/other/proto/workspacetest/cache/
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add `--as-import-paths` flag to `ls-files` that strips local directory paths and prints file
paths as they are imported.
- Fix issue where groups used in custom options did not result in the same behavior as `protoc`.
- Fix issue where insertion points were not applied with respect to the configured output directory.

## [v1.0.0-rc2] - 2021-09-23

Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ require (
go.uber.org/multierr v1.7.0
go.uber.org/zap v1.19.1
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20211001092434-39dca1131b70 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/text v0.3.7 // indirect
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down
1 change: 0 additions & 1 deletion make/buf/all.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ FILE_IGNORES := $(FILE_IGNORES) \
.build/ \
.ctrlp \
.vscode/ \
private/buf/cmd/buf/cache/ \
private/buf/cmd/buf/workspacetests/other/proto/workspacetest/cache/ \
private/bufpkg/buftesting/cache/ \
private/pkg/storage/storageos/tmp/
Expand Down
21 changes: 20 additions & 1 deletion private/buf/bufgen/bufgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ func NewGenerator(
storageosProvider storageos.Provider,
registryProvider registryv1alpha1apiclient.Provider,
) Generator {
return newGenerator(logger, storageosProvider, registryProvider)
return newGenerator(
logger,
storageosProvider,
registryProvider,
)
}

// GenerateOption is an option for Generate.
Expand Down Expand Up @@ -161,6 +165,21 @@ type PluginConfig struct {
Strategy Strategy
}

// PluginName returns this PluginConfig's plugin name.
// Only one of Name or Remote will be set.
func (p *PluginConfig) PluginName() string {
if p == nil {
return ""
}
if p.Name != "" {
return p.Name
}
if p.Remote != "" {
return p.Remote
}
return ""
}

// ManagedConfig is the Managed Mode configuration.
type ManagedConfig struct {
CcEnableArenas *bool
Expand Down
Loading