tvix/eval: builtins.compareVersions doesn't support special pre version logic

#196
Opened by sterni at 2022-09-18T22·03+00

nix-repl> builtins.compareVersions "2.4pre" "2.4"
-1

tvix-repl> builtins.compareVersions "2.4pre" "2.4"
=> 1 :: int

  1. sterni changed the subject of this issue from "tvix/eval: `builtins.compareVersion` doesn't support special `pre` version logic" to "tvix/eval: `builtins.compareVersions` doesn't support special `pre` version logic" at 2022-09-19T10·28+00
  2. cl/6690 has improved the situation, but we don't return the same result as C++ Nix for src/tests/nix_tests/eval-okay-versions.nix yet.

    sterni at 2022-09-19T10·47+00

  3. Specifically, the following invocations are wrong:

    • builtins.compareVersions "2.3pre1" "2.3"
    • builtins.compareVersions "2.3pre1" "2.3c"

    sterni at 2022-09-19T11·27+00

  4. Implemented in cl/6719 and cl/6720. Let's see if any additional bugs turn up. We pass the relevant part of the C++ Nix test suite here now (cl/6705).

    sterni at 2022-09-21T14·28+00

  5. sterni closed this issue at 2022-09-21T14·28+00