Skip to content

Conversation

@saethlin
Copy link
Member

r? ghost

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 15, 2025
@saethlin
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
Add some rmeta instrumentation

r? ghost
@bors
Copy link
Collaborator

bors commented Feb 15, 2025

⌛ Trying commit f459aef with merge 083c1c1...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 15, 2025
@bors
Copy link
Collaborator

bors commented Feb 15, 2025

☀️ Try build successful - checks-actions
Build commit: 083c1c1 (083c1c1cdacb51b61059c732d5e349d379613a9f)

macro_rules! stat {
($label:literal, $f:expr) => {{
let orig_pos = self.position();
$label.encode(&mut self.opaque);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe format!("<<{}>>", $label).encode(&mut self.opaque) to make it a bit clearer that it is a label rather than just a random string?

@bjorn3
Copy link
Member

bjorn3 commented Feb 15, 2025

It makes sense to have this IMO. Needs a comment in the source code to explain why this exists though.

@saethlin
Copy link
Member Author

My really cooked idea is to have a lot more of these markers but behind a compiler flag, so that you can spit out kind-of readable rmeta in an emergency

@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)
info: removing rustup binaries
info: rustup is uninstalled
##[group]Image checksum input
mingw-check-tidy
# We use the ghcr base image because ghcr doesn't have a rate limit
# and the mingw-check-tidy job doesn't cache docker images in CI.
FROM ghcr.io/rust-lang/ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
  g++ \
  make \
---

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.
# 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,cpp
# 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 3.191 Building wheels for collected packages: reuse
#12 3.192   Building wheel for reuse (pyproject.toml): started
#12 3.404   Building wheel for reuse (pyproject.toml): finished with status 'done'
#12 3.405   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132717 sha256=cf8e90b4c31488819897086c9a177a392752824492f0f754021598cc8dbde519
#12 3.406   Stored in directory: /tmp/pip-ephem-wheel-cache-g_nbgne9/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#12 3.408 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#12 3.809 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#12 3.809 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
#12 9.373 Collecting virtualenv
#12 9.373 Collecting virtualenv
#12 9.450   Downloading virtualenv-20.29.2-py3-none-any.whl (4.3 MB)
#12 9.664      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 20.3 MB/s eta 0:00:00
#12 9.728 Collecting platformdirs<5,>=3.9.1
#12 9.738   Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
#12 9.764 Collecting distlib<1,>=0.3.7
#12 9.791      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 KB 32.8 MB/s eta 0:00:00
#12 9.835 Collecting filelock<4,>=3.12.2
#12 9.846   Downloading filelock-3.17.0-py3-none-any.whl (16 kB)
#12 9.846   Downloading filelock-3.17.0-py3-none-any.whl (16 kB)
#12 9.927 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#12 10.11 Successfully installed distlib-0.3.9 filelock-3.17.0 platformdirs-4.3.6 virtualenv-20.29.2
#12 DONE 10.2s

#13 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#13 DONE 0.0s
---
DirectMap4k:      135104 kB
DirectMap2M:     8253440 kB
DirectMap1G:    10485760 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
    Finished `dev` profile [unoptimized] target(s) in 0.05s
##[endgroup]
WARN: currently no CI rustc builds have rustc debug assertions enabled. Please either set `rust.debug-assertions` to `false` if you want to use download CI rustc or set `rust.download-rustc` to `false`.
downloading https://static.rust-lang.org/dist/2025-02-08/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
---
   Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
    Finished `release` profile [optimized] target(s) in 30.78s
##[endgroup]
fmt check
Diff in /checkout/compiler/rustc_metadata/src/rmeta/mod.rs:338:
     impls: LazyArray<(DefIndex, Option<SimplifiedType>)>,
 
-use rustc_serialize::{Encodable, Decodable};
+use rustc_serialize::{Decodable, Encodable};
+use rustc_serialize::{Decodable, Encodable};
 impl<'tcx, '__a> Encodable<EncodeContext<'__a, 'tcx>> for TraitImpls {
     #[inline]
     fn encode(&self, s: &mut EncodeContext<'__a, 'tcx>) {
Diff in /checkout/compiler/rustc_metadata/src/rmeta/mod.rs:352:
     #[inline]
     fn decode(d: &mut DecodeContext<'__a, 'tcx>) -> Self {
         let _header: Vec<u8> = Decodable::decode(d);
-            trait_id: Decodable::decode(d),
-            impls: Decodable::decode(d),
-        }
-        }
+        Self { trait_id: Decodable::decode(d), impls: Decodable::decode(d) }
 }
 
fmt: checked 5843 files
Build completed unsuccessfully in 0:01:12

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 17, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2025
@saethlin saethlin closed this Apr 11, 2025
@saethlin saethlin deleted the noise branch May 4, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants