v0.18~preview.130.100+614 does not compile with ocaml 5.3.0
- Dominant language
- OCaml
- Stars
- 1.3k
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
It seems like the way unreachable code is marked is not compatible with the upstream compiler.
```
#=== ERROR while compiling core.v0.18~preview.130.100+614 =====================#
# context 2.5.1 | linux/x86_64 | ocaml-variants.5.3.0+options | git+https://github.com/janestreet/opam-repository.git
# path ~/.opam/5.3.0+options/.opam-switch/build/core.v0.18~preview.130.100+614
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p core -j 15
# exit-code 1
# env-file ~/.opam/log/core-859185-4f893e.env
# output-file ~/.opam/log/core-859185-4f893e.out
### output ###
# [...]
# (cd _build/default && /home/stefan/.opam/5.3.0+options/bin/ocamlc.opt -w -40 -g -bin-annot -bin-annot-occurrences -I core/src/.core.objs/byte -I /home/stefan/.opam/5.3.0+options/lib/base -I /home/stefan/.opam/5.3.0+options/lib/base/md5 -I /home/stefan/.opam/5.3.0+options/lib/base/shadow_stdlib -I /home/stefan/.opam/5.3.0+options/lib/base_bigstring -I /home/stefan/.opam/5.3.0+options/lib/base_[...]
# File "core/src/nothing.ml", line 60, characters 10-16:
# 60 | | t :: _ -> unreachable_code t
# ^^^^^^
# Warning 56 [unreachable-case]: this match case is unreachable.
# Consider replacing it with a refutation case ' -> .'
# (cd _build/default && /home/stefan/.opam/5.3.0+options/bin/ocamlopt.opt -w -40 -g -I core/src/.core.objs/byte -I core/src/.core.objs/native -I /home/stefan/.opam/5.3.0+options/lib/base -I /home/stefan/.opam/5.3.0+options/lib/base/md5 -I /home/stefan/.opam/5.3.0+options/lib/base/shadow_stdlib -I /home/stefan/.opam/5.3.0+options/lib/base_bigstring -I /home/stefan/.opam/5.3.0+options/lib/base_in[...]
# File "core/src/nothing.ml", line 60, characters 10-16:
# 60 | | t :: _ -> unreachable_code t
# ^^^^^^
# Warning 56 [unreachable-case]: this match case is unreachable.
# Consider replacing it with a refutation case ' -> .'
```
Contributor guide
Research direction
Start by reproducing the reported `dune build -p core -j 15` command with OCaml 5.3.0. Inspect `core/src/nothing.ml` at line 60 and compare the compiler's unreachable-case warning with the surrounding match. Done means the core package compiles successfully under OCaml 5.3.0 without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100