Replace check_missing_items.py with jsondoclint#101809
Merged
bors merged 11 commits intorust-lang:masterfrom Sep 16, 2022
Merged
Replace check_missing_items.py with jsondoclint#101809bors merged 11 commits intorust-lang:masterfrom
check_missing_items.py with jsondoclint#101809bors merged 11 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
dfed0ad to
f69a6c2
Compare
CraftSpider
approved these changes
Sep 14, 2022
Contributor
CraftSpider
left a comment
There was a problem hiding this comment.
This looks amazing to me! Much more maintainable than the old check_missing
GuillaumeGomez
approved these changes
Sep 15, 2022
Member
|
This is a great improvement, thanks! @bors r+ |
Collaborator
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Sep 15, 2022
…aumeGomez Replace `check_missing_items.py` with `jsondoclint` [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/check_missing_items.2Epy.20Replacement.2E) check_missing_items.py was a python script that checked rustdoc json output to make sure all the Id's referenced existed in the JSON index. This PR replaces that with a rust binary (`jsondoclint`) that does the same thing. ### Motivation 1. Easier to change when `rustdoc-json-types` changes, as `jsondoclint` uses the types directly. 2. Better Errors: - Multiple Errors can be emited for a single crate - Errors can say where in JSON they occored ``` 2:2889:408 not in index or paths, but refered to at '.index."2:2888:104".inner.items[0]' 2:2890:410 not in index or paths, but refered to at '.index."2:2888:104".inner.items[1]' ``` 3. Catches more bugs. - Because matches are exaustive, all posible variants considered for enums - All Id's checked - Has already found rust-lang#101770, rust-lang#101199 and rust-lang#100973 - Id type is also checked, so the Id's in a structs fields can only be field items. 4. Allows the possibility of running from `rustdoc::json`, which we should do in a crator run at some point. cc `@CraftSpider` r? `@GuillaumeGomez`
Member
Member
Author
|
@Dylan-DPC The rollup failure is due to #101783, not this. That PR touched src/bootstrap/configure.py, and added an f-string, that isn't supported in whatever version of python CI uses |
Member
|
@bors r=GuillaumeGomez |
Collaborator
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Sep 15, 2022
…aumeGomez Replace `check_missing_items.py` with `jsondoclint` [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/check_missing_items.2Epy.20Replacement.2E) check_missing_items.py was a python script that checked rustdoc json output to make sure all the Id's referenced existed in the JSON index. This PR replaces that with a rust binary (`jsondoclint`) that does the same thing. ### Motivation 1. Easier to change when `rustdoc-json-types` changes, as `jsondoclint` uses the types directly. 2. Better Errors: - Multiple Errors can be emited for a single crate - Errors can say where in JSON they occored ``` 2:2889:408 not in index or paths, but refered to at '.index."2:2888:104".inner.items[0]' 2:2890:410 not in index or paths, but refered to at '.index."2:2888:104".inner.items[1]' ``` 3. Catches more bugs. - Because matches are exaustive, all posible variants considered for enums - All Id's checked - Has already found rust-lang#101770, rust-lang#101199 and rust-lang#100973 - Id type is also checked, so the Id's in a structs fields can only be field items. 4. Allows the possibility of running from `rustdoc::json`, which we should do in a crator run at some point. cc `@CraftSpider` r? `@GuillaumeGomez`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 16, 2022
Rollup of 7 pull requests Successful merges: - rust-lang#101722 (Rustdoc-Json: Fix Type docs.) - rust-lang#101738 (Fix `#[link kind="raw-dylib"]` to respect `#[link_name]`) - rust-lang#101753 (Prefer explict closure sig types over expected ones) - rust-lang#101787 (cache `collect_trait_impl_trait_tys`) - rust-lang#101802 (Constify impl Fn* &(mut) Fn*) - rust-lang#101809 (Replace `check_missing_items.py` with `jsondoclint`) - rust-lang#101864 (rustdoc: remove no-op CSS `h1-4 { color: --main-color }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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.
zulip discussion
check_missing_items.py was a python script that checked rustdoc json output to make sure all the Id's referenced existed in the JSON index. This PR replaces that with a rust binary (
jsondoclint) that does the same thing.Motivation
rustdoc-json-typeschanges, asjsondoclintuses the types directly.async fn foo() -> Treturn type is given asimpl Future<Output=T>notT#101199 and Rustdoc-Json: Reference to missing item with 2 glob imports #100973rustdoc::json, which we should do in a crator run at some point.cc @CraftSpider
r? @GuillaumeGomez