rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
93.93k stars 12.09k forks source link

Migrate `run-make/issue-53964` to `rmake` #125224

Closed Oneirical closed 1 week ago

Oneirical commented 2 weeks ago

Part of #121876 and the associated Google Summer of Code project.

This is extremely similar to #125146. Could it be interesting to merge the two in some way? This one seems to do the same thing as the #125146, but with an added check that a useless lint is not shown.

rustbot commented 2 weeks ago

r? @jieyouxu

rustbot has assigned @jieyouxu. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot commented 2 weeks ago

Some changes occurred in run-make tests.

cc @jieyouxu

compiler-errors commented 2 weeks ago

@Oneirical @jieyouxu: Is it possible for these run-make migrations to be batched into PRs that migrate a handful at once, instead of migrating one at a time? I believe it would be easier for those who read the PRs page often (e.g. me), and I'm not sure if I see much value in having each one be a separate PR :)

Oneirical commented 2 weeks ago

@Oneirical @jieyouxu: Is it possible for these run-make migrations to be batched into PRs that migrate a handful at once, instead of migrating one at a time? I believe it would be easier for those who read the PRs page often (e.g. me), and I'm not sure if I see much value in having each one be a separate PR :)

I asked the same question, because it's true that these get a bit spammy... Nilstrieb answered me in Zulip's #gsoc:

making the PRS individually means that they can be reviewed, approved, rebased and kept track of individually, which is very valuable as it means one won't block another, while the overhead of reviewing two PRs instead of one is minimal

Kobzol:

I think that one PR per test is fine. Maybe if there is a bunch of very similar tests that could be ported at once, you could group these.

Even though a test may look really simple, sometimes, there are complications, like platform-specific discrepancies, tests not deserving run-make status and needing to be sent to be UI tests, or ties with the run-make-support library.

But I do agree that these are covering the PR frontpage rather intensely. Maybe it could be fine to reserve the single-PRs for tests that have some complexity (like #125165) or those that add new helper functions in the support library.

Sorry for the inconvenience, and I'll talk about this with the GSoC organizers to find a compromise that makes everyone happy!

jieyouxu commented 2 weeks ago

@Oneirical @jieyouxu: Is it possible for these run-make migrations to be batched into PRs that migrate a handful at once, instead of migrating one at a time? I believe it would be easier for those who read the PRs page often (e.g. me), and I'm not sure if I see much value in having each one be a separate PR :)

Yes, we should batch easier migrations

rust-log-analyzer commented 1 week ago

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) ```plain Getting action download info Download action repository 'msys2/setup-msys2@v2.22.0' (SHA:cc11e9188b693c2b100158c3322424c4cc1dadea) Download action repository 'actions/checkout@v4' (SHA:a5ac7e51b41094c92402da3b24376905380afc29) Download action repository 'actions/upload-artifact@v4' (SHA:65462800fd760344b1a7b4382951275a0abb4808) Complete job name: PR - mingw-check-tidy git config --global core.autocrlf false shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} --- COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/ RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \ && pip3 install virtualenv COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/ # NOTE: intentionally uses python2 for x.py so we can test it still works. # NOTE: intentionally uses python2 for x.py so we can test it still works. # validate-toolstate only runs in our CI, so it's ok for it to only support python3. ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \ --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --allow-unsafe --generate-hashes reuse-requirements.in --- #12 [5/8] COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/ #12 DONE 0.0s #13 [6/8] RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt && pip3 install virtualenv #13 0.429 Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB) #13 0.446 Collecting boolean-py==4.0 #13 0.452 Downloading boolean.py-4.0-py3-none-any.whl (25 kB) #13 0.469 Collecting chardet==5.1.0 --- #13 3.717 Building wheels for collected packages: reuse #13 3.718 Building wheel for reuse (pyproject.toml): started #13 4.046 Building wheel for reuse (pyproject.toml): finished with status 'done' #13 4.047 Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=181117 sha256=f5f58750481f69515c2c0d1d503daf565e2565c370d07fc6aeb95fe3498b4269 #13 4.047 Stored in directory: /tmp/pip-ephem-wheel-cache-3_qt2n0u/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d #13 4.050 Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet #13 4.071 Attempting uninstall: setuptools #13 4.072 Found existing installation: setuptools 59.6.0 #13 4.073 Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr #13 4.073 Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr #13 4.074 Can't uninstall 'setuptools'. No files were found to uninstall. #13 4.748 Successfully installed binaryornot-0.4.4 boolean-py-4.0 chardet-5.1.0 jinja2-3.1.2 license-expression-30.0.0 markupsafe-2.1.1 python-debian-0.1.49 reuse-1.1.0 setuptools-66.0.0 #13 4.748 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv #13 5.268 Collecting virtualenv #13 5.319 Downloading virtualenv-20.26.2-py3-none-any.whl (3.9 MB) #13 5.489 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 23.5 MB/s eta 0:00:00 #13 5.529 Collecting distlib<1,>=0.3.7 #13 5.537 Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB) #13 5.547 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 54.2 MB/s eta 0:00:00 #13 5.583 Collecting platformdirs<5,>=3.9.1 #13 5.589 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB) #13 5.623 Collecting filelock<4,>=3.12.2 #13 5.629 Downloading filelock-3.14.0-py3-none-any.whl (12 kB) #13 5.716 Installing collected packages: distlib, platformdirs, filelock, virtualenv #13 5.889 Successfully installed distlib-0.3.8 filelock-3.14.0 platformdirs-4.2.2 virtualenv-20.26.2 #13 DONE 6.0s #14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ #14 DONE 0.0s --- DirectMap4k: 212928 kB DirectMap2M: 6078464 kB DirectMap1G: 12582912 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` profile [unoptimized] target(s) in 0.03s ##[endgroup] downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/6715446db6564901c2674950b7fce5b487f2d13f/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz extracting /checkout/obj/build/cache/llvm-6715446db6564901c2674950b7fce5b487f2d13f-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm --- Finished `release` profile [optimized] target(s) in 25.54s ##[endgroup] fmt check tidy check tidy error: following path contains more than 859 entries, you should move the test to some relevant subdirectory (current: 860): /checkout/tests/ui removing old virtual environment removing old virtual environment creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (24.0) Collecting black==23.3.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 7)) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 13.6 MB/s eta 0:00:00 Collecting click==8.1.3 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 34)) Downloading click-8.1.3-py3-none-any.whl (96 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 12.7 MB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 12.7 MB/s eta 0:00:00 Collecting importlib-metadata==6.7.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 38)) Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB) Collecting mypy-extensions==1.0.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 42)) Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB) Collecting packaging==23.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 46)) Downloading packaging-23.1-py3-none-any.whl (48 kB) Collecting pathspec==0.11.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 50)) Downloading pathspec-0.11.1-py3-none-any.whl (29 kB) Collecting platformdirs==3.6.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 54)) Downloading platformdirs-3.6.0-py3-none-any.whl (16 kB) Downloading platformdirs-3.6.0-py3-none-any.whl (16 kB) Collecting ruff==0.0.272 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 58)) Downloading ruff-0.0.272-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB) Collecting tomli==2.0.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 77)) Downloading tomli-2.0.1-py3-none-any.whl (12 kB) Collecting typed-ast==1.5.4 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 81)) Downloading typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (877 kB) Downloading typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (877 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 877.7/877.7 kB 21.2 MB/s eta 0:00:00 Collecting typing-extensions==4.6.3 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 107)) Downloading typing_extensions-4.6.3-py3-none-any.whl (31 kB) Collecting zipp==3.15.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 114)) Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB) Installing collected packages: zipp, typing-extensions, typed-ast, tomli, ruff, platformdirs, pathspec, packaging, mypy-extensions, click, importlib-metadata, black Successfully installed black-23.3.0 click-8.1.3 importlib-metadata-6.7.0 mypy-extensions-1.0.0 packaging-23.1 pathspec-0.11.1 platformdirs-3.6.0 ruff-0.0.272 tomli-2.0.1 typed-ast-1.5.4 typing-extensions-4.6.3 zipp-3.15.0 some tidy checks failed Build completed unsuccessfully in 0:00:59 local time: Tue May 21 17:40:14 UTC 2024 network time: Tue, 21 May 2024 17:40:14 GMT ```
rust-log-analyzer commented 1 week ago

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

Click to see the possible cause of the failure (guessed by this bot) ```plain #16 exporting to docker image format #16 sending tarball 29.3s done #16 DONE 40.6s ##[endgroup] Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/ [CI_JOB_NAME=x86_64-gnu-llvm-17] --- sccache: Starting the server... ##[group]Configure the build configure: processing command line configure: configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling'] configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config configure: llvm.link-shared := True configure: rust.thin-lto-import-instr-limit := 10 configure: change-id := 99999999 --- ---- [ui] tests/ui/external-crate-panic-handle-no-lint/app.rs stdout ---- error: test compilation failed although it shouldn't! status: exit status: 1 command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/external-crate-panic-handle-no-lint/app.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/external-crate-panic-handle-no-lint/app" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/external-crate-panic-handle-no-lint/app/auxiliary" "-Cpanic=abort" "--emit=obj" --- stderr ------------------------------- error[E0463]: can't find crate for `panic` ##[error] --> /checkout/tests/ui/external-crate-panic-handle-no-lint/app.rs:16:1 | | LL | extern crate panic; | ^^^^^^^^^^^^^^^^^^^ can't find crate error: `#[panic_handler]` function required, but not found error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0463`. ------------------------------------------ ------------------------------------------ ---- [ui] tests/ui/external-crate-panic-handle-no-lint/panic.rs stdout ---- error: ui test compiled successfully! status: exit status: 0 command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/external-crate-panic-handle-no-lint/panic.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/external-crate-panic-handle-no-lint/panic" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/external-crate-panic-handle-no-lint/panic/auxiliary" --- stderr ------------------------------- warning: the feature `panic_handler` has been stable since 1.30.0 and no longer requires an attribute to enable ##[warning] --> /checkout/tests/ui/external-crate-panic-handle-no-lint/panic.rs:2:12 | | LL | #![feature(panic_handler)] | = note: `#[warn(stable_features)]` on by default warning: 1 warning emitted ```
rust-log-analyzer commented 1 week ago

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

Click to see the possible cause of the failure (guessed by this bot) ```plain #16 exporting to docker image format #16 sending tarball 36.2s done #16 DONE 42.3s ##[endgroup] Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/ [CI_JOB_NAME=x86_64-gnu-llvm-17] --- sccache: Starting the server... ##[group]Configure the build configure: processing command line configure: configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling'] configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config configure: llvm.link-shared := True configure: rust.thin-lto-import-instr-limit := 10 configure: change-id := 99999999 --- ---- [ui] tests/ui/external-crate-panic-handle-no-lint/app.rs stdout ---- error: auxiliary build of "/checkout/tests/ui/external-crate-panic-handle-no-lint/auxiliary/panic.rs" failed to compile: status: exit status: 1 command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/external-crate-panic-handle-no-lint/auxiliary/panic.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/external-crate-panic-handle-no-lint/app/auxiliary" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/external-crate-panic-handle-no-lint/app/auxiliary" --- stderr ------------------------------- error: unwinding panics are not supported without std | | = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem error: aborting due to 1 previous error ------------------------------------------ ```
Oneirical commented 1 week ago

Interesting error message on the CI fail:

  --- stderr -------------------------------
  error: unwinding panics are not supported without std
     |
     = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
     = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem

The suggestion seems to be "you should build the standard library". But, this test is checking for successful panic unwinding when there is no standard library.

The test was made a long time ago, so is it possible support for panic unwinding without std was dropped all-together? That would make the test obsolete...

jieyouxu commented 1 week ago

The test was made a long time ago, so is it possible support for panic unwinding without std was dropped all-together? That would make the test obsolete...

The reason is that by default UI tests and their auxilliaries when compiled by compiletest sets a bunch of additional flags. I think it's okay if we don't try to force this to be a UI test and instead keep it as a run-make test.

This is extremely similar to https://github.com/rust-lang/rust/pull/125146. Could it be interesting to merge the two in some way? This one seems to do the same thing as the https://github.com/rust-lang/rust/pull/125146, but with an added check that a useless lint is not shown.

IMO they're different enough, because #125146 is checking panic_handlers can be provided by transitive dependencies, whereas this test is checking that the lint is not emitted.

jieyouxu commented 1 week ago

@rustbot author

bors commented 1 week ago

:umbrella: The latest upstream changes (presumably #125379) made this pull request unmergeable. Please resolve the merge conflicts.

rust-log-analyzer commented 1 week ago

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) ```plain Getting action download info Download action repository 'msys2/setup-msys2@v2.22.0' (SHA:cc11e9188b693c2b100158c3322424c4cc1dadea) Download action repository 'actions/checkout@v4' (SHA:a5ac7e51b41094c92402da3b24376905380afc29) Download action repository 'actions/upload-artifact@v4' (SHA:65462800fd760344b1a7b4382951275a0abb4808) Complete job name: PR - mingw-check-tidy git config --global core.autocrlf false shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} --- COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/ RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \ && pip3 install virtualenv COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/ # NOTE: intentionally uses python2 for x.py so we can test it still works. # NOTE: intentionally uses python2 for x.py so we can test it still works. # validate-toolstate only runs in our CI, so it's ok for it to only support python3. ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \ --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --allow-unsafe --generate-hashes reuse-requirements.in --- #12 [5/8] COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/ #12 DONE 0.0s #13 [6/8] RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt && pip3 install virtualenv #13 0.449 Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB) #13 0.467 Collecting boolean-py==4.0 #13 0.475 Downloading boolean.py-4.0-py3-none-any.whl (25 kB) #13 0.494 Collecting chardet==5.1.0 --- #13 3.734 Building wheels for collected packages: reuse #13 3.735 Building wheel for reuse (pyproject.toml): started #13 4.074 Building wheel for reuse (pyproject.toml): finished with status 'done' #13 4.075 Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=181117 sha256=f5f58750481f69515c2c0d1d503daf565e2565c370d07fc6aeb95fe3498b4269 #13 4.075 Stored in directory: /tmp/pip-ephem-wheel-cache-xypjngnh/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d #13 4.078 Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet #13 4.101 Attempting uninstall: setuptools #13 4.101 Found existing installation: setuptools 59.6.0 #13 4.102 Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr #13 4.102 Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr #13 4.103 Can't uninstall 'setuptools'. No files were found to uninstall. #13 4.788 Successfully installed binaryornot-0.4.4 boolean-py-4.0 chardet-5.1.0 jinja2-3.1.2 license-expression-30.0.0 markupsafe-2.1.1 python-debian-0.1.49 reuse-1.1.0 setuptools-66.0.0 #13 4.789 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv #13 5.333 Collecting virtualenv #13 5.383 Downloading virtualenv-20.26.2-py3-none-any.whl (3.9 MB) #13 5.532 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 27.0 MB/s eta 0:00:00 #13 5.572 Collecting distlib<1,>=0.3.7 #13 5.580 Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB) #13 5.592 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 47.8 MB/s eta 0:00:00 #13 5.626 Collecting platformdirs<5,>=3.9.1 #13 5.634 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB) #13 5.671 Collecting filelock<4,>=3.12.2 #13 5.682 Downloading filelock-3.14.0-py3-none-any.whl (12 kB) #13 5.769 Installing collected packages: distlib, platformdirs, filelock, virtualenv #13 5.933 Successfully installed distlib-0.3.8 filelock-3.14.0 platformdirs-4.2.2 virtualenv-20.26.2 #13 DONE 6.0s #14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ #14 DONE 0.0s --- DirectMap4k: 190400 kB DirectMap2M: 6100992 kB DirectMap1G: 12582912 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` profile [unoptimized] target(s) in 0.04s ##[endgroup] downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/f0038a7c8fd8b5b8a949c92ae6419bcb59a09e72/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz extracting /checkout/obj/build/cache/llvm-f0038a7c8fd8b5b8a949c92ae6419bcb59a09e72-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` profile [optimized] target(s) in 25.18s ##[endgroup] fmt check ##[error]Diff in /checkout/tests/run-make/external-crate-panic-handle-no-lint/rmake.rs at line 8: fn main() { fn main() { rustc().input("panic.rs").run(); - rustc() - .input("app.rs") - .panic("abort") - .emit("obj") - .library_search_path(tmp_dir()) - .run(); + rustc().input("app.rs").panic("abort").emit("obj").library_search_path(tmp_dir()).run(); Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/tests/run-make/rustdoc-output-path/rmake.rs" "/checkout/tests/run-make/compiler-builtins/rmake.rs" "/checkout/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs" "/checkout/tests/run-make/rustdoc-themes/rmake.rs" "/checkout/tests/run-make/wasm-symbols-not-imported/rmake.rs" "/checkout/tests/run-make/reachable-extern-fn-available-lto/rmake.rs" "/checkout/tests/run-make/no-cdylib-as-rdylib/rmake.rs" "/checkout/tests/run-make/panic-impl-transitive/rmake.rs" "/checkout/tests/run-make/wasm-panic-small/rmake.rs" "/checkout/tests/run-make/rust-lld-by-default/rmake.rs" "/checkout/tests/run-make/core-no-fp-fmt-parse/rmake.rs" "/checkout/tests/run-make/wasm-symbols-different-module/rmake.rs" "/checkout/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs" "/checkout/tests/run-make/rustdoc-map-file/rmake.rs" "/checkout/tests/run-make/external-crate-panic-handle-no-lint/rmake.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-whitespace/rmake.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: Wed May 22 13:48:03 UTC 2024 network time: Wed, 22 May 2024 13:48:03 GMT ##[error]Process completed with exit code 1. Post job cleanup. ```
Oneirical commented 1 week ago

@rustbot review

run-make test restored.

this test is checking that the lint is not emitted.

Your review feedback about the explanatory test comment said that this test was not checking anything related to the lint. (otherwise there would be a CGREP looking for the lint text, and throwing a failure if it was detected). Did I misunderstand?

jieyouxu commented 1 week ago

this test is checking that the lint is not emitted.

Your review feedback about the explanatory test comment said that this test was not checking anything related to the lint. (otherwise there would be a CGREP looking for the lint text, and throwing a failure if it was detected). Did I misunderstand?

Sorry I missed the #![deny(unused_extern_crates)] in app.rs, so compilation will fail if the lint is in fact fired.

jieyouxu commented 1 week ago

Thanks, feel free to r=me after squashing commits into one. @bors delegate+

bors commented 1 week ago

:v: @Oneirical, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

Oneirical commented 1 week ago

Sorry I missed the #![deny(unused_extern_crates)] in app.rs, so compilation will fail if the lint is in fact fired.

Alright, I have re-edited the test's comment to highlight the fact that the test does check if the useless lint gets printed.

Oneirical commented 1 week ago

@bors r=@jieyouxu

bors commented 1 week ago

:pushpin: Commit dd7e68b3566c9417eb13ba8b09c74481727ff977 has been approved by jieyouxu

It is now in the queue for this repository.

jieyouxu commented 1 week ago

@bors rollup