You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo new testing --lib
$ cd testing
$ cargo new test2 --bin
To testing/Cargo.toml, append:
[workspace]
members = ["test2"]
To test2/Cargo.toml, append:
[[bin]]
name = "test3-actually"path = "src/main.rs"
As far as I know cargo-semver-checks requires the crate to be published to crates.io with no way to disable looking for the crate in the index, so this won't be reproducible with a minimal setup like this; however I have run across this issue in Mica - feel free to test based on this commit.
Actual Behaviour
What will happen is cargo semver-checks check-release --workspace will fail, saying it could not find the expected rustdoc output. I haven't published the minimal setup above for obvious reasons, but on mica this can be easily reproduced with the following output:
Updating index
Parsing mica v0.5.0 (current)
Parsing mica v0.5.0 (baseline)
Parsing mica-cli v0.5.0 (current)
Error: Could not find expected rustdoc output for `mica-cli`: /home/daknus/Coding/Rust/mica/target/semver-checks/target/doc/mica_cli.json
because mica-cli renames its bin target to mica.
Expected Behaviour
cargo-semver-check should not fail and instead find the rustdoc JSON successfully.
Additional Context
What happens is that the custom named bin target causes rustdoc to use that target's name when outputting the JSON file. I have not tested what happens with multiple bin targets.
Debug Output
No response
The text was updated successfully, but these errors were encountered:
As far as I know cargo-semver-checks requires the crate to be published to crates.io with no way to disable looking for the crate in the index
There are actually multiple ways to load the baseline, only one of which (the default one) requires the crate to be on crates.io:
Baseline:
--baseline-version <X.Y.Z>
Version from registry to lookup for a baseline
--baseline-rev <REV>
Git revision to lookup for a baseline
--baseline-root <MANIFEST_ROOT>
Directory containing baseline crate source
--baseline-rustdoc <JSON_PATH>
The rustdoc json file to use as a semver baseline
The above is an excerpt from cargo semver-checks check-release --help.
We should probably do a better job of documenting this in the README as well.
Steps to reproduce the bug with the above code
To reproduce this setup:
To
testing/Cargo.toml
, append:To
test2/Cargo.toml
, append:As far as I know cargo-semver-checks requires the crate to be published to crates.io with no way to disable looking for the crate in the index, so this won't be reproducible with a minimal setup like this; however I have run across this issue in Mica - feel free to test based on this commit.
Actual Behaviour
What will happen is
cargo semver-checks check-release --workspace
will fail, saying it could not find the expected rustdoc output. I haven't published the minimal setup above for obvious reasons, but on mica this can be easily reproduced with the following output:because
mica-cli
renames its bin target tomica
.Expected Behaviour
cargo-semver-check should not fail and instead find the rustdoc JSON successfully.
Additional Context
What happens is that the custom named
bin
target causes rustdoc to use that target's name when outputting the JSON file. I have not tested what happens with multiplebin
targets.Debug Output
No response
The text was updated successfully, but these errors were encountered: