Skip to content

Conversation

@copybara-service
Copy link

Declare go_package in cpp_features.proto

Without a go_package, users of Go Protobuf cannot generate code (.pb.go)
for files that import cpp_features.proto, as protoc-gen-go will error out:

test.proto:6:1: warning: Import google/protobuf/cpp_features.proto is unused.
protoc-gen-go: unable to determine Go import path for "google/protobuf/cpp_features.proto"

Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.

See https://protobuf.dev/reference/go/go-generated#package for more information.
--go_out: protoc-gen-go: Plugin failed with status code 1.

Without a go_package, users of Go Protobuf cannot generate code (.pb.go)
for files that import cpp_features.proto, as protoc-gen-go will error out:

> test.proto:6:1: warning: Import google/protobuf/cpp_features.proto is unused.
> protoc-gen-go: unable to determine Go import path for "google/protobuf/cpp_features.proto"
>
> Please specify either:
> 	• a "go_package" option in the .proto source file, or
> 	• a "M" argument on the command line.
>
> See https://protobuf.dev/reference/go/go-generated#package for more information.
> --go_out: protoc-gen-go: Plugin failed with status code 1.

PiperOrigin-RevId: 825991096
@copybara-service copybara-service bot closed this Nov 4, 2025
@copybara-service copybara-service bot deleted the test_825991096 branch November 4, 2025 09:04
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