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

Updating OCaml version #13

Closed
Simn opened this issue Jan 7, 2024 · 5 comments · Fixed by #16
Closed

Updating OCaml version #13

Simn opened this issue Jan 7, 2024 · 5 comments · Fixed by #16

Comments

@Simn
Copy link
Member

Simn commented Jan 7, 2024

We're currently defaulting to OCaml 4.09.0, which locks us to lcaml-lsp-server 1.4.1 from March 2021. The current version of that is 1.17.0 which has an ocaml >= 4.14. However, we're also locked to camlp5 8.00 which has ocaml < 4.13.0, meaning 4.12.1. This would allow us at most ocaml-lsp-server 1.8.3 from October 2021, which doesn't seem like much of an upgrade.

I just noticed that camlp5 8.00.03 is the last version that has the patch on the sunset repository, and coincidentally it's the first version that has ocaml < 4.15.0, which should allow us an upgrade to 4.14.

I'll see if that works... The reason I'm opening this issue is mostly to rant, but also because my IDE currently looks like this:

Code_NqJSvOZZP6

I don't remember what versions I had before, so I'm trying to recreate to workable working environment.

@Simn
Copy link
Member Author

Simn commented Jan 7, 2024

Works about as well as I was expecting:

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-variants.4.14.1+mingw64
∗ installed ocaml-config.2
∗ installed ocaml.4.14.1
Done.
# Run eval $(opam env --root=C:/git/ocamhaxe/.opam) to update the current shell environment
Fatal error:
Not_found
Backtrace:
  Raised at Stdlib__list.assq in file "list.ml" (inlined), line 199, characters 10-25
  Called from Re__Core.final in file "lib/core.ml", line 223, characters 4-26
  Called from OpamStubs in file "src/stubs/opamWin32Stubs.ml" (inlined), line 20, characters 0-60
  Called from OpamConsole.enable_win32_vt100.restore_console in file "src/core/opamConsole.ml", line 265, characters 12-51
  Called from Stdlib.at_exit.(fun) in file "stdlib.ml", line 553, characters 62-65
  Called from Stdlib.do_at_exit in file "stdlib.ml" (inlined), line 556, characters 20-39
  Called from Stdlib.exit in file "stdlib.ml", line 559, characters 2-15
  Called from OpamMain.main_catch_all in file "src/client/opamMain.ml" (inlined), line 188, characters 6-10
  Called from OpamStd.Op.(@@) in file "src/core/opamStd.ml" (inlined), line 1185, characters 17-20
  Called from OpamMain.run in file "src/client/opamMain.ml", line 267, characters 2-695

@Simn
Copy link
Member Author

Simn commented Jan 7, 2024

My IDE issues came from something rather unexpected which I reported here: ocaml/ocaml-lsp#1224

@Simn
Copy link
Member Author

Simn commented Sep 15, 2024

Dune 3.16 currently doesn't work on Windows with OCaml 4.09 and they're talking about dropping support for it here: ocaml/dune#10799 (comment)

This might make it necessary to look into #16 soon, unless we want to pin an older dune version which doesn't seem ideal. At the moment I'm running into the dreaded camlp5 The -prefix directory must be absolute. problem again and according to this comment the required patches aren't going to be migrated either. I saw that @tobil4sk is trying to deal with that here, but it likely will be a while before that's released in some form.

So in summary I'm not sure how to proceed right now.

@tobil4sk
Copy link
Member

For now, we can maybe fork the opam-repository-mingw repository to port the camlp5 patch to a newer version ourselves?

@Simn
Copy link
Member Author

Simn commented Sep 15, 2024

That indeed seems like the most straightforward solution, though I'm worried about having to keep that up to date. Ideally such a repository would only contain what we're interested in and not potentially outdated versions of everything else.

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 a pull request may close this issue.

2 participants