setup-protoc icon indicating copy to clipboard operation
setup-protoc copied to clipboard

New protobuf versionning scheme such as 21.1 is not supported

Open ajasmin opened this issue 3 years ago • 4 comments

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

ajasmin avatar Jun 10 '22 00:06 ajasmin

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

r-plus avatar Aug 21 '22 15:08 r-plus

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.

imjasonh avatar Aug 22 '22 17:08 imjasonh

Can this issue get some love?

jduan-highnote avatar Sep 28 '22 22:09 jduan-highnote

@per1234 any update? 🌹

vvakame avatar Oct 17 '22 11:10 vvakame

I looked into this a little, and I think there are two reasonable approaches:

  1. Re-normalize versions like 21.11 into 3.21.11 for semver purposes, but otherwise keep them the same for release discover;
  2. The same, but re-normalize into 21.11.0 instead.

(2) is probably more correct, but I think either would work. I'll take a stab at this in a little bit.

woodruffw avatar Dec 16 '22 20:12 woodruffw

Opened #58 with my attempted fix. I've only tested it with the new-style versions so far, but it works correctly for me.

woodruffw avatar Dec 16 '22 21:12 woodruffw

Released in https://github.com/arduino/setup-protoc/releases/tag/v2.0.0 Feel free to upgrade at @v2 :smile:

alessio-perugini avatar May 31 '23 08:05 alessio-perugini