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

feat: lake: improved platform information & control #3226

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

tydeu
Copy link
Member

@tydeu tydeu commented Jan 29, 2024

This combines a few platform-related changes:

  • Add a ternary platformIndependent Lean configuration option to assert whether Lake should assume Lean code is platform-independent. If true, Lake will exclude platform-independent objects like external libraries or dynlibs created through precompileModules from module traces. If false, Lake will add the platform to module traces. If none (the default), Lake will retain the current behavior (modules are platform-dependent if and only if it depends on native objects).
  • Use System.Platform.target from feat: System.Platform.target #3207 as the platform descriptor in Lake for the configuration file trace, the cloud release archive, and as the platform trace in Lean modules and native artifacts (e.g., object files, and static and shared libraries).
  • Do not add the platform descriptor into custom build archive names (i.e., a user-set buildArchive configuration). This allows users to create cross-platform / platform-independent archives via a name override should they so desire.

Closes #2754.

@tydeu tydeu force-pushed the lake/platform-touchups branch 2 times, most recently from c6be1e0 to 0a3a5ff Compare January 29, 2024 17:06
@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 Jan 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 29, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan full-ci labels Jan 29, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented Jan 29, 2024

Mathlib CI status (docs):

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 29, 2024
@tydeu tydeu force-pushed the lake/platform-touchups branch 2 times, most recently from 2649c6c to 2e3b4aa Compare January 30, 2024 15:56
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 30, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 30, 2024
kim-em added a commit to leanprover-community/ProofWidgets4 that referenced this pull request Jan 30, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Jan 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 31, 2024
@tydeu tydeu force-pushed the lake/platform-touchups branch from 2e3b4aa to f876f9a Compare January 31, 2024 20:35
@tydeu tydeu added the will-merge-soon …unless someone speaks up label Jan 31, 2024
@tydeu tydeu force-pushed the lake/platform-touchups branch from f876f9a to c49da9a Compare January 31, 2024 20:50
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 31, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 31, 2024
@kim-em
Copy link
Collaborator

kim-em commented Jan 31, 2024

Can we verify that

git checkout lean-pr-testing-3226
elan toolchain uninstall leanprover/lean4-pr-releases:pr-release-3226 # make sure we have the latest PR toolchain
lake exe cache get

works in Mathlib before merging this? It seems to not retrieve any oleans at present.

@tydeu
Copy link
Member Author

tydeu commented Jan 31, 2024

@semorrison I am confused, how would this prevent cache from downloading oleans? It is my understanding the cache uses it own custom traces for oleans. If this broke anything, I would think it would be lake build rebuilding mathlib.

@kim-em
Copy link
Collaborator

kim-em commented Jan 31, 2024

@semorrison I am confused, how would this prevent cache from downloading oleans? It is my understanding the cache uses it own custom traces for oleans. If this broke anything, I would think it be lake build rebuilding mathlib.

I suspect it is just that you force pushed just recently, so no update to date oleans are available right now anyway. So not an indication of a problem, just a request that we run this check successfully at least once before merging!

(I don't want to have something hit nightly on release day that could conceivably break the cache, without checking!)

@tydeu
Copy link
Member Author

tydeu commented Jan 31, 2024

@semorrison I just tested (now the cache is uploaded) and lake exe cache get && lake build works for me. Does it work for you as well (testing on each of our different platforms seems wise)?

@tydeu tydeu added this pull request to the merge queue Jan 31, 2024
Merged via the queue into leanprover:master with commit a48ca7b Feb 1, 2024
21 checks passed
@tydeu tydeu deleted the lake/platform-touchups branch February 1, 2024 04:56
kim-em added a commit to leanprover-community/ProofWidgets4 that referenced this pull request Feb 2, 2024
@tydeu
Copy link
Member Author

tydeu commented Mar 1, 2024

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit c49da9a.
There were no significant changes against commit 5f59d7f.

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 will-merge-soon …unless someone speaks up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build archives not differentiated by architecture
5 participants