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

chore: update unix primitives names for 5.2 #10066

Closed
wants to merge 14 commits into from
Closed

Conversation

kopecs
Copy link
Contributor

@kopecs kopecs commented Apr 5, 2024

ocaml/10926 updates the runtime functions from Unix in 5.x to be prefixed with caml_, which they previously were not. Thus we need to update that here.

@kopecs kopecs added the stacked-diff Do not merge this! Let the owner do it, this is meant to be a "stacked diff" label Apr 5, 2024
Copy link
Contributor

github-actions bot commented Apr 5, 2024

PR checklist:

  • Purpose of the code is evident to future readers
  • Tests included or PR comment includes a reproducible test plan
  • Documentation is up-to-date
  • A changelog entry was added to changelog.d for any user-facing change
  • Change has no security implications (otherwise, ping security team)

If you're unsure about any of this, please see:

@kopecs kopecs changed the title Update unix runtime function names chore: update unix primitives names for 5.2 Apr 5, 2024
@kopecs kopecs requested a review from ajbt200128 April 5, 2024 22:57
@kopecs
Copy link
Contributor Author

kopecs commented Apr 5, 2024

cc: @brandonspark if you're working on this

@aryx
Copy link
Collaborator

aryx commented Apr 16, 2024

Does that mean the code will not compile with OCaml 4.14.0?
or using caml_xxx is backward compatible?

@kopecs
Copy link
Contributor Author

kopecs commented Apr 16, 2024

Does that mean the code will not compile with OCaml 4.14.0?

That's correct -- they made a breaking change to the names. This should only get merged if we are building with 5.x.

@aryx
Copy link
Collaborator

aryx commented Apr 16, 2024

That's annoying, because it's nice to be able to both compile in CI for 4.14.1 and 5.2.0.
Maybe we could use some ifdefs in this code? to make the code portable on both OCaml version?
I usually hate ifdefs, but might be a good use case here.

@ajbt200128
Copy link
Contributor

@kopecs I don't see any reason why we can't export the function under both names. Ugly, and clutters the global namespace a bit, but shouldn't break anything. Might even be able to do //provides: name1, name2 or something simple

@kopecs
Copy link
Contributor Author

kopecs commented Apr 16, 2024

Oh, perhaps. Not particularly opposed, but I would figure it just makes more sense to swap over when we move to 5 given we'd presumably be using other features which aren't backwards compatible so it wouldn't matter if this built with 4.

@ajbt200128
Copy link
Contributor

I think @aryx wants to be able to have 5.2 working in CI before we actually start using its features and/or releasing with it. So we probably want to be able to merge this and have both versions work for now

Base automatically changed from jsoo_for_ocaml5 to develop April 17, 2024 00:01
@aryx
Copy link
Collaborator

aryx commented Apr 17, 2024

yep, @ajbt200128 is correct;

@aryx aryx closed this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
before-oss-pro-merge Do not merge stacked-diff Do not merge this! Let the owner do it, this is meant to be a "stacked diff"
Development

Successfully merging this pull request may close these issues.

None yet

3 participants