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

Add support for OCaml 5.1 #166

Merged
merged 5 commits into from May 9, 2024
Merged

Add support for OCaml 5.1 #166

merged 5 commits into from May 9, 2024

Conversation

jchavarri
Copy link
Contributor

@jchavarri jchavarri commented Sep 18, 2023

Besides the changes due to AST updates, the main source of changes originates in ocaml/ocaml#1391. That change leads to errors of the kind:

ocamlfind ocamlopt -c -for-pack Camlp4.Struct -g -safe-string -w Z -I camlp4/import -package camlp-streams -pp 'camlp4/boot/camlp4boot.byte -D OPT' -I camlp4/Camlp4/Struct -I camlp4/Camlp4 -I camlp4/config -I camlp4 -o camlp4/Camlp4/Struct/Loc.cmx camlp4/Camlp4/Struct/Loc.ml
File "camlp4/Camlp4/Struct/Loc.ml", line 1:
Error: camlp4/Camlp4/ErrorHandler.cmx
       was built with -for-pack Camlp4, but the
       current unit Loc is built with -for-pack Camlp4.Struct
Command exited with code 2.

The solution found is to move some modules inside Struct pack (and append a suffix to avoid issues with duplication) and just include them from the outside so the public interface remains unchanged.

There might be some breaking changes though, for example, Camlp4Ast changed its location.

Thanks @kit-ty-kate and @ygrek for the help.

@jchavarri jchavarri changed the title Ocaml 510 Add support for OCaml 5.1 Sep 20, 2023
@jchavarri jchavarri marked this pull request as ready for review September 20, 2023 12:42
camlp4/Camlp4/ErrorHandler.ml Outdated Show resolved Hide resolved
camlp4/Camlp4/Options.ml Outdated Show resolved Hide resolved
camlp4/Camlp4/Struct.mlpack Outdated Show resolved Hide resolved
@Octachron
Copy link
Contributor

Note that with ocaml/ocaml#12609 soon to be merged in 5.1, the changes to the structure of camlp4 is not needed anymore.

@kit-ty-kate
Copy link
Collaborator

The extprot testsuite now passes. I can do the release if that sounds good for you all?

@ygrek
Copy link
Member

ygrek commented May 7, 2024

yes please!

@kit-ty-kate kit-ty-kate merged commit 8642653 into camlp4:trunk May 9, 2024
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

Successfully merging this pull request may close these issues.

None yet

4 participants