ocamlformat icon indicating copy to clipboard operation
ocamlformat copied to clipboard

Windows binary release wrongly versioned

Open nojb opened this issue 3 years ago • 7 comments

The binary release for Windows does not show the right version, eg for 0.21.0 I get:

$ ./ocamlformat.exe --version
0.21.0-4-gddca4a3-dirty

This makes it inconvenient to use with .ocamlformat files that specify a version.

nojb avatar Apr 30 '22 06:04 nojb

I don't have a windows machine to confirm, but it looks like this comes from tools/build-mingw64.sh, are the tags missing, or dune subst shouldn't be executed? (cc @emillon)

gpetiot avatar May 03 '22 13:05 gpetiot

To collect some data:

$ ./ocamlformat-0.20.0.exe --version
0.20.0-dirty
$ ./ocamlformat-0.21.0.exe --version
0.21.0-4-gddca4a3-dirty
$ ./ocamlformat-0.19.0.exe --version
0.19.0-dirty
$ ./ocamlformat-0.18.0.exe --version
0.18.0

emillon avatar May 18 '22 15:05 emillon

or dune subst shouldn't be executed?

I don't remember why dune subst is in the script. Perhaps it is enough to remove it?

nojb avatar May 18 '22 17:05 nojb

I removed the dune subst action and re-uploaded the binaries for 0.21.0 and 0.20.1 (0.20.0 and 0.19.0 don't build), is the problem fixed? I don't have a working windows environment to try.

gpetiot avatar May 20 '22 15:05 gpetiot

I removed the dune subst action and re-uploaded the binaries for 0.21.0 and 0.20.1 (0.20.0 and 0.19.0 don't build), is the problem fixed? I don't have a working windows environment to try.

Unfortunately, no, the dune subst seems necessary, but we need to make sure that the git checkout is at the right tag I guess:

image

nojb avatar May 20 '22 17:05 nojb

I reverted the commit and regenerated binaries, they should be identical as the first ones you tried.

I also tried updating the checkout github action to use v3 (apparently there is some issue related to tags, some of it were fixed in v2), generated new binaries with this action and uploaded under the names

  • ocamlformat-0.21.0-checkout@v3
  • ocamlformat-0.20.1-checkout@v3

Is the version correct for these ones?

gpetiot avatar May 21 '22 08:05 gpetiot

Is the version correct for these ones?

No:

image

I tried to reproduce locally by running the build-mingw64.sh script but it fails with

image

I will try to look further when I get time.

nojb avatar May 23 '22 05:05 nojb

Fix in #2205

nojb avatar Nov 05 '22 18:11 nojb