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

bufmod: Move proto -> proto/buf #2646

Closed
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
2 changes: 1 addition & 1 deletion buf.work.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version: v1
directories:
- proto
- proto/buf
4 changes: 2 additions & 2 deletions make/buf/all.mk
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ bufgenerateclean:: \

.PHONY: bufgenerateprotogo
bufgenerateprotogo:
$(BUF_BIN) generate proto --template data/template/buf.go.gen.yaml
$(BUF_BIN) generate proto/buf --template data/template/buf.go.gen.yaml
$(BUF_BIN) generate buf.build/grpc/grpc --type grpc.reflection.v1.ServerReflection --template data/template/buf.go.gen.yaml

.PHONY: bufgenerateprotogoclient
bufgenerateprotogoclient:
$(BUF_BIN) generate proto --template data/template/buf.go-client.gen.yaml
$(BUF_BIN) generate proto/buf --template data/template/buf.go-client.gen.yaml

.PHONY: bufgeneratebuflinttestdata
bufgeneratebuflinttestdata:
Expand Down
16 changes: 9 additions & 7 deletions private/bufpkg/bufwkt/cmd/wkt-go-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,18 @@ func getProtosourceFiles(
container appflag.Container,
bucket storage.ReadBucket,
) ([]protosource.File, error) {
// TODO: why is this not working? this is the path that should be used, not NewModuleForBucket
//module, err := bufmodulebuild.NewModuleBucketBuilder(container.Logger()).BuildForBucket(
//ctx,
//bucket,
//&bufmoduleconfig.Config{},
//)
module, err := bufmodule.NewModuleForBucket(ctx, bucket)
moduleSet, err := bufmodule.NewModuleSetBuilder(
ctx,
bufmodule.NopModuleDataProvider,
).AddLocalModule(
bucket,
".",
true,
).Build()
if err != nil {
return nil, err
}
module := bufmodule.ModuleSetToModuleReadBucketWithOnlyProtoFiles(moduleSet)
image, fileAnnotations, err := bufimage.BuildImage(
ctx,
module,
Expand Down
File renamed without changes.
File renamed without changes.
Loading