cargo-docs-rs icon indicating copy to clipboard operation
cargo-docs-rs copied to clipboard

fix small bug with rustflags and add more CI to test very basic cases

Open jonaspleyer opened this issue 11 months ago • 3 comments

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.

jonaspleyer avatar Mar 01 '24 09:03 jonaspleyer

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.

jonaspleyer avatar Apr 07 '24 20:04 jonaspleyer

One of those is configuring build.rustflags and the other is configuring host.rustflags. They are not duplicated.

dtolnay avatar Apr 07 '24 20:04 dtolnay

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?

jonaspleyer avatar Apr 08 '24 05:04 jonaspleyer