sedlex
sedlex copied to clipboard
Error building with OPAM
Since this morning, I've had the following issue:
# File "ppx_sedlex.ml", line 11, characters 5-24:
# Error: Unbound module Ast_convenience_405
does that ring a bell? the travis logs are available here: https://travis-ci.org/FStarLang/kremlin/builds/421260062?utm_source=slack&utm_medium=notification if that helps
I believe that this issue stems from a missing -package ppx_tools_versioned
argument in the OPAM version (line 11 in src/syntax/Makefile
). The current git version builds fine though, which perhaps suggests doing a new release as discussed in #57.
This seems related to the changes introduced from ppx_tools_versioned.5.2
to ppx_tools_versioned.5.2.1
(see https://github.com/mirage/ocaml-cstruct/pull/204 for more info on why there is now a need for explicitly stating runtime dependencies on ppx_tools_versions
).
Someone might want to submit a patch to the opam file to fix this for now. (The Makefile can be patched in the opam build process.) That's probably the fastest way to get past the problem.
More like Ast_inconvenience_404
amiright?
But yes, a quick fix would be appreciated because this takes down our entire CI.
The quickest fix for anyone is to force use of ppx_tools_versioned.5.2
.
A slightly "better" quick fix is to put the Makefile patch into the opam file and request a pull to the opam repository.
Note that I've pushed https://github.com/ocaml/opam-repository/pull/12556 to (temporary) fix the issue in opam.
Can we close this for now, or should we keep it open until the underlying issue is fixed?
Hi,
There is a patch that fixes build against ppx_tools 5.2.1:
`--- sedlex-1.99.4/src/syntax/Makefile.orig 2018-10-25 07:55:34.821346628 +0000 +++ sedlex-1.99.4/src/syntax/Makefile 2018-10-25 07:58:42.761346628 +0000 @@ -8,7 +8,7 @@
OCAMLC=ocamlfind ocamlc OCAMLOPT=ocamlfind ocamlopt -g -PACKAGES=-package ppx_tools_versioned.metaquot_405 -package ocaml-migrate-parsetree +PACKAGES=-package ppx_tools_versioned.metaquot_405 -package ocaml-migrate-parsetree -package ppx_tools_versioned OCAMLFLAGS=$(PACKAGES) -linkall -w +A-4-9-42 -annot
all: ppx_sedlex$(EXE) sedlex.cma ` http://svnweb.mageia.org/packages/cauldron/ocaml-sedlex/current/SOURCES/ppx_tools_versioned-521.patch?view=markup&pathrev=1325266
If you would like to submit a patch, please do so via the pull request mechanism.
Er — is there a reason it's not constrained to ‘below 5.2.1’ in this repository? This issue trickled down to my fork in an unrelated fashion, and I'm confused as to why sedlex.opam
in this repo now disagrees with the declaration in the opam repository about this? Simple oversight, or intentional?
Happy to PR if upstreaming of this constraint is desired. (=
It's intentional. The constraint < 5.2.1
would make sedlex incompatible with a large part of the OCaml ecosystem, most notably the Jane Street libraries.
@smolkaj thanks for the explanation! <3
I opened #84 to help fix this. I was getting bitten by a "catch 22" situation in nixpkgs trying to build sedlex (<2.0) for ocaml 4.08.
@matthewess I've merged it. Is the problem gone?
we're now using ppxlib, should be closed