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
Auto merge of #654 - Enselic:rustdocflags, r=Mark-Simulacrum
Allow to specify `RUSTDOCFLAGS` independently
Currently, if you to run this experiment:
```
cargo run -- define-ex --ex rustdoc-json-broken --mode rustdoc \
--cap-lints warn --crate-select list:serde \
"nightly-2022-06-01+rustflags=-Z unstable-options --output-format json" \
"nightly+rustflags=-Z unstable-options --output-format json" \
```
crater will mix up `RUSTFLAGS` and `RUSTDOCFLAGS` and you will get the following error:
```
[INFO] [stderr] process didn't exit successfully: `rustc - --crate-name ___ \
--print=file-names --cap-lints=warn -Z unstable-options --output-format json \
--crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib \
--crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` \
(exit status: 1)
[INFO] [stderr] --- stderr
[INFO] [stderr] error: Unrecognized option: 'output-format'
```
Solve this by allowing `rustdoc` and `rustdocflags` to be specified independently. After this change, this works without unexpected errors:
```
cargo run -- define-ex --ex rustdoc-json-ice --mode rustdoc \
--cap-lints warn --crate-select list:serde \
"nightly-2022-06-01+rustdocflags=-Z unstable-options --output-format json" \
"nightly+rustdocflags=-Z unstable-options --output-format json"
```
Not sure if this change breaks compatibility in some way, but it seems like a rather generic and future-proof solution to me.
0 commit comments