-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Error message on previously nonexistent crate is a bit unhelpful #481
Comments
Completely agreed that this error message leaves a lot to be desired. Thank you for flagging it and offering to look into it! There are definitely a few similar edge cases here:
For each of these, we need (probably in this order):
As a separate issue, for Feel free to tackle as few or as many of these as you'd like. Just please keep PRs small for fast and easy reviews and ask early and often if you feel stuck on anything :) Pointers to codeFor the tests, I'd imagine we'd like to either add them in a file like the existing rustdoc edge cases test, or as a separate GitHub Actions job like the many we already have: https://github.com/obi1kenobi/cargo-semver-checks/blob/main/.github/workflows/ci.yml For the "bin crate newly gained a lib target" test case, you can use For the code that checks crates.io for prior versions to pick as a baseline, you can find it here. You may need to change the API to return something better than |
Cargo hit this issue when importing I don't think we want a fix here, but indeed the error message could be better. |
@nmathewson any chance you're still interested in taking a look at resolving this issue? Happy to mentor if so! |
Hi! Theoretically someday, but probably not soon... if anybody else wants to pick this up, they should feel free. |
When explicitly checking a crate I agree a better error message rather than a fix might be better. But for workspaces when adding a new crate it's inconvenient that it'll cause semver-checks to fail for the first time until the crate is published. It may be more appropriate to be a warning. |
Steps to reproduce the bug with the above code
Run
cargo-semver-checks
on a workspace in which at least one crate has been created since the previous revision.Actual Behaviour
At the end of its output, you get an error message like this:
This was confusing to me for several reasons:
--exclude tor-geoip
in order to get valid output for my other crates.Expected Behaviour
If this message has to appear at the end of the output, I would prefer a message more along the lines of:
If the message can reasonably occur in the middle of the output, I'd prefer something like:
Generated System Information
cargo version
Compile time information
The text was updated successfully, but these errors were encountered: