Skip to content

Conversation

@mitchellwrosen
Copy link
Member

@mitchellwrosen mitchellwrosen commented Sep 12, 2025

Overview

This PR makes upgrade work like update when it fails – the branch it puts you on has all dependents of the failures removed from the underlying namespace, so deleting any from the scratch file functions like a delete.

It also makes a successful update on an "upgrade branch" merge the branch back into the parent, like a successful update on an "update branch". So, upgrade.commit is no longer necessary and was replaced with a stub implementation.

Finally, I elected to make upgrade on both an "update branch" and "upgrade branch" fail immediately with an error message. I think we can revisit this and try to find a sensible implementation, but you basically don't ever want to do this with the current implementation, so I think it's better to disallow it. The workaround is to upgrade one library at a time (if trying to upgrade while resolving a failed upgrade), or upgrade before updating (if trying to upgrade while resolving a failed update).

Test coverage

I added a case to the existing transcript to demonstrate that upgrade has this delete-y behavior, and also manually tested in the terminal.

@mitchellwrosen mitchellwrosen marked this pull request as ready for review September 12, 2025 18:39
@aryairani
Copy link
Contributor

This is gonna be great

@aryairani aryairani merged commit 5e23d41 into trunk Sep 12, 2025
32 checks passed
@aryairani aryairani deleted the upgrade-branch branch September 12, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants