-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
deps: update protobuf #70
Conversation
c42bf9e
to
ef8efcd
Compare
README.md
Outdated
Make sure you have `protoc` and | ||
[protoc-gen-go](https://developers.google.com/protocol-buffers/docs/reference/go-generated) | ||
installed: | ||
|
||
`git clone https://github.com/digitalbitbox/bitbox02-firmware.git` | ||
|
||
```sh | ||
rm -rf api/firmware/messages/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removes also generate.sh
. I would suggest to use rm -rf api/firmware/messages/*.proto
and rm -rf api/firmware/messages/*.go
or to move generate.sh
in another folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch! fixed
The module we used previouly, github.com/golang/protobuf/proto, is deprecated. See https://github.com/golang/protobuf/releases/tag/v1.5.2 and golang/protobuf#1306. We use the official succssor: ``` (fix imports) go get google.golang.org/protobuf/proto@v1.28.1 go mod tidy ``` The .pb.go generated files also needed to be updated with an updated protoc-gen-go: ``` go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1 ``` A new script was added to generate the files, as the `import_path=messages` flag seems to be removed in favour of the `M` flag, which unfortunately has to be specified for each .proto file :( ----------- In `BTCSign()`, the inputs are not copied anymore due to: ``` api/firmware/btc.go:300:20: cannot use &input (value of type **messages.BTCSignInputRequest) as *messages.BTCSignInputRequest value in struct literal (typecheck) BtcSignInput: &input, ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK!
The module we used previouly, github.com/golang/protobuf/proto, is
deprecated. See https://github.com/golang/protobuf/releases/tag/v1.5.2
and golang/protobuf#1306.
We use the official succssor:
The .pb.go generated files also needed to be updated with an updated
protoc-gen-go:
A new script was added to generate the files, as the
import_path=messages
flag seems to be removed in favour of theM
flag, which unfortunately has to be specified for each .proto file :(