Skip to content

Commit b648303

Browse files
committed
ci: add --cfg for cargo doc to disable compile_error!()
Some crates, such as vhost, use compile_error!() to indicate that mutually exclusive feature have been specified. This leads to problems when running cargo doc --all-features, which will inevitably trigger these conditions and then lead to documentation not building (for this reason, the vhost documentation currently fails to build on docs.rs for example). Add a custom cfg that gets passed via RUSTFLAGS in the cargo doc CI step on whose absense these compile_error!() macros can be gated, so that they dont cause issues when building documentation in CI A custom cfg is needed because cargo doc does not pass `--cfg doc` down to dependencies. See also rust-vmm/vhost#326 Signed-off-by: Patrick Roy <[email protected]>
1 parent 58dab8b commit b648303

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.buildkite/test_description.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
{
3131
"test_name": "doc",
32-
"command": "RUSTDOCFLAGS=\"-D warnings\" cargo doc --workspace --all-features --no-deps"
32+
"command": "RUSTDOCFLAGS=\"-D warnings\" RUSTFLAGS=\"--cfg RUTSDOC_disable_feature_compat_errors\" cargo doc --workspace --all-features --no-deps"
3333
},
3434
{
3535
"test_name": "unittests-gnu",

0 commit comments

Comments
 (0)