ocaml-h2 icon indicating copy to clipboard operation
ocaml-h2 copied to clipboard

OCaml 5.3 support

Open kit-ty-kate opened this issue 1 year ago • 3 comments

hpack currently fails with the following error on OCaml 5.3:

#=== ERROR while compiling hpack.0.12.0 =======================================#
# context              2.3.0~alpha~dev | linux/x86_64 | ocaml-variants.5.3.0+trunk | file:///home/opam/opam-repository
# path                 ~/.opam/5.3/.opam-switch/build/hpack.0.12.0
# command              ~/.opam/5.3/bin/dune build -p hpack -j 1 @install
# exit-code            1
# env-file             ~/.opam/log/hpack-20-a43dd2.env
# output-file          ~/.opam/log/hpack-20-a43dd2.out
### output ###
# (cd _build/default && /home/opam/.opam/5.3/bin/ocamlc.opt -w -40 -g -bin-annot -bin-annot-occurrences -I hpack/util/.gen_huffman.eobjs/byte -I /home/opam/.opam/5.3/lib/ocaml/compiler-libs -no-alias-deps -o hpack/util/.gen_huffman.eobjs/byte/dune__exe__Gen_huffman.cmo -c -impl hpack/util/gen_huffman.ml)
# File "hpack/util/gen_huffman.ml", line 113, characters 28-71:
# 113 |              [ Exp.constant (Pconst_integer (string_of_int code, None))
#                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: This expression should not be a constructor, the expected type is
#        "Parsetree.constant"

kit-ty-kate avatar Sep 11 '24 14:09 kit-ty-kate

I fixed this by using (mode fallback) and committing the generator in https://github.com/anmonteiro/ocaml-h2/pull/251

anmonteiro avatar Sep 11 '24 15:09 anmonteiro

Ah sorry i seemed to have missed the release. Note however that dune build (aka. @all) on 5.3 still fails so this fix is only a temporary one

kit-ty-kate avatar Sep 11 '24 15:09 kit-ty-kate

ah, good find. I'll make sure to patch that up and release a patch version soon.

anmonteiro avatar Sep 11 '24 15:09 anmonteiro

This problem is still present

kit-ty-kate avatar Jan 25 '25 14:01 kit-ty-kate

PR welcome here, I don't know if I'll have time to fix this one soon.

anmonteiro avatar Jan 25 '25 23:01 anmonteiro