arduino/setup-protoc

New protobuf versionning scheme such as 21.1 is not supported

ajasmin opened this issue · 7 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

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

New version scheme is no longer using semver.
So semver validation is invalid for newly versions.

Refs:

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:

  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.

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 😄