cargo-docs-rs
cargo-docs-rs copied to clipboard
fix small bug with rustflags and add more CI to test very basic cases
This PR fixes some code duplication (see f7d3df9f22a1b84867155781b66ad881ce899682) and introduces multiple basic layouts to test various common examples of workspaces and custom rustdoc flags.
The cargo_config_rustflags
example was failing for me before removing the duplicate code.
I am very happy about feedback.
PS: I have been using your libraries (like many people do) extensively and I very much appreciate the work that you do for the community.
Thanks for the PR. I don't think this is the right fix — docs.rs does pass
--config build.rustflags
, for example in this build: https://docs.rs/crate/proc-macro2/1.0.79/builds/1154848.
But there is some code duplication in lines 189 to 193 in main.rs
which does not seem correct to me. The build you sent should still pass when applying my patch from commit f7d3df9f22a1b84867155781b66ad881ce899682.
One of those is configuring build.rustflags and the other is configuring host.rustflags. They are not duplicated.
This is clearly an oversight on my part and I see now why my initial attempt of fixing is wrong. I will probably come back to this. Are you still interested in the additional test cases?