Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] jsondoclint: Check links field #105015

Closed

Conversation

aDotInTheVoid
Copy link
Member

@aDotInTheVoid aDotInTheVoid commented Nov 28, 2022

Note that this currently fails, due to #105025 a newly discovered bug in rustdoc-json (will post soon, after I have a MCVE)

---- [rustdoc-json] src/test/rustdoc-json/fns/async_return.rs stdout ----

error: jsondoclint failed!
status: exit status: 1
command: "/home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/jsondoclint" "/home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/fns/async_return/async_return.json"
stdout: none
--- stderr -------------------------------
2:54321:199 not in index or paths, but refered to at '$.index["2:14227:1011"].links["Poll::Ready"]'
2:54324:186 not in index or paths, but refered to at '$.index["2:14227:1011"].links["`Poll::Pending`"]'
2:14562:2921 not in index or paths, but refered to at '$.index["2:14227:1011"].links["crate::task::Waker::wake"]'
Error: Errors validating json /home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/fns/async_return/async_return.json
------------------------------------------

r? @ghost

@rustbot modify labels: +A-testsuite

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-testsuite Area: The testsuite used to check the correctness of rustc labels Nov 28, 2022
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [rustdoc-json] src/test/rustdoc-json/fns/async_return.rs stdout ----

error: jsondoclint failed!
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/jsondoclint" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-json/fns/async_return/async_return.json"
stdout: none
--- stderr -------------------------------
2:54324:186 not in index or paths, but refered to at '$.index["2:14227:1011"].links["`Poll::Pending`"]'
2:14562:2920 not in index or paths, but refered to at '$.index["2:14227:1011"].links["crate::task::Waker::wake"]'
2:54321:199 not in index or paths, but refered to at '$.index["2:14227:1011"].links["Poll::Ready"]'
Error: Errors validating json /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-json/fns/async_return/async_return.json



failures:

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 28, 2022
…test, r=GuillaumeGomez

Rustdoc-Json: Add tests for linking to foreign variants.

I initially taught these would be bugs, but it turn out they work perfectly, and the variant is added to paths.

Most of the work is done by jsondoclint checking all the ID's resolve (although this wont happen for links until rust-lang#105015, which in turn is blocked on removing foreign traits), but we do check that neither the enum nor the variant is inlined, so it must be resolved correctly through paths.

r? `@GuillaumeGomez`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 29, 2022
…test, r=GuillaumeGomez

Rustdoc-Json: Add tests for linking to foreign variants.

I initially taught these would be bugs, but it turn out they work perfectly, and the variant is added to paths.

Most of the work is done by jsondoclint checking all the ID's resolve (although this wont happen for links until rust-lang#105015, which in turn is blocked on removing foreign traits), but we do check that neither the enum nor the variant is inlined, so it must be resolved correctly through paths.

r? ``@GuillaumeGomez``
@aDotInTheVoid
Copy link
Member Author

Now included in #105182

JohnTitor pushed a commit to JohnTitor/rust that referenced this pull request Dec 3, 2022
…s, r=Enselic,GuillaumeGomez

Rustdoc-Json: Don't inline foreign traits

It wasn't done correctly, and [we want to move towards only having local items in the index, and making foreign items easier to resolved](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Rustdoc.20JSON.3A.20Include.20All.20Foreign.20Items.3F)

Fixes rust-lang#105025. This means rust-lang#105015 is included to test this

Fixes rust-lang#105022

r? `@GuillaumeGomez`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants