Closed XVilka closed 5 years ago
Not sure, why it does still require camlp4? Afaik it was removed from the repository.
# Run eval $(opam env) to update the current shell environment
# Run eval $(opam env) to update the current shell environment
The following dependencies couldn't be met:
- camlp4 → ocaml < 4.08
base of this switch (use `--unlock-base' to force)
- camlp4 → ocaml-variants (= 4.02.0+modular-implicits & =
4.02.1+modular-implicits-ber)
no matching version
Not sure, why it does still require camlp4? Afaik it was removed from the repository.
Looks good, thanks @XVilka ! camlp4
is required as some code generators part do depend on it, see the dune
file.
We have to wait until campl4
is updated for 4.08.0 I'm afraid.
For the lablgtk2 version, the camlp4-generated version is committed, so there is no need for users to have camlp4 installed. Is it a problem with dune to allow the two approaches?
Is it a problem with dune to allow the two approaches?
No, and in fact dune explicitly supports this scenario.
Note that camlp4
is not required for installing at all, on the other hand it is required by the CI as it tests that the full developer setup is working.
So indeed I think we should wait to update the CI until upstream does add camlp4
to opam.
Long term it makes sense to port these code generators to the ppx.
No, and in fact dune explicitly supports this scenario.
And indeed the current dune file makes sure the files are updated, see the mode promote
Long term it makes sense to port these code generators to the ppx.
If I am not mistaken PPX is not really needed for these files, they depend on the camlp4 parser so they should be ported to menhir + ocamlex .
If I am not mistaken PPX is not really needed for these files, they depend on the camlp4 parser so they should be ported to menhir + ocamlex.
Even better then.
Indeed, PPX won't cut it, because here camlp4 is used as a parser generator rather than generic code generator.
On the other hand, moving to ocamllex/menhir means a full rewrite of the parsing code.
I 'm not sure what's wrong with using camlp4, as this is one of its functionalities.
I could maybe look for another parsing combinator library, if it includes a basic lexer similar to Genlex
.
(Note that Genlex
is still in ocaml 4.08, we're just waiting for camlp4 to be ported, and in between using an older version of camlp4 does work for our purpose.)
@garrigue there is a sedlex https://github.com/ocaml-community/sedlex And with camlp4 it is abandoned - so no port for 4.08, 4.09 beta and shiny 4.10 in the near future.
Seems only these files require rewrite:
src/propcc.ml4
(only a small part of it, in fact), src/introspection/propcc.ml4
seems just a copysrc/varcc.ml4
src/check_externals.ml4
examples/csview.ml
(20 lines to be rewritten, not more)So it is certainly doesn't look like complete rewrite.
Can be restarted once https://github.com/ocaml/opam-repository/pull/14649 is merged. Note, that 4.08 is the last camlp4 release ever: https://discuss.ocaml.org/t/the-end-of-camlp4/4216
Thanks for taking care of this @XVilka , indeed please rebase and push once the PR is merged.
The camlp4 stuff will have to be ported for 4.09 indeed, maybe the script mentioned would help? (cc: @garrigue )
I suggest we switch to camlp5 until there is a clearer picture of the future of stream parsers. (I.e., they might have a future outside of camlp4/camlp5).
By the way, I switched lablGL to camlp5, without any problem (i.e. just replace 4 by 5).
Not sure that camlp5 is going to fare better, as of late it was only kept up to date in OPAM by Coq users and developers, but Coq removed the dependency on camlp5 almost a year ago so I am not sure who will take care of maintaining it either once Coq 8.10 is released [which will happen very soon]
You mean that Daniel is no longer supporting it?
My main point is that there is an ongoing discussion on the future of stream parsers, so let's wait for the outcome before doing some heavy porting.
You mean that Daniel is no longer supporting it?
I guess we can ask him @roglo
I am still supporting it but I admit I am a little bit lazy these times. I made a release a few days ago.
OK, now it is green as a forest. Please squash and merge then.
Thank you
As part of global effort to bring 4.08 support in the most common packages.