Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OCaml 4.08 #62

Closed
XVilka opened this issue Jun 19, 2019 · 12 comments
Closed

Support for OCaml 4.08 #62

XVilka opened this issue Jun 19, 2019 · 12 comments

Comments

@XVilka
Copy link
Contributor

XVilka commented Jun 19, 2019

OCaml 4.08 was released recently, with a lot of useful features. It will be very handy for piqi/piqilib to support it.

@XVilka
Copy link
Contributor Author

XVilka commented Jun 19, 2019

Seems blocked by #59, because there is no Camlp4 for OCaml 4.08 yet: camlp4/camlp4#151

@alavrik
Copy link
Owner

alavrik commented Jun 29, 2019

hmm... didn't quite work out with camlp5 either. CC @sagotch

$         opam install camlp5
The following dependencies couldn't be met:
  - camlp5 → ocaml < 4.08.0

@alavrik
Copy link
Owner

alavrik commented Jun 29, 2019

Wondering if it is time to fallback on ocamllex... Piq_lexer is the only important piece that relies on ulex and its only use for utf8 handling is inside quoted strings, which can be processed separately anyway.

sedlex relies on ppx which potentially brings more problems with portability. I am not really up-to-date on this aspect though.

@XVilka
Copy link
Contributor Author

XVilka commented Jun 29, 2019 via email

@XVilka
Copy link
Contributor Author

XVilka commented Jun 29, 2019

@alavrik for the Camlp5 problem - see camlp5/camlp5#39 and ocaml/opam-repository#14351
But I doubt it worth the trouble, OCaml 4.09 is already looming on the horizon, and camlp4/5 might be stuck without its support again. It is better to drop their support whatsoever. After all only a small bunch of the packages depend on ulex:

  • beluga - created an issue #108 for porting to sedlex
  • cduce
  • fstar>=0.9.5.0 - created an issue #1792 for porting to sedlex
  • higlo - created an issue #3 for porting to sedlex
  • kremlin - created an issue #138 for porting to sedlex
  • lambdoc - created an issue #37 for porting to sedlex
  • mezzo
  • opa-base - created an issue #196 for porting to sedlex
  • pxp
  • sociaml-vcard - created an issue #1 for porting to sedlex
  • wdialog

@alavrik
Copy link
Owner

alavrik commented Jun 29, 2019

@XVilka I agree about ulex. There's even a branch that uses sedlex instead of ulex: https://github.com/alavrik/piqi/tree/sedlex

I was hesitant to push it in the past, because maintenance status of sedlex was unclear and ppx used to be rather unstable. I haven't revisited it since then. If you say that latest sedlex and ocaml-migrate-parsetree work well, I am fine with going this route. Would you be interested bringing this branch up-to-date and integrating it? It would be way simpler than rewriting the Piq_lexer (not a big deal too, but does require some amount of work).

@XVilka
Copy link
Contributor Author

XVilka commented Jun 29, 2019 via email

@XVilka
Copy link
Contributor Author

XVilka commented Jul 1, 2019

Started to work in #65

@XVilka
Copy link
Contributor Author

XVilka commented Aug 6, 2019

Note that Camlp5 7.08 (with the support for 4.08) was released. So piqi should work fine as is right now. But it will be still better to move to sedlex.

@alavrik
Copy link
Owner

alavrik commented Aug 6, 2019

@XVilka thank you for letting me know. I agree, sedlex or even no external dependencies would be a better solution. Sorry about slow response. Will try to catch up with the pull requests soon.

@XVilka
Copy link
Contributor Author

XVilka commented Aug 8, 2019

And the official Camlp4 deprecation announcement: https://discuss.ocaml.org/t/the-end-of-camlp4/4216

@alavrik
Copy link
Owner

alavrik commented Aug 18, 2019

I've just pushed sedlex support to master. Everything seems to be working for OCaml 4.03 through 4.08. Closing.

Note that I have also removed custom solution for building third-party dependencies. It is all managed by opam now.

@alavrik alavrik closed this as completed Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants