aantron / bisect_ppx

Code coverage for OCaml and ReScript
http://aantron.github.io/bisect_ppx/demo/
MIT License
302 stars 60 forks source link

Tips on how to upgrade dependency: ppxlib to latest version? #410

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi I am interested in upgrading the dependency "ppxlib" to v.0.28.0 (the latest version ). Currently bisect_ppx is marked as working with >= 0.21.0 of ppxlib, but in version 0.27.0 onwards the following error manifests:

#=== ERROR while compiling bisect_ppx.2.8.1 ===================================#
# context     2.1.4 | linux/x86_64 | ocaml.5.0.0 | pinned(git+file:///home/davedave/worko/bisect_ppx#master#816def34)
# path        ~/worko/bisect_ppx/_opam/.opam-switch/build/bisect_ppx.2.8.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p bisect_ppx -j 7
# exit-code   1
# env-file    ~/.opam/log/bisect_ppx-225200-3ec8c5.env
# output-file ~/.opam/log/bisect_ppx-225200-3ec8c5.out
### output ###
# [...]
# (cd _build/default && /home/davedave/.opam/default/bin/ocamlopt.opt -w -40 -open Ocaml_shadow -g -I src/ppx/.bisect_ppx.objs/byte -I src/ppx/.bisect_ppx.objs/native -I /home/davedave/.opam/default/lib/ocaml/compiler-libs -I /home/davedave/.opam/default/lib/ocaml/str -I /home/davedave/worko/bisect_ppx/_opam/lib/ocaml-compiler-libs/common -I /home/davedave/worko/bisect_ppx/_opam/lib/ocaml-compi[...]
# File "src/ppx/instrument.ml", line 494, characters 29-31:
# 494 |         recur ~enclosing_loc p'
#                                    ^^
# Error: This expression has type
#          string Astlib.Ast_414.Asttypes.loc list * Parsetree/1.pattern
#        but an expression was expected of type
#          Parsetree/1.pattern = Parsetree/2.pattern
#        File "src/ppx/instrument.ml", line 37, characters 0-35:
#          Definition of module Parsetree/1
#        File "_none_", line 1:
#          Definition of module Parsetree/2

I wonder if you have any hints on how best to go about upgrading the dependency?

jasontatton commented 1 year ago

Sorry it was me who originally submitted this, but I have since shut down the account which I used to create the question. I am still curious about how to resolve this

aantron commented 1 year ago

This particular error was fixed by #400, in which @pitag-ha made Bisect_ppx compatible with ppxlib 0.26.0 and 0.27.0. However, building against ppxlib 0.28.0 still causes other errors. I'll ping this issue once we fix those!