Closed kit-ty-kate closed 7 months ago
ah nevermind it’s only ppxlib.0.30.0 not the latest ppxlib.0.31.0. Still I’m a bit puzzled at why it happens when it works fine with OCaml 5.1.0
That's quite interesting! The reason why ppxlib.0.31.0
is fine, while ppxlib.0.30.0
isn't is that in 0.31.1
, we fixed a location bug in one of the AST 5.0 <-> AST 5.1 migrations.
And about why it works fine with OCaml 5.0 and doesn't with OCaml 5.1: Might be because of https://github.com/ocaml/ocaml/issues/10852 and because in ppxlib.0.30.0
, we kind of "overfitted" the locations in the migration to the example that's breaking here rather than getting them right generally, whereas in ppxlib.0.31.0
we (hopefully) get them right generally.
should that version be concidered unavailable on opam-repository or just its test? Would you be able to do the PR?
Ok, I've had a closer look and the problem is not in the diff itself, but in the way the diff is formatted. In 0.30.0
we hadn't unified the output via the diff
's -U 0
option yet. So to answer your question:
should that version be concidered unavailable on opam-repository or just its test?
Just its tests.
Would you be able to do the PR?
Sure.
Thanks for noticing!
Btw, the reason why the tests for ppxlib.0.30.0
pass for OCaml 5.1.0 is that when writing the test conditions, I assumed that 5.1.0
would be considered greater than 5.1.0~alpha2
, but it seems to be the other way around. So on 5.1.0
(considered < 5.1.0~alpha2
), the tests are simply not run, whereas on 5.1.1
(considered > 5.1.0~alpha2
), they are.
Was 5.1.0~alpha1
the only 5.1.0
pre-release before 5.1.0~alpha2
? (I.e. was there no beta release?) In that case, I can make the test condition better by simply saying ocaml >= "5.1.0"` and < "5.2.0" and != "5.1.0~alpha1".
I've just opened the opam-repo PR.
Btw, in case you wonder: The reason why those tests needed to be disabled on any OCaml 5.1.0
pre-release before alpha2
is that 5.1.0.alpha2
introduced a parsetree change. It's very rare that a OCaml pre-release changes the parsetree, but in that particular case it happened.
This is fixed on opam-repo now: https://github.com/ocaml/opam-repository/pull/24919
Thanks for reporting, @kit-ty-kate!