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

Output complete repro command when failing to generate rustdoc JSON. #676

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

obi1kenobi
Copy link
Owner

@obi1kenobi obi1kenobi commented Feb 28, 2024

Resolves #570 by making it more likely that users are able to resolve the build error on their own, instead of being confused about why cargo-semver-checks is failing to build their project.

For example, for #570 we now output:

error: failed to build rustdoc for crate boa_icu_provider v0.17.3
note: this is usually due to a compilation error in the crate,
      and is unlikely to be a bug in cargo-semver-checks
note: the following command can be used to reproduce the compilation error:
      cargo new --lib example &&
          cd example &&
          echo '[workspace]' >> Cargo.toml &&
          cargo add --path /tmp/boa/boa_icu_provider --no-default-features --features bin,default,full,std &&
          cargo check

which I've checked correctly reproduces the build issue. The previous advice to run cargo build surprisingly did not reproduce the problem, which is why I'm replacing it with this new command.

Resolves #570 by making it more likely that users are able to resolve the build error on their own, instead of being confused about why cargo-semver-checks is failing to build their project.
@obi1kenobi obi1kenobi enabled auto-merge (squash) February 28, 2024 15:09
@obi1kenobi obi1kenobi added the C-enhancement Category: raise the bar on expectations label Feb 28, 2024
@obi1kenobi obi1kenobi merged commit febd285 into main Feb 28, 2024
33 checks passed
@obi1kenobi obi1kenobi deleted the better_build_error_repro branch February 28, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: raise the bar on expectations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crate fails to compile
1 participant