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

build: include go_package mapping for csi.proto #55

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

nixpanic
Copy link
Contributor

Generating Go code from the .proto files gives a deprecation warning when csi.proto is imported. By passing the M option on the commandline to the generators, the warning is addressed.

See-also: https://developers.google.com/protocol-buffers/docs/reference/go-generated#package

@nixpanic
Copy link
Contributor Author

The warning can be observed in recent (successful) executions of the protoc workflow:

# generate libs
cd .. && ./bin/protoc --go_out=lib/go --go_opt=paths=source_relative --plugin=./bin/protoc-gen-go replication/replication.proto
2023/06/28 13:11:22 WARNING: Deprecated use of 'go_package' option without a full import path in "github.com/container-storage-interface/spec/lib/go/csi/csi.proto", please specify:
	option go_package = "github.com/container-storage-interface/spec/lib/go/csi";
A future release of protoc-gen-go will require the import path be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.

cd .. && ./bin/protoc --go-grpc_out=lib/go --go-grpc_opt=paths=source_relative --plugin=./bin/protoc-gen-go-grpc replication/replication.proto
2023/06/28 13:11:22 WARNING: Deprecated use of 'go_package' option without a full import path in "github.com/container-storage-interface/spec/lib/go/csi/csi.proto", please specify:
	option go_package = "github.com/container-storage-interface/spec/lib/go/csi";
A future release of protoc-gen-go will require the import path be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.

Runs with this PR do not have these warnings anymore.

Generating Go code from the .proto files gives a deprecation warning
when `csi.proto` is imported. By passing the `M` option on the
commandline to the generators, the warning is addressed.

See-also: https://developers.google.com/protocol-buffers/docs/reference/go-generated#package
Signed-off-by: Niels de Vos <[email protected]>
@mergify mergify bot merged commit b1af554 into csi-addons:main Jun 29, 2023
6 checks passed
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