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

Fix rustdoc argument error #88831

Closed
wants to merge 4 commits into from
Closed

Conversation

inashivb
Copy link
Contributor

This is the fix is corresponding to #88756 mentored by @jyn514

@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2021
@inashivb
Copy link
Contributor Author

r? @jyn514

@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 10, 2021
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for this - it would go somewhere in run-make, there should be existing rustdoc tests there you can use as examples.

src/librustdoc/config.rs Outdated Show resolved Hide resolved
@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 10, 2021
@GuillaumeGomez
Copy link
Member

Can you add a test in src/test/rustdoc-ui where you give no arguments to rustdoc please?

@rust-log-analyzer

This comment has been minimized.

@inashivb
Copy link
Contributor Author

Can you add a test in src/test/rustdoc-ui where you give no arguments to rustdoc please?

Thank you for the prompt review! :)
I'm observing many existing tests failing on x86_64-gnu-llvm-10, ubuntu-latest-xl which were not really failing on my system, could you please tell me how should I investigate these?

@GuillaumeGomez
Copy link
Member

Just in case you don't know how to run tests:

$ x.py test src/test/rustdoc --stage 1
$ x.py test src/test/rustdoc-ui --stage 1

If one of the two doesn't work, it's very likely your change which broke them.

@inashivb
Copy link
Contributor Author

Just in case you don't know how to run tests:

$ x.py test src/test/rustdoc --stage 1
$ x.py test src/test/rustdoc-ui --stage 1

If one of the two doesn't work, it's very likely your change which broke them.

Thank you. I indeed did not test the right way. I just ran x.py test and that seemed to work. I seem to have broken many things. I'll work on resolving them.

@rust-log-analyzer

This comment has been minimized.

@inashivb inashivb force-pushed the issue-88756 branch 3 times, most recently from da065fa to 3c0e6d6 Compare September 15, 2021 02:42
@GuillaumeGomez
Copy link
Member

Looks good to me, thanks! Wanna take a last look @jyn514 ?

src/test/run-make/issue-88756-default-output/Makefile Outdated Show resolved Hide resolved
src/librustdoc/config.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented Oct 3, 2021

Hi @inashivb do you know how to make progress here? Do you need help?

@inashivb
Copy link
Contributor Author

inashivb commented Oct 6, 2021

Hi @inashivb do you know how to make progress here? Do you need help?

Hi @jyn514 ! Yes. Could you please tell where in rustc code can I find the cmdline arguments setting and rendering? I could not find any usage of crate::usage or the help strings for any option other than in the doc directory.

@inashivb
Copy link
Contributor Author

Hi @Dylan-DPC ! thanks for tagging me. I must have missed the notifications for change in labels. Could you please take a look at the branch now?

@notriddle
Copy link
Contributor

@bors r=GuillaumeGomez,notriddle rollup=never

@bors
Copy link
Contributor

bors commented Apr 28, 2022

📌 Commit d532d36 has been approved by GuillaumeGomez,notriddle

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 28, 2022
@bors
Copy link
Contributor

bors commented Apr 28, 2022

⌛ Testing commit d532d36 with merge 4f2debcec269b9b4f82c6afff01890547d2c07d1...

@bors
Copy link
Contributor

bors commented Apr 28, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 28, 2022
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
error: make failed
status: exit status: 2
command: "make"
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-88756-default-output/issue-88756-default-output:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc' 2>&1 | diff - output-default.stdout
193c193
< More information available at https://doc.rust-lang.org/1.62.0/rustdoc/what-is-rustdoc.html
---
> More information available at https://doc.rust-lang.org/nightly/rustdoc/what-is-rustdoc.html
--- stderr -------------------------------
--- stderr -------------------------------
make: *** [Makefile:4: all] Error 1



failures:

@inashivb
Copy link
Contributor Author

I see the cause of failure as

< More information available at https://doc.rust-lang.org/1.62.0/rustdoc/what-is-rustdoc.html
---
> More information available at https://doc.rust-lang.org/nightly/rustdoc/what-is-rustdoc.html

Is there a VERSION or something env var? I tried looking for version in small and caps but can't see rust specific version setting. Could you please assist here?

@notriddle
Copy link
Contributor

Yeah, it's called $CHANNEL

@compiler-errors
Copy link
Member

I did a bors resync and this seems to have gotten reapproved, sorry for the noise

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 7, 2022
@compiler-errors compiler-errors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 7, 2022
@inashivb
Copy link
Contributor Author

Yeah, it's called $CHANNEL

@notriddle could you please assist in how to use it? I cannot seem to make it work by setting it on Makefile or the main.rs file (that I saw some UI tests do) [not sure if I'm reading it right though 😓 ]

@notriddle
Copy link
Contributor

notriddle commented May 20, 2022

It looks like $CHANNEL is usually done in tests as a normalization, done on a case-by-case basis. Look at the first line of this test case, for example.

However, since you aren’t using compiletest, you’ll need to implement the normalization yourself. For example, use a command like this one in the makefiles.

$(BARE_RUSTDOC) 2>&1 | sed 's@nightly|beta|1\.[0-9][0-9]\.[0-9]@$$CHANNEL@g' | diff - output-default.stdout

@bors
Copy link
Contributor

bors commented May 21, 2022

☔ The latest upstream changes (presumably #97239) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC Dylan-DPC added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 8, 2022
@GuillaumeGomez
Copy link
Member

I finished this PR in #98331.
Thanks @inashivb for working on this!

@Dylan-DPC Dylan-DPC removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 21, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 27, 2022
…=notriddle

Fix rustdoc argument error

Fixes rust-lang#88756.

It's a take over of rust-lang#88831. I cherry-picked the commits, fixed the merge conflict and the failing test.

cc `@inashivb` `@jyn514`

r? `@notriddle`
@inashivb inashivb deleted the issue-88756 branch July 21, 2022 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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