-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Checking crates without a lib target causes a crash #451
Comments
I was trying to understand if it's possible to run the cargo-semver-checks binary in parallel in the same workspace for different crates. |
@thomaseizinger reported the same crash to me over email a few days ago, I just forgot to open an issue. It happens because cargo-semver-checks tried to semver-check a crate with no lib target (e.g. a bin crate). The fix is to check whether crates have a lib target, both in current and in baseline:
In a workspace, we skip crates with no lib targets just like we skip crates with Otherwise, if told to check a specific crate directly, we should exit with an error saying that the crate has no lib target to check. I believe this is the case your command hit here. I have one heck of a busy week coming up so I don't think I'll be able to look at this particularly soon. Might you be interested @marcoieni? I'd be happy to code review and point you in the right direction, of course. |
Thanks for the explanation! Unfortunately I have no time to work on this :( |
I am only too familiar with the feeling! 😅 |
Steps to reproduce the bug with the above code
Actual Behaviour
Expected Behaviour
The program shouldn't panic.
Generated System Information
Software version
cargo-semver-checks 0.20.0
Operating system
macOS 13.1 (Darwin 22.2.0)
Command-line
cargo version
Compile time information
Build Configuration
Additional Context
The text was updated successfully, but these errors were encountered: