Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
Find a file
Marc Huisinga a7bdc55244
fix: inlay hint race conditions (#7188)
This PR fixes several inlay hint race conditions that could result in a
violation of the monotonic progress assumption, introduced in #7149.

Specifically:
- In rare circumstances, it could happen that stateful LSP requests were
executed out-of-order with their `didChange` handlers, as both requests
and the `didChange` handlers waited on `lake setup-file` to complete,
with the latter running those handlers in a dedicated task afterwards.
This meant that a request could be added to the stateful LSP handler
request queue before the corresponding `didChange` call that actually
came before it. This PR resolves this issue by folding the task that
waits for `lake setup-file` into the `RequestContext`, which ensures
that we only need to wait for it when actually executing the request
handler.
- While #7164 fixed the monotonic progress assertion violation that was
caused by `$/cancelRequest`, it did not account for our internal notion
of silent request cancellation in stateful LSP requests, which we use to
cancel the inlay hint edit delay when VS Code fails to emit a
`$/cancelRequest` notification. This issue is resolved by always
producing the full finished prefix of the command snapshot queue, even
on cancellation. Additionally, this also fixes an issue where in the
same circumstances, the language server could produce an empty inlay
hint response when a request was cancelled by our internal notion of
silent request cancellation.
- For clients that use `fullChange` `didChange` notifications (e.g. not
VS Code), we would get several aspects of stateful LSP request
`didChange` state handling wrong, which is also addressed by this PR.
2025-02-22 16:35:30 +00:00
.github chore: compile against glibc 2.26 (#7037) 2025-02-12 09:29:51 +00:00
doc chore: complete variable name linting for Vector (#7154) 2025-02-20 02:42:50 +00:00
images
nix fix: Windows stage0 linking (#6622) 2025-01-14 09:09:50 +01:00
releases doc: add highlights section to v4.16.0 release notes (#6925) 2025-02-03 23:18:08 +00:00
releases_drafts chore: cherry-pick release notes from releases/v4.15.0 and releases/v4.16.0 (#6520) 2025-01-04 01:25:33 +00:00
script chore: add commit hash to error message in script/release_notes.py (#6944) 2025-02-04 06:10:08 +00:00
src fix: inlay hint race conditions (#7188) 2025-02-22 16:35:30 +00:00
stage0 chore: update stage0 2025-02-19 20:59:01 +01:00
tests test: avoid re-elaboration of interactive runner (#7177) 2025-02-22 10:36:25 +00:00
.gitattributes chore: Do not hide stage0/src/stdlib_flags.h from diffs 2023-09-13 19:29:25 +02:00
.gitignore feat: support Lake for building Lean core oleans (#3886) 2024-06-13 16:18:24 +00:00
.gitpod.Dockerfile chore: add gitpod configuration (#6382) 2024-12-15 21:38:13 +00:00
.gitpod.yml chore: add gitpod configuration (#6382) 2024-12-15 21:38:13 +00:00
.ignore chore: ignore stage0/ (for rg etc.) 2022-03-18 15:28:20 +01:00
CMakeLists.txt fix: Windows stage0 linking (#6622) 2025-01-14 09:09:50 +01:00
CMakePresets.json fix: prevent Task.get deadlocks from threadpool starvation (#6758) 2025-01-23 23:01:39 +00:00
CODEOWNERS chore: adjust CODEOWNERS (#6327) 2024-12-10 08:37:20 +00:00
CONTRIBUTING.md doc: triage 2024-07-26 18:24:06 +02:00
flake.lock chore: compile against glibc 2.26 (#7037) 2025-02-12 09:29:51 +00:00
flake.nix chore: compile against glibc 2.26 (#7037) 2025-02-12 09:29:51 +00:00
lean-toolchain doc: VS Code dev setup (#2961) 2023-11-30 08:35:03 +00:00
lean.code-workspace chore: add the lean4 extension to the vscode workspace (#3059) 2023-12-14 08:58:21 +00:00
LICENSE chore: remove LICENSE header that confused GitHub 2021-11-18 09:42:35 +01:00
LICENSES feat: ship cadical (#4325) 2024-08-23 09:13:27 +00:00
README.md chore: update documentation title and link README to reference (#6409) 2024-12-17 22:18:56 +00:00
RELEASES.md chore: split RELEASES.md into releases/ folder (#6918) 2025-02-03 11:04:09 +00:00

This is the repository for Lean 4.

About

Installation

See Setting Up Lean.

Contributing

Please read our Contribution Guidelines first.

Building from Source

See Building Lean (documentation source: doc/make/index.md).