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 update from unsupported manifest versions #3149

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

tydeu
Copy link
Member

@tydeu tydeu commented Jan 8, 2024

If the current manifest is from unsupported (or has errors), a bare lake update will now discard it and create a new one from scratch rather than erroring and requiring you to manually delete the manifest. Lake will produce warnings noting it is ignoring such invalid manifests.

@tydeu
Copy link
Member Author

tydeu commented Jan 8, 2024

One design consideration here is whether this should be done on all lake update invocations, including ones asking to only update a single package (e.g., lake update std) or if this behavior should only occur on a bare lake update. This PR currently does the former.

@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 8, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 8, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jan 8, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

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

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 8, 2024
@kim-em
Copy link
Collaborator

kim-em commented Jan 10, 2024

I think I'd personally prefer the more conservative behaviour (only start over on a bare lake update), as usually when I'm running lake update X I really want to be careful to not update the other dependencies, so it isn't helpful if this happens anyway because there was a merge conflict I missed that has borked the manifest.

But I don't think it's critical, this is a rare enough corner case.

@tydeu
Copy link
Member Author

tydeu commented Jan 10, 2024

@semorrison Thanks for the input! I was really unsure myself, so I really appreciate it. I think you are right. The current behavior defaults an invalid manifest lake update foo to essentially a bare lake update, which is generally never the goal when running lake update foo.

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 10, 2024
@tydeu tydeu added the will-merge-soon …unless someone speaks up label Jan 10, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 10, 2024
@tydeu tydeu added this pull request to the merge queue Jan 11, 2024
Merged via the queue into leanprover:master with commit 7150638 Jan 11, 2024
16 checks passed
@tydeu tydeu deleted the lake/update-old-manifest branch January 11, 2024 16:15
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.

3 participants