garrigue / lablgtk

LablGTK 2 and 3: an interface to the GIMP Tool Kit
https://garrigue.github.io/lablgtk
Other
90 stars 40 forks source link

Add OCaml 4.08 in Travis CI #67

Closed XVilka closed 5 years ago

XVilka commented 5 years ago

As part of global effort to bring 4.08 support in the most common packages.

XVilka commented 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
ejgallego commented 5 years ago

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.

garrigue commented 5 years ago

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?

ejgallego commented 5 years ago

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.

ejgallego commented 5 years ago

So indeed I think we should wait to update the CI until upstream does add camlp4 to opam.

XVilka commented 5 years ago

Long term it makes sense to port these code generators to the ppx.

ejgallego commented 5 years ago

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 .

XVilka commented 5 years ago

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.

garrigue commented 5 years ago

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.)

XVilka commented 5 years ago

@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:

So it is certainly doesn't look like complete rewrite.

XVilka commented 5 years ago

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

ejgallego commented 5 years ago

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 )

garrigue commented 5 years ago

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).

ejgallego commented 5 years ago

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]

garrigue commented 5 years ago

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.

ejgallego commented 5 years ago

You mean that Daniel is no longer supporting it?

I guess we can ask him @roglo

roglo commented 5 years ago

I am still supporting it but I admit I am a little bit lazy these times. I made a release a few days ago.

XVilka commented 5 years ago

OK, now it is green as a forest. Please squash and merge then.

garrigue commented 5 years ago

Thank you