Skip to content

[v0.14] Add support for OCaml 5.00 - #127

Closed
kit-ty-kate wants to merge 2 commits into
janestreet:v0.14from
kit-ty-kate:500
Closed

kit-ty-kate wants to merge 2 commits into
janestreet:v0.14from
kit-ty-kate:500

Conversation

@kit-ty-kate

@kit-ty-kate kit-ty-kate commented Feb 7, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #126

@kit-ty-kate kit-ty-kate changed the title Add support for OCaml 5.00 [v0.14] Add support for OCaml 5.00 Feb 7, 2022
@bcc32

bcc32 commented Feb 7, 2022

Copy link
Copy Markdown
Member

Thanks for the fix, Kate! I've pulled it in and made a couple changes to make sure it builds internally. I tried the naive thing to make sure it still compiles with 5.00, but I got an error:

$ opam switch create 5.00 ocaml-base-compiler.5.00
[ERROR] No compiler matching 'ocaml-base-compiler.5.00' found, use 'opam switch list-available' to see what is available, or use '--packages' to select packages explicitly.

Am I missing something obvious (I did remember to opam update this time 😄)? Alternatively, would you prefer for me to just edit this PR and you can test it on your end?

@Sudha247

Sudha247 commented Feb 8, 2022

Copy link
Copy Markdown

@bcc32 you can install the compiler with:

opam switch create 5.00.0+trunk

@Sudha247

Sudha247 commented Feb 8, 2022

Copy link
Copy Markdown

@kit-ty-kate any idea why I'm getting this error on trunk (is it missing some patched dependency?)

src/.base.objs/byte/base__Import.cmo [...]
# File "src/import.ml", line 3, characters 8-40:
# 3 | include Sexp.Private.Raw_grammar.Builtin
#             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: Unbound module Sexp.Private.Raw_grammar

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Feb 8, 2022
@kit-ty-kate

Copy link
Copy Markdown
Contributor Author

@Sudha247 are you sure you’re not using base’s master branch instead? Everything is already in https://github.com/kit-ty-kate/opam-alpha-repository so you shouldn’t have to compile branches manually

@bcc32

bcc32 commented Feb 8, 2022

Copy link
Copy Markdown
Member

Thanks both. I needed to add @kit-ty-kate's opam repo and then use the correct compiler name that @Sudha247 gave. I made some changes that build with 5.00 on my end but if you would like to check the compile on your end again, please do.

@aalekseyev

Copy link
Copy Markdown
Contributor

I hate being the DCO police, but I won't be able to release this code publicly unless the patch is properly signed off.
@kit-ty-kate, can you sign off your commits? (I'm assuming you know what that is about)

Comment thread src/import0.ml
Comment on lines +48 to +49
include Caml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I’ve not signed the DCO or removed the draft state of this PR is that I was under the impression this part wouldn’t go in.

Also please do whatever you want with the code, it isn’t mine to begin with and this PR is only here to serve as the hotfix corresponding PR for opam-alpha-repository as far as I’m concerned.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it isn’t mine to begin with

Well, that only makes things worse because then we'd need signoff of the original author, or something equivalent.
Taking a quick look at the diff, I see it's mostly deletions, so hardly copyrightable, so maybe it's fine.

Anyway, @bcc32, IANAL, but it's my responsibility to make you aware that the issue exists.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I went through and reimplemented some of these fixes from scratch internally, some of them slightly differently. There's an issue with the Ephemeron API which means we can't be compatible with both 4.12 and 5.00 at the same time, so I haven't made any changes there yet. @kit-ty-kate, should I close this PR seeing as your branch would still exist, or would you like to keep it open?

@kit-ty-kate

Copy link
Copy Markdown
Contributor Author

@bcc32 any news on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants