Skip to content

Pin the OCaml libraries linked into the release binaries - #9269

Merged
cknitt merged 1 commit into
masterfrom
pin-shipped-opam-deps
Nov 9, 2026
Merged

cknitt merged 1 commit into
masterfrom
pin-shipped-opam-deps

Conversation

@cknitt

@cknitt cknitt commented Nov 8, 2026

Copy link
Copy Markdown
Member

The OCaml libraries linked into the release binaries now all have exact versions in dune-project.

The setup-ocaml cache is keyed by hashFiles('*.opam'). A library without an exact version floats to whatever opam serves when a platform's cache is rebuilt, which can happen at different times on different platforms. That's how master broke on lsp 1.28 (#9234).

Newly pinned, at the versions CI uses today:

Package Pin Reaches the binaries through
rescript wtf8 1.0.2, ppx_deriving 6.2.0 (runtime library) Flow parser
rescript ctypes 0.24.0, integers 0.8.0, stdlib-shims 0.3.0 luv
analysis lsp 1.27.0 (was >= 1.23.0 & < 1.28.0), jsonrpc 1.27.0, uutf 1.0.4 lsp
analysis ppx_yojson_conv_lib >= v0.16.0 & <= v0.17.0 lsp
tools cmarkit 0.4.0 (was >= 0.3.0)

ppx_yojson_conv_lib v0.17.0 requires OCaml 5.1, and dune-project's depends can't express "exact unless OCaml 5.0". The range resolves to v0.17.0 on every release platform and to v0.16.0 in the OCaml 5.0 compatibility job.

Build-only tools (dune, ppxlib, ppx_gen_rec, menhir) still float, because they don't end up in the binaries. opam install . --deps-only --with-test --dry-run reports nothing to do on the current 5.5.2 switch. The changed *.opam hash makes this PR's CI rebuild every opam cache from scratch, so CI is the real test of the pins on all platforms and on OCaml 5.0.

A full opam lock file wasn't used. opam lock records one platform's solution, including the compiler, and CI builds three compiler setups across Linux, macOS and Windows.

Related: #8594 generates the license notices from the same switch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLboTZTRoQAbXc4ZzC

The opam cache key is the hash of the *.opam files, so a library without
an exact version floats to whatever opam serves when a platform's cache is
rebuilt, as lsp 1.28 did before #9234. Every library in the binaries now
has an exact version, including those that come in through lsp and luv.
ppx_yojson_conv_lib v0.17.0 needs OCaml 5.1, so its range lets the
OCaml 5.0 job use v0.16.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLboTZTRoQAbXc4ZzC
Signed-off-by: Christoph Knittel <ck@cca.io>
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Pin the exact versions of all OCaml libraries linked into the release binaries, so every platform builds with the same versions whenever its opam cache is rebuilt.

Semantic Diff

1 commit · Full page

Pin the OCaml libraries linked into the release binaries

db7c23d · cknitt + Claude · Nov 08, 2026, 20:34 UTC

The opam cache key is the hash of the *.opam files, so a library without an exact version floats to whatever opam serves when a platform's cache is rebuilt, as lsp 1.28 did before #9234. Every library in the binaries now has an exact version, including those that come in through lsp and luv. ppx_yojson_conv_lib v0.17.0 needs OCaml 5.1, so its range lets the OCaml 5.0 job use v0.16.0.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 456,989,425 → 456,989,425 (±0.00%).

None of the 257 benchmarks changed by 0.1% or more.

Instructions

In total: 10,226,961,817 → 10,226,961,817 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Pull request db7c23d compared with base d47adb3 in this run.

@pkg-pr-new

pkg-pr-new Bot commented Nov 8, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9269

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9269

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9269

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9269

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9269

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9269

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9269

commit: db7c23d

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

@cknitt
cknitt requested a review from fhammerschmidt November 9, 2026 06:42
@cknitt
cknitt marked this pull request as ready for review November 9, 2026 06:42
@cknitt
cknitt merged commit bcb7ec7 into master Nov 9, 2026
38 of 40 checks passed
@cknitt
cknitt deleted the pin-shipped-opam-deps branch November 9, 2026 08:53
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 this pull request may close these issues.

2 participants