-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read docs.rs metadata when running rustdoc
- Add tests for doc runs - Only give an error when docs.rs feature is set in the test crate This allows distinguishing between 'any doc run' and 'doc run that uses docs.rs features' - Set RUSTC_BOOTSTRAP for doc runs This is required for both docs.rs features and the flags passed by docsrs_metadata to cargo. - Only use docs.rs features for libraries `docsrs_metadata` unconditionally passes `--lib` to cargo, which gives a hard error when no library is present. This also required changing the setup in `runner/tests` to pass through the full package metadata to all test runners.
- Loading branch information
Showing
13 changed files
with
355 additions
and
36 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "docs-rs-features" | ||
version = "0.1.0" | ||
authors = ["Joshua Nelson <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
|
||
[package.metadata.docs.rs] | ||
features = ["docs_rs_feature"] | ||
|
||
[features] | ||
docs_rs_feature = [] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#[cfg(feature = "docs_rs_feature")] | ||
compile_error!("oh no, a hidden regression!"); | ||
|
||
fn main() { | ||
println!("Hello, world!"); | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[server.bot-acl] | ||
rust-teams = true | ||
github = ["pietroalbini"] | ||
|
||
[server.labels] | ||
remove = "^S-" | ||
experiment-queued = "S-waiting-on-crater" | ||
experiment-completed = "S-waiting-on-review" | ||
|
||
[server.distributed] | ||
chunk-size = 32 | ||
|
||
[demo-crates] | ||
crates = [] | ||
github-repos = [] | ||
local-crates = ["build-pass", "docs-rs-features"] | ||
|
||
[sandbox] | ||
memory-limit = "512M" | ||
build-log-max-size = "2M" | ||
build-log-max-lines = 1000 | ||
|
||
[crates] | ||
|
||
[github-repos] | ||
|
||
[local-crates] |
Oops, something went wrong.