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

refactor tool_doc! #112234

Merged
merged 1 commit into from
Jun 30, 2023
Merged

refactor tool_doc! #112234

merged 1 commit into from
Jun 30, 2023

Conversation

onur-ozkan
Copy link
Member

@rustbot
Copy link
Collaborator

rustbot commented Jun 3, 2023

r? @albertlarsan68

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jun 3, 2023
@albertlarsan68
Copy link
Member

Thanks for the PR!
@bors r+

@bors
Copy link
Contributor

bors commented Jun 3, 2023

📌 Commit 8b7e794 has been approved by albertlarsan68

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2023
@bors
Copy link
Contributor

bors commented Jun 3, 2023

⌛ Testing commit 8b7e794 with merge ac7981dd93a8a239079057a620979a18c603c3d6...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jun 3, 2023

💔 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 Jun 3, 2023
@onur-ozkan
Copy link
Member Author

failures:

---- [run-make] tests\run-make\rustdoc-scrape-examples-multiple stdout ----

error: make failed
status: exit code: 2
command: "make"
--- stdout -------------------------------
make[1]: Entering directory '/c/a/rust/rust/tests/run-make/rustdoc-scrape-examples-multiple'
PATH="/c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple:C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin:/c/a/rust/rust/build/x86_64-pc-windows-gnu/stage0-bootstrap-tools/x86_64-pc-windows-gnu/release/deps:/c/a/rust/rust/build/x86_64-pc-windows-gnu/stage0/bin:/c/a/rust/rust/ninja:/c/a/rust/rust/mingw64/bin:/c/hostedtoolcache/windows/Python/3.11.3/x64/Scripts:/c/hostedtoolcache/windows/Python/3.11.3/x64:/usr/bin:/c/a/rust/rust/sccache:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/cf-cli:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.9.3/x64:/c/cabal/bin:/c/ghcup/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.3.0/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/GitHub CLI:/c/Program Files/Git/bin:/c/Program Files (x86)/pipx_bin:/c/npm/prefix:/c/hostedtoolcache/windows/go/1.20.3/x64/bin:/c/hostedtoolcache/windows/Python/3.7.9/x64/Scripts:/c/hostedtoolcache/windows/Python/3.7.9/x64:/c/hostedtoolcache/windows/Ruby/2.5.9/x64/bin:/c/Program Files/OpenSSL/bin:/c/tools/kotlinc/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.372-7/x64/bin:/c/Program Files/ImageMagick-7.1.1-Q16-HDRI:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Program Files/Eclipse Foundation/jdk-8.0.302.8-hotspot/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/Chocolatey/bin:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/150/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/160/DTS/Binn:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.7/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/c/Program Files/Git/cmd:/c/Program Files/Git/mingw64/bin:/c/Program Files/Git/usr/bin:/c/Program Files/GitHub CLI:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files (x86)/Microsoft BizTalk Server:/c/Program Files/LLVM/bin:/c/Users/runneradmin/.dotnet/tools:/c/Users/runneradmin/.cargo/bin:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps" 'C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin\rustc.exe' --out-dir /c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple -L /c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple  src/lib.rs --crate-name foobar --crate-type lib --emit=metadata
PATH="/c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple:C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin:/c/a/rust/rust/build/x86_64-pc-windows-gnu/stage0-bootstrap-tools/x86_64-pc-windows-gnu/release/deps:/c/a/rust/rust/build/x86_64-pc-windows-gnu/stage0/bin:/c/a/rust/rust/ninja:/c/a/rust/rust/mingw64/bin:/c/hostedtoolcache/windows/Python/3.11.3/x64/Scripts:/c/hostedtoolcache/windows/Python/3.11.3/x64:/usr/bin:/c/a/rust/rust/sccache:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/cf-cli:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.9.3/x64:/c/cabal/bin:/c/ghcup/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.3.0/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/GitHub CLI:/c/Program Files/Git/bin:/c/Program Files (x86)/pipx_bin:/c/npm/prefix:/c/hostedtoolcache/windows/go/1.20.3/x64/bin:/c/hostedtoolcache/windows/Python/3.7.9/x64/Scripts:/c/hostedtoolcache/windows/Python/3.7.9/x64:/c/hostedtoolcache/windows/Ruby/2.5.9/x64/bin:/c/Program Files/OpenSSL/bin:/c/tools/kotlinc/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.372-7/x64/bin:/c/Program Files/ImageMagick-7.1.1-Q16-HDRI:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Program Files/Eclipse Foundation/jdk-8.0.302.8-hotspot/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/Chocolatey/bin:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/150/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/160/DTS/Binn:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.7/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/c/Program Files/Git/cmd:/c/Program Files/Git/mingw64/bin:/c/Program Files/Git/usr/bin:/c/Program Files/GitHub CLI:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files (x86)/Microsoft BizTalk Server:/c/Program Files/LLVM/bin:/c/Users/runneradmin/.dotnet/tools:/c/Users/runneradmin/.cargo/bin:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps" 'C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin\rustdoc.exe' -L C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\lib\rustlib\x86_64-pc-windows-gnu\lib examples/ex.rs --crate-name ex --crate-type bin --output "/c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple/rustdoc" \
  --extern foobar=/c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple/libfoobar.rmeta \
	-Z unstable-options \
	--scrape-examples-output-path /c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple/ex.calls \
	--scrape-examples-target-crate foobar \
	
make[1]: Leaving directory '/c/a/rust/rust/tests/run-make/rustdoc-scrape-examples-multiple'
------------------------------------------
--- stderr -------------------------------
thread 'main' has overflowed its stack
make[1]: *** [scrape.mk:6: /c/a/rust/rust/build/x86_64-pc-windows-gnu/test/run-make/rustdoc-scrape-examples-multiple/rustdoc-scrape-examples-multiple/ex.calls] Error 12

Hmm. Suspicious 🤔

@bors retry

@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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 4, 2023
@matthiaskrgr
Copy link
Member

@bors r-
also stack overflow'd in the rollup #112264 💣

@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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 4, 2023
@onur-ozkan onur-ozkan force-pushed the hotfix branch 2 times, most recently from 0b9f6c1 to 91e6e8b Compare June 4, 2023 14:40
@onur-ozkan
Copy link
Member Author

I suspected that adding an additional argument to the tool_doc! macro was causing stack overflows(probably because of the recursion) randomly in some of our tests. I decided to make $krate more generic which is now $extra_args to allow us to include --lib(or any other argument if needed) within it as well.

It would be nice if you can make another review @albertlarsan68 and also I would like to know your(@jyn514) opinion on this change :)

@onur-ozkan onur-ozkan 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 Jun 4, 2023
Copy link
Member

@albertlarsan68 albertlarsan68 left a comment

Choose a reason for hiding this comment

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

LGTM, but would also like jyn's approval.
r=me if OK

@onur-ozkan
Copy link
Member Author

I decided to make $krate more generic which is now $extra_args to allow us to include --lib(or any other argument if needed)

Are you fine with this change ? @jyn514

@jyn514 jyn514 self-assigned this Jun 26, 2023
src/bootstrap/doc.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented Jun 28, 2023

yeah this seems fine :)

@onur-ozkan onur-ozkan changed the title extend tool_doc! with only_libs arg extend tool_doc! Jun 29, 2023
@onur-ozkan onur-ozkan changed the title extend tool_doc! refactor tool_doc! Jun 29, 2023
@onur-ozkan
Copy link
Member Author

@bors r=jyn514 rollup

@bors
Copy link
Contributor

bors commented Jun 29, 2023

📌 Commit cde54ff has been approved by jyn514

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 29, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jun 30, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 30, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#111322 (Support for native WASM exceptions)
 - rust-lang#112086 (resolve: Remove artificial import ambiguity errors)
 - rust-lang#112234 (refactor `tool_doc!`)
 - rust-lang#112300 (Convert `run-make/coverage-reports` tests to use a custom compiletest mode)
 - rust-lang#112795 (Migrate some rustc_builtin_macros to SessionDiagnostic)
 - rust-lang#113144 (Make the `Elaboratable` trait take clauses)
 - rust-lang#113161 (Fix type privacy lints error message)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 93a97c7 into rust-lang:master Jun 30, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 30, 2023
@onur-ozkan onur-ozkan deleted the hotfix branch January 27, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants