setup-protoc
setup-protoc copied to clipboard
New protobuf versionning scheme such as 21.1 is not supported
Describe the problem
Protobuf has recently changed its versioning scheme. The release after 3.20 is named 21.0.
To reproduce
Sample workflow:
- name: install protoc
uses: arduino/setup-protoc@master
with:
version: 21.1
Expected behavior
protoc --version shows 3.21.1
'arduino/setup-protoc' version
v1
Additional context
No response
Issue checklist
- [X] I searched for previous reports in the issue tracker
- [X] I verified the problem still occurs when using the latest version
- [X] My report contains all necessary details
New version scheme is no longer using semver. So semver validation is invalid for newly versions.
Refs:
- https://github.com/protocolbuffers/protobuf/issues/10309
- https://developers.google.com/protocol-buffers/docs/news/2022-05-06#versioning
Am I reading correctly that there's effectively no way to get setup-protoc to install anything after v3.20.1, which is the latest default stable release, according to setup-protoc's criteria?
I've tried lots of different permutations on the version, and either get v3.20.1 if version is unset, or unable to get latest version if I specify anything else.
Can this issue get some love?
@per1234 any update? 🌹
I looked into this a little, and I think there are two reasonable approaches:
- Re-normalize versions like
21.11into3.21.11for semver purposes, but otherwise keep them the same for release discover; - The same, but re-normalize into
21.11.0instead.
(2) is probably more correct, but I think either would work. I'll take a stab at this in a little bit.
Opened #58 with my attempted fix. I've only tested it with the new-style versions so far, but it works correctly for me.
Released in https://github.com/arduino/setup-protoc/releases/tag/v2.0.0
Feel free to upgrade at @v2 :smile: