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

Rollup of 9 pull requests #134057

Closed
wants to merge 24 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

osiewicz and others added 24 commits November 18, 2024 19:19
When upgrading [Zed](zed-industries/zed#19349) to Rust 1.82 I've encountered a test failure in our test suite. Specifically, one of our extension tests started hanging. I've tracked it down to a call to std::fs::remove_dir_all not returning when an extension is compiled with Rust 1.82
Our extension system uses WASM components, thus I've looked at the diff between 1.81 and 1.82 with respect to WASI and found 736f773

As it turned out, calling remove_dir_all from extension returned io::ErrorKind::NotFound in 1.81;
the underlying issue is that the ReadDir iterator never actually terminates iteration, however since it loops around, with 1.81 we'd come across an entry second time and fail to remove it, since it would've been removed previously.
With 1.82 and 736f773 it is no longer the case, thus we're seeing the hang.

This commit makes ReadDir::next adhere to readdir contract, namely it will no longer call readdir once the returned # of bytes is smaller than the size of a passed-in buffer.
Previously we'd only terminate the loop if readdir returned 0.
…tool

The full target name can be anything with custom target specs. Passing
just the arch wasn't possible before cc 1.2, but is now.
…-remove-dir-all, r=Noratrieb

wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next

When upgrading [Zed](zed-industries/zed#19349) to Rust 1.82 I've encountered a test failure in our test suite. Specifically, one of our extension tests started hanging. I've tracked it down to a call to std::fs::remove_dir_all not returning when an extension is compiled with Rust 1.82 Our extension system uses WASM components, thus I've looked at the diff between 1.81 and 1.82 with respect to WASI and found 736f773

As it turned out, calling remove_dir_all from extension returned io::ErrorKind::NotFound in 1.81; the underlying issue is that the ReadDir iterator never actually terminates iteration, however since it loops around, with 1.81 we'd come across an entry second time and fail to remove it, since it would've been removed previously. With 1.82 and 736f773 it is no longer the case, thus we're seeing the hang. The tests do pass when everything but the extensions is compiled with 1.82.

This commit makes ReadDir::next adhere to readdir contract, namely it will no longer call readdir once the returned # of bytes is smaller than the size of a passed-in buffer. Previously we'd only terminate the loop if readdir returned 0.
…enton

Pass the arch rather than full target name to windows_registry::find_tool

The full target name can be anything with custom target specs. Passing just the arch wasn't possible before cc 1.2, but is now thanks to rust-lang/cc-rs#1285.

try-job: i686-mingw
…ouxu

[AIX] Pass -bnoipath when adding rust upstream dynamic crates

Unlike ELF linkers, AIX doesn't feature `DT_SONAME` to override
the dependency name when outputing a shared library, which is something
we rely on for dylib crates.

See for reference:
https://github.com/rust-lang/rust/blob/bc145cec4565a97a1b08df52d26ddf48ce3d7d0a/compiler/rustc_codegen_ssa/src/back/linker.rs#L464)

Thus, `ld` on AIX will use the full path to shared libraries as the dependency if passed it
by default unless `noipath` is passed, so pass it here so we don't end up with full path dependencies
for dylib crates.
[AIX] Replace sa_sigaction with sa_union.__su_sigaction for AIX

On AIX, the `sa_sigaction` member of `struct sigaction` is accessed as the union member `sa_union.__su_sigaction`.
[AIX] Remove option "-n" from AIX "ln" command

The option `-n` for the AIX `ln` command has a different purpose than it does on Linux. On Linux, the `-n` option is used to treat the destination path as normal file if it is a symbolic link to a directory, which is the default behavior of the AIX `ln` command.
…eyouxu

Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`

Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality.

This PR moves most of them into a single `tests/ui/link-native-libs` directory.

---

Part of rust-lang#133895.

try-job: i686-mingw

r? jieyouxu
…n, r=jieyouxu

Don't use `AsyncFnOnce::CallOnceFuture` bounds for signature deduction

We shouldn't be using `AsyncFnOnce::CallOnceFuture` projection bounds to deduce anything about the return type of an async closure, **only** `AsyncFnOnce::Output`. This was accidental b/c all we were looking at was the def id of the trait, rather than the projection. This PR fixes that.

This doesn't affect stable code, since `CallOnceFuture` bounds cannot be written on stable.

Fixes rust-lang#134015
handle cygwin environment in `install::sanitize_sh`

Resolves rust-lang#132507
…llaumeGomez

rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 10)

Follow up rust-lang#130287 et al

As always, it's easier to review the commits one at a time. Don't use the Files Changed tab. It's confusing.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-wasi Operating system: Wasi, Webassembly System Interface 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 9, 2024
@rustbot rustbot added T-libs Relevant to the library 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. rollup A PR which is a rollup labels Dec 9, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Dec 9, 2024

📌 Commit 0a7c477 has been approved by GuillaumeGomez

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 Dec 9, 2024
@bors
Copy link
Contributor

bors commented Dec 9, 2024

⌛ Testing commit 0a7c477 with merge 1da727e...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 9, 2024
…llaumeGomez

Rollup of 9 pull requests

Successful merges:

 - rust-lang#133184 (wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next)
 - rust-lang#133955 (Pass the arch rather than full target name to windows_registry::find_tool)
 - rust-lang#133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates)
 - rust-lang#133970 ([AIX] Replace sa_sigaction with sa_union.__su_sigaction for AIX)
 - rust-lang#133980 ([AIX] Remove option "-n" from AIX "ln" command)
 - rust-lang#133996 (Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`)
 - rust-lang#134017 (Don't use `AsyncFnOnce::CallOnceFuture` bounds for signature deduction)
 - rust-lang#134023 (handle cygwin environment in `install::sanitize_sh`)
 - rust-lang#134053 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 10))

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job i686-msvc failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] alloc test:false 7.870
[RUSTC-TIMING] hashbrown test:false 1.793
error: linking with `link.exe` failed: exit code: 1
  |
  = note: "link.exe" "/DEF:C:\\a\\_temp\\msys64\\tmp\\rustcRfzdBB\\lib.def" "/NOLOGO" "/LARGEADDRESSAWARE" "/SAFESEH" "C:\\a\\_temp\\msys64\\tmp\\rustcRfzdBB\\symbols.o" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\std-90437d65b9885b38.std.58d99ce2ad8d5e29-cgu.0.rcgu.o" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\std-90437d65b9885b38.djo926m8edqeji3bm1dmcjasy.rcgu.rmeta" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\std-90437d65b9885b38.czpuw1ckiqr5uzoosxdf68wx7.rcgu.o" "kernel32.lib" "kernel32.lib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libpanic_unwind-21548079a414409f.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libwindows_targets-4291a0c00630f550.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\librustc_demangle-dff39964e7b65931.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libstd_detect-485d0125c53416a6.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libhashbrown-d066a8f9f139e6e2.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\librustc_std_workspace_alloc-75fe42d3baf27d68.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libunwind-fa2dfaab3f8a42b7.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libcfg_if-17708c1efb2f15a7.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\liballoc-79b71804ba332461.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\librustc_std_workspace_core-a67c29f4a9c7a99d.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libcore-76c424679b11e231.rlib" "C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\libcompiler_builtins-1c6326f203df102a.rlib" "advapi32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:libcmt" "C:\\a\\_temp\\msys64\\tmp\\rustcRfzdBB\\bcryptprimitives.dll_imports.lib" "C:\\a\\_temp\\msys64\\tmp\\rustcRfzdBB\\api-ms-win-core-synch-l1-2-0.dll_imports.lib" "/NXCOMPAT" "/LIBPATH:C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.42.34433\\atlmfc\\lib\\x86" "/LIBPATH:C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\build\\compiler_builtins-2c33050784bf0ca1\\out" "/OUT:C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\std-90437d65b9885b38.dll" "/OPT:REF,ICF" "/DLL" "/IMPLIB:C:\\a\\rust\\rust\\build\\i686-pc-windows-msvc\\stage1-std\\i686-pc-windows-msvc\\release\\deps\\std-90437d65b9885b38.dll.lib" "/DEBUG" "/PDBALTPATH:%_PDB%"
  = note: link: extra operand '/LARGEADDRESSAWARE'
          Try 'link --help' for more information.

note: `link.exe` returned an unexpected error


note: in the Visual Studio installer, ensure the "C++ build tools" workload is selected
[RUSTC-TIMING] std test:false 21.738
error: could not compile `std` (lib) due to 1 previous error
Build completed unsuccessfully in 0:20:38
Build completed unsuccessfully in 0:20:38
make: *** [Makefile:106: ci-msvc-ps1] Error 1
  network time: Mon, 09 Dec 2024 10:35:21 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Contributor

bors commented Dec 9, 2024

💔 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 Dec 9, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Dec 9, 2024

@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 Dec 9, 2024
@jieyouxu jieyouxu closed this Dec 9, 2024
@GuillaumeGomez GuillaumeGomez deleted the rollup-kzesbgh branch December 11, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-wasi Operating system: Wasi, Webassembly System Interface rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library 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.