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

Migrate v2 from github.com/golang/protobuf to google.golang.org/protobuf #107

Merged
merged 23 commits into from
Sep 13, 2022

Conversation

pdecks
Copy link
Contributor

@pdecks pdecks commented Aug 17, 2022

Notable changes between google.golang.org/protobuf and github.com/golang/protobuf:

  1. import_prefix is deprecated and go_package should be used instead
  2. the signature for proto.GetExtension(...,...) changed from (interface{}, error) to interface{}
  3. proto.GetExtension(pb, ext) now panics for nil, nil

@pdecks
Copy link
Contributor Author

pdecks commented Aug 19, 2022

I'm trying to figure out why the other protobuf library is being installed by make testdata-v2 🤔 (see check output)

Screen Shot 2022-08-19 at 12 13 18 PM

@pdecks
Copy link
Contributor Author

pdecks commented Aug 20, 2022

Made some progress, on cb8c28f debugging import_prefix error in make testdata command:

cd testdata/packages && \
set -e; for subdir in `find . -mindepth 1 -maxdepth 1 -type d | grep -v targets`; do \
	cd $subdir; \
	params=`cat params`; \
	protoc -I . -I .. \
		--plugin=protoc-gen-debug=../../../../../../bin/protoc-gen-debug \
		--debug_out=".:." \
		--go_out="paths=source_relative,$params:." \
		`find . -name "*.proto"`; \
	cd -; \
done
/home/runner/work/protoc-gen-star/protoc-gen-star/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages
/home/runner/work/protoc-gen-star/protoc-gen-star/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages
protoc-gen-go: no such flag -import_prefix
--go_out: protoc-gen-go: Plugin failed with status code 1.
make[1]: *** [Makefile:16: testdata-packages] Error 1
make[1]: Leaving directory '/home/runner/work/protoc-gen-star/protoc-gen-star/src/github.com/lyft/protoc-gen-star/v2/lang/go'

@pdecks pdecks marked this pull request as ready for review September 13, 2022 01:10
@pdecks pdecks merged commit 6a47fcc into master Sep 13, 2022
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.

None yet

2 participants