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 new OCaml 5 unix primitive names #1082

Merged

Conversation

dra27
Copy link
Contributor

@dra27 dra27 commented Jun 13, 2022

The compiler is considering ensuring all symbols in the Unix library are prefixed caml_ for 5.0 (ocaml/ocaml#10926).

This affects batteries only for the unix_link primitive which is updated here. I couldn't see that there was a way to specify a range of versions for ##V markers, so apologies for the slightly convoluted way of selecting between 3 different external declarations!

@UnixJunkie
Copy link
Member

I think we can specify a range; I'll find back.

@UnixJunkie
Copy link
Member

@UnixJunkie
Copy link
Member

but, there is a use example in src/batteries_compattest.mlv:

##V>=4.7####V<4.14##` module Seq = (Seq : module type of Legacy.Seq)

@UnixJunkie
Copy link
Member

If you can use this kind of syntax and your tests work; I'll merge your proposed change

@dra27
Copy link
Contributor Author

dra27 commented Jun 13, 2022

Ah, thanks - I didn't spot that! Updated to use it, and I checked that it's building correctly on 4.12 still and pre-processing correctly on 5.0 (there are other fixes needed for OCaml 5 support - I'm only dealing with the bit I've broken here 🙂)

@UnixJunkie UnixJunkie merged commit 06a2613 into ocaml-batteries-team:master Jun 13, 2022
@UnixJunkie
Copy link
Member

thanks for contributing!

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

2 participants