actions-setup-cmake icon indicating copy to clipboard operation
actions-setup-cmake copied to clipboard

Fail to install fully specified cmake-version `2.8.12.2`

Open bjosv opened this issue 2 years ago • 1 comments

When requesting a setup of CMake 2.8.12.2 the following error is seen:

Run jwlawson/actions-setup-cmake@v1
  with:
    cmake-version: 2.8.12.2
    github-api-token: ***
    use-32bit: false
Error: Unable to find version matching 2.8.12.2

but when requesting 2.8.12 the installed CMake version is 2.8.12.2 as wanted. In this case the installed version seems to be preferred over the existing 2.8.12 release, seen in https://cmake.org/files/v2.8/

Is this expected?

I have also noticed that CMakes 2.8.12.1 and 2.8.12.2 releases are some odd animals and might be the only ones that are not following semantic versioning. Would that be the reason for the behavior?

bjosv avatar Nov 22 '22 11:11 bjosv

That's interesting. It seems the node semver module compresses all versions down to the three main versions. In this case it means 2.8.12, 2.8.12.1 and 2.8.12.2 all get converted to version 2.8.12 which is used to do the package selection. This is why if you look for 2.8.12.2 it doesn't get found. If you look for 2.8.12 we pick the first one that matches, which happens to be 2.8.12.2 though that's probably not guaranteed.

I wouldn't say this is expected, just not considered. It definitely comes from the later 2.8.12.x versions not following what node semver expects versions to look like.

jwlawson avatar Nov 26 '22 11:11 jwlawson