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 11 pull requests #117735

Closed
wants to merge 27 commits into from
Closed

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Nov 9, 2023

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ChrisDenton and others added 27 commits October 15, 2023 10:51
Previously it failed on Windows if the file had the `FILE_ATTRIBUTE_HIDDEN` attribute set. This was inconsistent with `OpenOptions::new().write(true).truncate(true)` which can truncate an existing hidden file.
The git integration in build_helper hardcoded `rust-lang/rust` as the
parent GitHub repository, and `master` as the branch name. This works
great for `rust-lang/rust`, but causes problems in downstream forks like
Ferrocene whenever those functions are invoked (like `./x fmt`).

In `src/stage0.json` there was already a configuration key for the name
of the nightly branch, but it wasn't used by build_helper. This commit
adds the `github_repository` key to the file, and requires both values
to be passed to build_helper whenever a git function is called. This
will allow downstream forks to tweak the values.
Use the LLVM option NoTrapAfterNoreturn: https://llvm.org/doxygen/classllvm_1_1TargetOptions.html#acd83fce25de1ac9f6c975135a8235c22
when TrapUnreachable is enabled. This prevents codegenning unnecessary
double-traps in some situations.
Also, ensure NoTrapAfterNoreturn is set to false when targeting WebAssembly,
as it is known to cause bugs.
Co-authored-by: joboet <jonasboettiger@icloud.com>
Since `x clean` runs with bootstrap, we can speed up
this process by avoiding the cleaning of bootstrap artifacts,
as they are not necessarily needed to be cleaned.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Assigned new feature name `core_io_borrowed_buf` to distinguish from the
`Read::read_buf` functionality in `std::io`.
Use the LLVM option NoTrapAfterNoreturn

Use this LLVM option: https://llvm.org/doxygen/classllvm_1_1TargetOptions.html#acd83fce25de1ac9f6c975135a8235c22 when TrapUnreachable is enabled. This prevents codegenning unnecessary double-traps in some situations.

See further discussion here: rust-lang/compiler-team#618
add track_caller for arith ops

Fixes rust-lang#114814

`#[track_caller]` is works, r? ``@scottmcm``
Windows: Allow `File::create` to work on hidden files

This makes `OpenOptions::new().write(true).create(true).truncate(true).open(&path)` work if the path exists and is a hidden file. Previously it would fail with access denied.

This makes it consistent with `OpenOptions::new().write(true).truncate(true).open(&path)` (note the lack of `create`) which does not have this restriction. It's also more consistent with other platforms.

Fixes rust-lang#115745 (see that issue for more details).
…=RalfJung

Fixup `Atomic*::from_ptr` safety docs

See rust-lang#115719 (comment)
cc `@RalfJung`
…=albertlarsan68

Allow configuring the parent GitHub repository

The git integration in build_helper hardcoded `rust-lang/rust` as the parent GitHub repository, and `master` as the branch name. This works great for `rust-lang/rust`, but causes problems in downstream forks like Ferrocene whenever those functions are invoked (like `./x fmt`).

In `src/stage0.json` there was already a configuration key for the name of the nightly branch, but it wasn't used by build_helper. This PR adds the `github_repository` key to the file, and requires both values to be passed to build_helper whenever a git function is called. This will allow downstream forks to tweak the values.
… r=matthewjasper

Avoid silencing relevant follow-up errors

r? `@matthewjasper`

This PR only adds new errors to tests that are already failing and fixes one ICE.

Several tests were changed to not emit new errors. I believe all of them were faulty tests, and not explicitly testing for the code that had new errors.
…r=petrochenkov

Extend builtin/auto trait args with error when they have >1 argument

Reuse `extend_with_error` to add error args to any auto trait (or built-in trait like `Copy` that is defined incorrectly) that has additional non-`Self` args.

Fixes rust-lang#117628
…m-ou-se

Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io`

Tracking issue: rust-lang#117693

ACP: rust-lang/libs-team#290
triagebot.toml: use inclusive language
…an, r=albertlarsan68

speed up `x clean`

Since `x clean` runs with bootstrap, we can speed up this process by avoiding the cleaning of bootstrap artifacts, as they are not necessarily needed to be cleaned.

ref #rust-lang#117653 (comment)
…ozkan

Restore rustc shim error message

Fixes: rust-lang#117595 (comment)

The error message was originally introduced in rust-lang#111323, and subsequently broken by my change in rust-lang#116448.

r? `@onur-ozkan`
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows labels Nov 9, 2023
@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) 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-release Relevant to the release subteam, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 9, 2023
@TaKO8Ki TaKO8Ki closed this Nov 9, 2023
@TaKO8Ki TaKO8Ki deleted the rollup-px6lbzr branch November 9, 2023 02:36
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v4' (SHA:b4ffde65f46336ab88eb53be808477a3936bae11)
Download action repository 'actions/upload-artifact@v3' (SHA:a8a3f3ad30e3422c9c7b888a15615d19a852ae32)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=TaKO8Ki
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_632c0505-43c1-4ea3-90c6-910ff095dd89
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rollup-px6lbzr
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_632c0505-43c1-4ea3-90c6-910ff095dd89
GITHUB_REF=refs/pull/117735/merge
GITHUB_REF_NAME=117735/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=6e3b42523d6617975118a1caa1835c08d544c548
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_632c0505-43c1-4ea3-90c6-910ff095dd89
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_632c0505-43c1-4ea3-90c6-910ff095dd89
GITHUB_TRIGGERING_ACTOR=TaKO8Ki
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/117735/merge
GITHUB_WORKFLOW_SHA=6e3b42523d6617975118a1caa1835c08d544c548
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Removing intermediate container 4ceef936a531
 ---> 324a7e06fede
Step 6/10 : COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
 ---> 7faefce178f2
Step 7/10 : RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt     && pip3 install virtualenv
Collecting binaryornot==0.4.4
  Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting boolean-py==4.0
  Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
---
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml): started
  Building wheel for reuse (pyproject.toml): finished with status 'done'
  Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=180123 sha256=f323ccf11d14c5b11f6d5e70edb46e391f4b49a5df5c7d922224477ad8ee15c5
  Stored in directory: /tmp/pip-ephem-wheel-cache-dub8nf58/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet
  Attempting uninstall: setuptools
    Found existing installation: setuptools 59.6.0
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
---
  Downloading virtualenv-20.24.6-py3-none-any.whl (3.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 74.4 MB/s eta 0:00:00
Collecting filelock<4,>=3.12.2
  Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting platformdirs<4,>=3.9.1
  Downloading platformdirs-3.11.0-py3-none-any.whl (17 kB)
Collecting distlib<1,>=0.3.7
  Downloading distlib-0.3.7-py2.py3-none-any.whl (468 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 127.7 MB/s eta 0:00:00
Installing collected packages: distlib, platformdirs, filelock, virtualenv
Successfully installed distlib-0.3.7 filelock-3.13.1 platformdirs-3.11.0 virtualenv-20.24.6
Removing intermediate container eafe13337cec
 ---> 62c85f61a563
Step 8/10 : COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
 ---> 3e89c042b736
 ---> 3e89c042b736
Step 9/10 : COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
 ---> 0ed00c491e74
Step 10/10 : ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
Removing intermediate container c3ee971064f4
 ---> aeaf4f8b16a4
Successfully built aeaf4f8b16a4
Successfully tagged rust-ci:latest
Successfully tagged rust-ci:latest
##[endgroup]
Built container sha256:aeaf4f8b16a4213bad870d80b8a02fe961d6d842d3b07b448b749dbc7076fcc6
Uploading finished image sha256:aeaf4f8b16a4213bad870d80b8a02fe961d6d842d3b07b448b749dbc7076fcc6 to https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a
IMAGE          CREATED          CREATED BY                                      SIZE      COMMENT
aeaf4f8b16a4   1 second ago     /bin/sh -c #(nop)  ENV SCRIPT=TIDY_PRINT_DIF…   0B        
3e89c042b736   2 seconds ago    /bin/sh -c #(nop) COPY file:078ea1d11e7b7cda…   367B      
62c85f61a563   3 seconds ago    |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c…   23.8MB    
7faefce178f2   9 seconds ago    /bin/sh -c #(nop) COPY file:ac591dd6bc5afa66…   5.33kB    
324a7e06fede   10 seconds ago   |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c…   23.1MB    
---
<missing>      4 weeks ago      /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B        
<missing>      4 weeks ago      /bin/sh -c #(nop)  ARG LAUNCHPAD_BUILD_ARCH     0B        
<missing>      4 weeks ago      /bin/sh -c #(nop)  ARG RELEASE                  0B        

<botocore.awsrequest.AWSRequest object at 0x7feaec59b850>
gzip: stdout: Broken pipe
xargs: docker: terminated by signal 13
https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a
sha256:aeaf4f8b16a4213bad870d80b8a02fe961d6d842d3b07b448b749dbc7076fcc6
---
DirectMap4k:      184256 kB
DirectMap2M:     7155712 kB
DirectMap1G:    11534336 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
    Finished dev [unoptimized] target(s) in 0.03s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/d8dbf7ca0ee9c6da0fd039b1eb8cf7c7cb840f43/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-d8dbf7ca0ee9c6da0fd039b1eb8cf7c7cb840f43-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
   Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
    Finished release [optimized] target(s) in 25.87s
##[endgroup]
fmt check
##[error]Diff in /checkout/src/tools/compiletest/src/common.rs at line 457:
 
 
     pub fn git_config(&self) -> GitConfig<'_> {
-        GitConfig {
-            git_repository: &self.git_repository,
-            nightly_branch: &self.nightly_branch,
-        }
+        GitConfig { git_repository: &self.git_repository, nightly_branch: &self.nightly_branch }
 }
 
 
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/src/tools/compiletest/src/header/cfg.rs" "/checkout/src/tools/compiletest/src/header/needs.rs" "/checkout/src/tools/compiletest/src/runtest.rs" "/checkout/src/tools/compiletest/src/main.rs" "/checkout/src/tools/compiletest/src/raise_fd_limit.rs" "/checkout/src/tools/compiletest/src/read2/tests.rs" "/checkout/src/tools/compiletest/src/common.rs" "/checkout/src/tools/compiletest/src/header/tests.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
  local time: Thu Nov  9 02:41:13 UTC 2023
  network time: Thu, 09 Nov 2023 02:41:13 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows rollup A PR which is a rollup 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.