Skip to content

Fix the master build by requiring lsp below 1.28 - #9234

Merged
cknitt merged 1 commit into
masterfrom
cap-lsp-below-1-28
Nov 5, 2026
Merged

cknitt merged 1 commit into
masterfrom
cap-lsp-below-1-28

Conversation

@cknitt

@cknitt cknitt commented Nov 5, 2026

Copy link
Copy Markdown
Member

test-devcontainer fails on every new PR since yesterday, for example #9232:

File "analysis/src/cli.ml", line 399, characters 27-36:
Error: The field access tde.edits has type
         [ `AnnotatedTextEdit of … | `SnippetTextEdit of … | `TextEdit of … ] list
       but an expression was expected of type
         [ `AnnotatedTextEdit of … | `TextEdit of … ] list

lsp 1.28.1 reached opam-repository on 2026-11-04 at 15:50 UTC and adds SnippetTextEdit to the edits of a text document edit. analysis only required lsp >= 1.23.0, so the devcontainer job, which runs a fresh opam install ., now gets 1.28.1. The other jobs use cached switches that still have 1.27.0.

This caps lsp below 1.28 in dune-project and regenerates analysis.opam. With the cap, the dev setup resolves ocaml-lsp-server to 1.27.0, which requires lsp = 1.27.0 and OCaml 5.5. Supporting 1.28 needs a SnippetTextEdit case in cli.ml and lsp >= 1.28.0, because the closed variant can't match both versions. That can be a separate change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gLWSz9kGHhX9sue9WB

lsp 1.28.1 (opam-repository, 2026-11-04) adds `SnippetTextEdit` to the
edits of a text document edit, which the closed variant annotation in
analysis/src/cli.ml doesn't accept, so a fresh opam install (the
test-devcontainer job) no longer builds. Cached switches still have
1.27.0, which ocaml-lsp-server 1.27.0 also requires.

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

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Require lsp below 1.28, whose SnippetTextEdit text edits the analysis CLI doesn't handle yet.

Semantic Diff

1 commit · Full page

Require lsp below 1.28

90f5540 · cknitt + Claude · Nov 05, 2026, 12:48 UTC

lsp 1.28.1 (opam-repository, 2026-11-04) adds SnippetTextEdit to the edits of a text document edit, which the closed variant annotation in analysis/src/cli.ml doesn't accept, so a fresh opam install (the test-devcontainer job) no longer builds. Cached switches still have 1.27.0, which ocaml-lsp-server 1.27.0 also requires.

@cknitt cknitt changed the title Require lsp below 1.28 Fix the master build by requiring lsp below 1.28 Nov 5, 2026
@cknitt
cknitt requested a review from fhammerschmidt November 5, 2026 12:50
@pkg-pr-new

pkg-pr-new Bot commented Nov 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

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

@rescript/belt

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

@rescript/darwin-arm64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: 90f5540

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

@cknitt
cknitt merged commit 8585311 into master Nov 5, 2026
26 checks passed
@cknitt
cknitt deleted the cap-lsp-below-1-28 branch November 5, 2026 13:34
cknitt added a commit that referenced this pull request Nov 9, 2026
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.


Claude-Session: https://claude.ai/code/session_01Kbf3gLboTZTRoQAbXc4ZzC

Signed-off-by: Christoph Knittel <ck@cca.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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