Skip to content

fix: namespace used in private import and current module vanishes dowstream#12840

Draft
Kha wants to merge 2 commits intoleanprover:masterfrom
Kha:push-ttrmmvzpzvnt
Draft

fix: namespace used in private import and current module vanishes dowstream#12840
Kha wants to merge 2 commits intoleanprover:masterfrom
Kha:push-ttrmmvzpzvnt

Conversation

@Kha
Copy link
Member

@Kha Kha commented Mar 8, 2026

This PR fixes an issue where the use of private imports led to unknown namespaces in downstream modules.

Fixes #12833

@Kha Kha requested a review from mhuisi as a code owner March 8, 2026 17:21
@Kha Kha marked this pull request as draft March 8, 2026 17:21
/-- Return a set containing all namespaces in `env`. -/
def getNamespaceSet (env : Environment) : NameSSet :=
/-- Returns a set (more specifically, a map to namespace visibility) containing all namespaces in `env`. -/
public def getNamespaceSet (env : Environment) : SMap Name Visibility :=
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datokrat This is the def I would like to move to an iterator, for which we would need to append the two SMap parts

@Kha
Copy link
Member Author

Kha commented Mar 9, 2026

!bench

@leanprover-radar
Copy link

leanprover-radar commented Mar 9, 2026

Benchmark results for c00b30c against 333ab1c are in! @Kha

  • 🟥 build//instructions: +425.7M (+0.00%)

Small changes (1✅, 1🟥)

  • 🟥 build/module/Lean.Namespace//instructions: +551.5M (+65.35%) (reduced significance based on *//lines)
  • compiled/workspaceSymbolsNewRanges//instructions: -2.6M (-0.34%)

@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 Mar 9, 2026
@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-03-05 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-03-09 11:23:47)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Mar 9, 2026
@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 Mar 9, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Mar 9, 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 Mar 9, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

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.

Namespaces from imported modules not visible in module files (namespacesExt asyncMode .local)

3 participants