-
Notifications
You must be signed in to change notification settings - Fork 196
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(cli): remove backup/restore/force options from set-version #1687
Conversation
🦋 Changeset detectedLatest commit: 5a3f2bb The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
.changeset/lucky-clocks-love.md
Outdated
"@latticexyz/cli": major | ||
--- | ||
|
||
Removes `.mudbackup` file handling and `--backup`, `--restore, `--force` options from `mud set-version` command. Git will do a better job of this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add some quick instructions for how to do the same with git
to the changelog?
e.g.
# restore all package.json to the version on <commit>
git checkout <commit> -- package.json && \
git checkout <commit> -- packages/contracts/package.json && \
git checkout <commit> -- packages/client/package.json
# restore all package.json the version on the `main` branch
git checkout main -- package.json && \
git checkout main -- packages/contracts/package.json && \
git checkout main -- packages/client/package.json
(Note i haven't actually tested these, we should make sure this works)
Now that i'm typing this out i wonder if git is actually doing a better job here? What if more packages changed in the meantime? (Is there another way to do this via git that i'm missing here?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately I don't really think it's our job to figure out a user's upgrade path and how they resolve diffs in their files (it's hard to get this right and not worth the complexity). In my mind, set-version
is and should be just a shortcut for doing something like
pnpm up -r "@latticexyz/*@next"
except it takes into account all packages (not all of ours are prefixed with @latticexyz/
) and has support for linking all packages too.
Edit: looks like this CLI doesn't support non-prefixed packages, but probably ought to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree the restore
feature can be easily replaced with looking at the git history and then using pnpm mud set-version <prev-version>
to reset it (especially since all MUD packages should have aligned versions). Still think that if we remove a feature we need to add instructions to the changeset for how to do the same with with the now recommended way (even if it's just "look up the previous version with git diff main package.json
and run pnpm mud set-version <prev-version>
")
Did a little refactor to support all MUD packages (note how these include e.g. solhint-plugin-mud)
|
closes #1678