ocaml-jupyter icon indicating copy to clipboard operation
ocaml-jupyter copied to clipboard

OCaml 5.2.0 and newer support, including OCaml 5.3.0

Open zhelih opened this issue 8 months ago • 9 comments

Hi,

This Pull Request provides changes required to use this project with OCaml 5.2.0 and newer up to OCaml 5.3.0.

It includes ideas and changes from other PRs: #199 #207 and addresses issue #202

The reason why versions before 5.2.0 not support is due to changes in AST and function handling. Please review and let me know if there are any questions or comments.

Thanks!

zhelih avatar Aug 14 '25 03:08 zhelih

ftr integration tests are known to fail, to be fixed, but the kernel actually works, including new OCaml 5 features (effects, domains)

ygrek avatar Aug 14 '25 15:08 ygrek

ftr integration tests are known to fail, to be fixed, but the kernel actually works, including new OCaml 5 features (effects, domains)

From my side, integration test notebooks work correctly when running from the Jupyter Lab (web). I do not have the proper command line setup (yet) to finish that testing. However, for the Web users there should be no problem (including ppx).

I will report when I have more on this.

zhelih avatar Aug 14 '25 17:08 zhelih

@zhelih Very sorry for late.

Could you restrict ocaml-versions in ci.yaml and other yaml files to 5.2.0 only? https://github.com/akabe/ocaml-jupyter/blob/master/.github/workflows/ci.yaml#L17-L22 https://github.com/akabe/ocaml-jupyter/blob/master/.github/workflows/gh-pages.yaml#L20 https://github.com/akabe/ocaml-jupyter/blob/master/.github/workflows/release.yaml#L13

It seems your patch includes code supporting v4.x.x. I think they can be removed.

@ygrek Thank you for reply!

akabe avatar Aug 25 '25 07:08 akabe

There is a plan to remove obsolete code in a separate PR, unless you would recommend otherwise.

zhelih avatar Aug 26 '25 01:08 zhelih

@zhelih

Thank you for the restriction of ocaml versions.

The CI is failing due to Python 2 installation, but I don’t think we need to support it. It would be helpful if you could remove the following entry. Sorry again for the trouble.

  • https://github.com/akabe/ocaml-jupyter/blob/ed45f5f04f730dc6978559ef41b05d64fc509a75/.github/workflows/ci.yaml#L38
  • https://github.com/akabe/ocaml-jupyter/blob/ed45f5f04f730dc6978559ef41b05d64fc509a75/tests/notebook/test_process.ml#L90-L94
  • https://github.com/akabe/ocaml-jupyter/blob/ed45f5f04f730dc6978559ef41b05d64fc509a75/tests/notebook/test_process.ml#L180
  • https://github.com/akabe/ocaml-jupyter/blob/ed45f5f04f730dc6978559ef41b05d64fc509a75/tests/integration/jupyter-notebook.ipynb?short_path=7546c21#L41-L49

There is a plan to remove obsolete code in a separate PR, unless you would recommend otherwise.

Sounds good to me. I will release a new version of ocaml-jupyter after the separate PR.

akabe avatar Aug 26 '25 01:08 akabe

I see format fails, correcting.

zhelih avatar Aug 26 '25 02:08 zhelih

Enhanced ppx test (and all of them) to be stable.

zhelih avatar Aug 26 '25 03:08 zhelih

All tests pass now.

zhelih avatar Oct 10 '25 03:10 zhelih

Hi @zhelih,

Thank you so much for completing this incredibly challenging upgrade — I really appreciate your dedication and the high quality of your work. All the tests are passing perfectly, which is truly impressive. Excellent job! 🎉

When you have time, could you please also update the OCaml version in the following workflow files?

  • https://github.com/akabe/ocaml-jupyter/blob/master/.github/workflows/gh-pages.yaml#L20
  • https://github.com/akabe/ocaml-jupyter/blob/master/.github/workflows/release.yaml#L13

The gh-pages.yaml workflow automatically builds and updates the API documentation at https://akabe.github.io/ocaml-jupyter/ .

The release.yaml workflow creates a tarball for OPAM release and generates a draft GitHub release when a new tag is pushed.

Thanks again for your great work and for keeping the project in such good shape!

akabe avatar Oct 10 '25 04:10 akabe