-
Notifications
You must be signed in to change notification settings - Fork 228
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
Use cargo hack
in release process
#804
Conversation
nu_release
to dry run publishing beforehandcargo hack
in release process
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.
LGTM
|
||
log warning "publishing the first wave of crates" | ||
for crate in $subcrates_wave_1 { | ||
cargo publish -p $crate |
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.
Ah that's nicer than accidentally ending up in the wrong directory on failure which we encountered in the past. (shouldn't be a problem with the current script due to def
scoping, and is nicer anyway.
- [ ] then, ensure there are no compilation errors with any combination of features by running: | ||
```nushell | ||
cargo hack --all --feature-powerset --skip default-no-clipboard,stable,wasi,mimalloc check | ||
``` | ||
(this will take a while...) | ||
- [ ] check for build errors by running: | ||
```nushell | ||
cargo hack --all build | ||
``` | ||
(this will build each crate with default features) |
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.
In my eye that is a slightly different step than the mechanical version bumping (with a cargo check
to not miss it in the Cargo.lock
) but should do the trick.
This PR adds two
cargo hack
commands to the release process to check for errors due to combination of features. The first one will runcargo check
on each crate multiple times over, toggling different combinations of features each time. This is to check for compilation errors regarding missing imports, etc. The second command will runcargo build
for each crate separately (with default features) to check for build errors (frombuild.rs
or whatever).Using the error from the 0.90.0 publishing as a test, the first command does indeed find the compilation error.
In the future, we should probably put these commands into a manually triggered CI job so that they will be run on multiple platforms.
Also, this PR cleans up
nu_release.nu
a little bit.