This fork of the opam repository contains their implementation of the compiler, which extends 4.14. (However their work on Flambda2 is on 5.1 currently.)
I think you should expect that some things are broken out of the box. For me:
base installs okay, dune installs okay (get dune version 3.10)
core installs if you get version 0.30.0 of ppx_lib
merlin-lib breaks due to reasons mostly related to implicit dependencies that ocamlopt apparently knows how to add automatically but the jane street fork does not (I made a PR for this last night)
Skim through this issue thread, one person went through the work of forking their repository and making an opam repository with working versions of all the key development packages.
opened 11:27AM - 02 Sep 23 UTC
I tried to install some supporting packages (notably, merlin and utop), and ran … into some failed builds. I'm not sure these are worth fixing, but it seemed at least worth reporting:
```
#=== ERROR while compiling uuseg.15.0.0 =======================================#
# context 2.1.3 | linux/x86_64 | dune.3.10.0 ocaml-base-compiler.4.14.1-18 | https://opam.ocaml.org#47a1176c
# path ~/.opam/4.14.1-jst/.opam-switch/build/uuseg.15.0.0
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --dev-pkg false --with-uutf true --with-cmdliner true
# exit-code 1
# env-file ~/.opam/log/uuseg-20765-d19954.env
# output-file ~/.opam/log/uuseg-20765-d19954.out
### output ###
# Error: This expression has type
# [...]
# Command exited with code 2.
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-tag' 'debug'
# '-build-dir' '_build' 'opam' 'pkg/META' 'CHANGES.md' 'LICENSE.md'
# 'README.md' 'src/uuseg.a' 'src/uuseg.cmxa' 'src/uuseg.cma'
# 'src/uuseg.cmx' 'src/uuseg.cmi' 'src/uuseg.mli'
# 'src/uuseg_line_break.cmx' 'src/uuseg_sentence.cmx' 'src/uuseg_word.cmx'
# 'src/uuseg_grapheme_cluster.cmx' 'src/uuseg_buf.cmx'
# 'src/uuseg_base.cmx' 'src/uuseg_string.a' 'src/uuseg_string.cmxa'
# 'src/uuseg_string.cma' 'src/uuseg_string.cmx' 'src/uuseg_string.cmi'
# 'src/uuseg_string.mli' 'test/usegtrip.native' 'doc/index.mld'
# 'test/examples.ml']: exited with 10
#=== ERROR while compiling merlin-lib.4.9-414 =================================#
# context 2.1.3 | linux/x86_64 | dune.3.10.0 ocaml-base-compiler.4.14.1-18 | https://opam.ocaml.org#47a1176c
# path ~/.opam/4.14.1-jst/.opam-switch/build/merlin-lib.4.9-414
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p merlin-lib -j 7
# exit-code 1
# env-file ~/.opam/log/merlin-lib-20765-d1b82d.env
# output-file ~/.opam/log/merlin-lib-20765-d1b82d.out
### output ###
# Error: This pattern matches values of type [? `Print of 'a ]
# [...]
# | `String of string ]
# Merlin_extend.Extend_protocol.Reader.outcometree has an unknown layout,
# which might not be a sublayout of value.
# No .cmi file found containing Merlin_extend.Extend_protocol.Reader.outcometree.
# Hint: Adding "merlin_extend" to your dependencies might help.
# (cd _build/default && /home/yminsky/.opam/4.14.1-jst/bin/ocamlopt.opt -w -40 -open Ocaml_utils -open Merlin_utils -open Ocaml_parsing -open Ocaml_preprocess -open Ocaml_typing -open Merlin_specific -open Merlin_extend -g -I src/kernel/.merlin_kernel.objs/byte -I src/kernel/.merlin_kernel.objs/native -I src/config/.merlin_config.objs/byte -I src/config/.merlin_config.objs/native -I src/dot-pro[...]
# File "src/kernel/mconfig_dot.ml", line 63, characters 19-29:
# 63 | let white_regexp = Str.regexp "[ \t]+"
# ^^^^^^^^^^
# Error: Unbound module Str
# Hint: Did you mean Std?
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build merlin-lib 4.9-414
│ λ build uuseg 15.0.0
```
Once you get anything installed at all, you can follow along with this youtube video series https://www.youtube.com/watch?v=PgUsmO0YyQc
I went through several of the videos yesterday and I hollered out loud when I saw the allocation count for my code drop from 177k allocations to 2k allocations. Very exciting
VIDEO
Although it took like 15 minutes of tinkering with annotations to get it to that level of performance
6 Likes