Skip to content

chore: remove dead @[export] attributes - #14306

Merged
Kha merged 3 commits into
masterfrom
dead-export-attrs
Jul 7, 2026
Merged

Kha merged 3 commits into
masterfrom
dead-export-attrs

Conversation

@Kha

@Kha Kha commented Jul 7, 2026

Copy link
Copy Markdown
Member

No description provided.

Kha added 2 commits July 7, 2026 09:48
Remove 25 `@[export]` attributes whose exported C symbol is referenced by nothing — no hand-written C/C++, and no Lean `@[extern]` consumer.
Follow-up to removing the dead `@[export]` attributes: these defs existed solely to be C-exported (thin `…Ex`/`…Export`/`…Imp` wrappers) and have no remaining Lean callers.
@Kha
Kha enabled auto-merge July 7, 2026 09:51
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jul 7, 2026
@leanprover-bot

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-07-03 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-07-07 10:31:50)

@github-actions github-actions Bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Jul 7, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Jul 7, 2026
@mathlib-lean-pr-testing

mathlib-lean-pr-testing Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Mathlib CI status (docs):

`freeRegions` and `isSetExport` were wrongly removed as dead: their `@[export]` forces the C calling convention (owned params / an unboxed version), which is load-bearing for codegen, not just linkage. Removing `freeRegions`'s export let borrow inference make `env` borrowed, causing a use-after-free (the `leanchecker` and `user_attr_app` test failures).
@Kha
Kha added this pull request to the merge queue Jul 7, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/batteries that referenced this pull request Jul 7, 2026
mathlib-nightly-testing Bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jul 7, 2026
Merged via the queue into master with commit 4333825 Jul 7, 2026
15 checks passed
@Kha
Kha deleted the dead-export-attrs branch July 7, 2026 21:16
mathlib-bors Bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Jul 16, 2026
AndPuQing added a commit to LeanOxide/leo3 that referenced this pull request Aug 1, 2026
- lean_mk_empty_environment export was removed in Lean 4.33 (leanprover/lean4#14306);
  bind the Lean-compiled l_Lean_mkEmptyEnvironment symbol with identical ABI
- lean_add_decl/lean_elab_add_decl gained a maxRecDepth argument in Lean 4.33
  (leanprover/lean4#13956); pass 0 (unlimited) to preserve prior behavior
- dispatch both on the existing lean_4_33 version cfg; no regressions for
  stable/nightly/v4.20.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants