Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: invalid namespace completions #5322

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

mhuisi
Copy link
Contributor

@mhuisi mhuisi commented Sep 12, 2024

This PR fixes an issue reported a while ago at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.60Monad.2Emap.60.20is.20a.20namespace.3F/near/425662846 where Monad.map was incorrectly reported by the autocompletion as a namespace.

The underlying issue is that Monad.map contains an internal declaration _default. This PR ensures that no namespaces are registered that only contain internal declarations.

This also means that opening namespaces that only contain internal declarations will now fail.

The Mathlib adaption for this is a minor change where a declaration (i.e. a namespace that only contains internal declarations) was opened by accident.

@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 Sep 12, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Sep 12, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Sep 12, 2024
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Sep 12, 2024
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

@leanprover-community-bot leanprover-community-bot added builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Sep 12, 2024
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

@mhuisi mhuisi added this pull request to the merge queue Sep 13, 2024
Merged via the queue into leanprover:master with commit f989520 Sep 13, 2024
21 checks passed
@mhuisi mhuisi deleted the mhuisi/invalid-namespace-completions branch September 13, 2024 12:44
tobiasgrosser pushed a commit to opencompl/lean4 that referenced this pull request Sep 16, 2024
This PR fixes an issue reported a while ago at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.60Monad.2Emap.60.20is.20a.20namespace.3F/near/425662846
where `Monad.map` was incorrectly reported by the autocompletion as a
namespace.

The underlying issue is that `Monad.map` contains an internal
declaration `_default`. This PR ensures that no namespaces are
registered that only contain internal declarations.

This also means that `open`ing namespaces that only contain internal
declarations will now fail.

The Mathlib adaption for this is a minor change where a declaration
(i.e. a namespace that only contains internal declarations) was `open`ed
by accident.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR 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.

3 participants