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: explicitly initialize Std in lean_initialize #4668

Merged
merged 3 commits into from
Jul 6, 2024

Conversation

Kha
Copy link
Member

@Kha Kha commented Jul 6, 2024

Fixes the stage 2 build, which runs with prefer_native=true

@Kha Kha enabled auto-merge July 6, 2024 10:48
@Kha Kha added the release-ci Enable all CI checks for a PR, like is done for releases label Jul 6, 2024
@Kha Kha added this pull request to the merge queue Jul 6, 2024
@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 6, 2024
Merged via the queue into leanprover:master with commit 4ed7947 Jul 6, 2024
21 checks passed
@@ -5,5 +5,6 @@ Authors: Markus Himmel
-/
prelude
import Std.Data.DHashMap.Basic
import Std.Data.DHashMap.RawLemmas
Copy link
Member Author

Choose a reason for hiding this comment

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

@TwoFX Just checking, was orphaning the file intentional?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the idea was that in the "normal" use case where you just want to use HashMap and not HashMap.Raw you can just import Std.Data.HashMap and import only the files that are needed for HashMap.

In fact, the same thing should be true for all three of DHashMap, HashMap and HashSet, so I'm surprised that just changing this for DHashMap made any difference.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, maybe it's because DHashMap.RawLemmas has macros in it, unlike HashMap.RawLemmas and HashSet.RawLemmas?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, exactly. It's a limitation of the bootstrapping setup, if you will. But note that a Lake build would also skip orphan files.

Perhaps the import should be moved to Std.Data instead then? Unlikely people will import that and then complain that it contains too much stuff.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me, I'll open a PR.

@Kha Kha deleted the init-std branch July 7, 2024 20:30
@Kha Kha restored the init-std branch September 27, 2024 14:54
@Kha Kha deleted the init-std branch September 27, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-ci Enable all CI checks for a PR, like is done for releases 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