Allow to specify RUSTDOCFLAGS independently#654
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 28, 2022
Merged
Conversation
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"
```
Member
|
@bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
Member
|
This'll currently need a manual deployment, but I'll take care of that hopefully tomorrow or over the weekend. |
Member
|
This is now deployed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, if you to run this experiment:
crater will mix up
RUSTFLAGSandRUSTDOCFLAGSand you will get the following error:Solve this by allowing
rustdocandrustdocflagsto be specified independently. After this change, this works without unexpected errors:Not sure if this change breaks compatibility in some way, but it seems like a rather generic and future-proof solution to me.