Skip to content

[Backport releases/v4.34.0] fix: show goal of empty nested by block at positions indented past the enclosing tactic - #15104

Merged
Kha merged 1 commit into
releases/v4.34.0from
backport-15095-to-releases/v4.34.0
Sep 10, 2026
Merged

Kha merged 1 commit into
releases/v4.34.0from
backport-15095-to-releases/v4.34.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport 1163653 from #15095.

…the enclosing tactic (#15095)

This PR fixes the goal view showing the state after `have` instead of
the goal of an empty nested `have ... := by` block on the following
line, where the next tactic is about to be typed (#15053, regression of
#1927 from #13229).

The `isEmptyBy` heuristic in `InfoTree.goalsAt?` was removed in #13229
because empty `by` blocks no longer produce `.missing` syntax. Instead
of checking for emptiness, `by` blocks and tokens are now flagged as
`hangingBy`, and whether they count as indented is decided by the
enclosing tactic by comparing the hover column with its own column,
which matches where the parser would put a tactic typed at that
position.

Co-authored-by: Claude Fable 5.1 <[email protected]>
(cherry picked from commit 1163653)
@github-actions
github-actions Bot requested a review from mhuisi as a code owner September 10, 2026 12:35
@Kha
Kha merged commit ccd7d3f into releases/v4.34.0 Sep 10, 2026
7 of 8 checks passed
FawadHa1der added a commit to FawadHa1der/lean4 that referenced this pull request Oct 23, 2026
298 upstream commits. The line's merge base with v4.35.0 is master (leanprover#14729); the line also carries the
v4.34.0 release branch's backports (leanprover#14788, leanprover#14791, leanprover#14833, leanprover#14838, leanprover#14849, leanprover#14477's intrinsic-
verification change, leanprover#14938, leanprover#15104), which v4.35.0 holds as the master originals, several reworked
since. Eighteen files conflicted; how each was resolved:

- Upstream-only files (no fork commit touches them): v4.35.0's version, byte for byte —
  CMakeLists.txt (version 4.35), src/Init/{Core,Prelude}.lean, src/Lean/Compiler/LCNF/ToDecl.lean,
  src/Lean/Elab/{BuiltinDo/For,Do/Basic,Tactic/Do/Contract}.lean, src/Lean/Server/InfoUtils.lean
  (drops the v4.34.0-only backport leanprover#15104, which v4.35.0 does not carry), tests/elab/
  {csimp_macroinline,experimentalIntrinsic,intrinsicVerification}.lean; tests/elab/14383.lean (a
  v4.34.0-backport test v4.35.0 does not have) removed. Afterwards every upstream-only file equals
  v4.35.0; the 57 files that differ are the fork's own.
- src/include/lean/lean.h, src/runtime/object.cpp: the conflicts were upstream's reference-count
  ("sticky"/rc_model) code against its v4.34.0 backport: v4.35.0's side; the line's older
  lean_dec_ref_cold (backport, with LEAN_LAZY_RC, which v4.35.0 removed) deleted so v4.35.0's is the
  only one. Kept: the fork's pointer-width LEAN_SCALAR_PTR_LITERAL (lean.h) and task manager
  (0035/0038, object.cpp) — each file now differs from v4.35.0 by exactly those.
- src/stdlib.make.in: the `lean` link keeps the fork's ${LEAN_WASM_SYMTAB} (0039) and takes
  upstream's new ${CMAKE_DYN_EXE_LINKER_FLAGS_MAKE} (leanprover#14884), which is empty under Emscripten
  (-rdynamic and the shared libraries are added only outside it) and needed by native64.
- src/Lean/Shell.lean: both imports (the fork's Lean.Compiler.InitAttr, upstream's Std.Async.Process).
- src/runtime/uv/event_loop.cpp: v4.35.0's line (a comment differed).
- .github/workflows/{build-template,ci}.yml: the fork's CI.
- stage0/: v4.35.0's, with the line's two pointer-width gates re-applied by hand (the patch's context
  moved); wasm64-build/stage0-line-edits.patch refreshed from `git diff --text v4.35.0 -- stage0`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant