Skip to content

Ignore rustc-ice- files #12605

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

Merged
merged 2 commits into from
Apr 1, 2024
Merged

Ignore rustc-ice- files #12605

merged 2 commits into from
Apr 1, 2024

Conversation

xFrednet
Copy link
Member

@xFrednet xFrednet commented Apr 1, 2024

When ui-test detects a crash, it writes it into a rustc-ice-* file. I find it a bit annoying that git always want's to add them. So this just adds these files to our .gitignore :D


changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Apr 1, 2024

r? @y21

rustbot has assigned @y21.
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 rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 1, 2024
@matthiaskrgr
Copy link
Member

matthiaskrgr commented Apr 1, 2024

I think the proper fix for this would be to pass RUSTC_ICE=0 somewhere in our test harness 🤔

This will magically fix all of rustcs and clippys crashes so that encountering an ice is no longer possible. (hah april fools!)

edit: may also want to add -Zwrite-long-types-to-disk=no to rustcflags if you want

@xFrednet
Copy link
Member Author

xFrednet commented Apr 1, 2024

edit: may also want to add -Zwrite-long-types-to-disk=no to rustcflags if you want

What does the flag do?

I think the proper fix for this would be to pass RUSTC_ICE=0 somewhere in our test harness 🤔

This will magically fix all of rustcs and clippys crashes so that encountering an ice is no longer possible.

But why would be refuse free ICE? This is our best approach to fighting global warming rn 🧊

@matthiaskrgr
Copy link
Member

This does not affect clippy per-se but sometimes when rustc wants to show a very very long type in a diagnostic, lets say 300 nested Vec<Vec<...>>s, in a diagnostic, it will abbreviate and dump the file name to disk instead and show something like

   = note: the full name for the type has been written to '87AE7FBF95A2CBEDBD88AAD86A8DD13EB6F01ABF54923F0DD37D5A17CC76B8A9.long-type-12985950398914741889.txt'
   = note: consider using `--verbose` to print the full type name to the console

@y21
Copy link
Member

y21 commented Apr 1, 2024

I agree setting RUSTC_ICE=0 sounds good if that's possible, it still ICEs and fails tests that don't expect them, it just doesn't write it to a file.
But adding it to .gitignore also makes sense to me. They're never something that should be checked in to the repo.

I wonder if it'd also make sense to set it in cargo dev. As I understand it, these ICE files are primarily for users that run into them and helps reporting them. I mainly use cargo dev lint and a separate file outside of tests/ when I'm in the middle of writing a lint since it makes some things easier and I run into ICEs a lot, so these files are more annoying than they help. Not sure if it's just me though and if some people find them useful.

@xFrednet
Copy link
Member Author

xFrednet commented Apr 1, 2024

Thank you for the explanation, the variable name is not very on its own. Setting it in both cases makes sense to me. 👍

@xFrednet
Copy link
Member Author

xFrednet commented Apr 1, 2024

I tested it locally and everything seems to work just fine. IDK how to test it in the CI, but believe this should be good enough :D

@y21
Copy link
Member

y21 commented Apr 1, 2024

Let's see, @bors try

Do you think it's worth nominating for tomorrow's clippy meeting? (I can't remember if it's tomorrow or the other week)

bors added a commit that referenced this pull request Apr 1, 2024
Ignore `rustc-ice-` files

When ui-test detects a crash, it writes it into a `rustc-ice-*` file. I find it a bit annoying that git always want's to add them. So this just adds these files to our `.gitignore` :D

---

changelog: none
@bors
Copy link
Contributor

bors commented Apr 1, 2024

⌛ Trying commit 24d20b4 with merge e9f8801...

@bors
Copy link
Contributor

bors commented Apr 1, 2024

☀️ Try build successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Build commit: e9f8801 (e9f8801b79ac291ff13446a4b00afe77bec5d4b3)

@xFrednet
Copy link
Member Author

xFrednet commented Apr 1, 2024

My calendar says tomorrow. I don't think it's worth it, but if you're unsure about this change, we can nominate it :)

Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

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

Ok, yeah, seems like an uncontroversial change. I was wondering if anyone working on clippy would need these files, but I can't think of a reason. LGTM

@xFrednet
Copy link
Member Author

xFrednet commented Apr 1, 2024

I don't think so, rustc still dumps the stack trace into the console, which can be used for debugging. If someone notices this change, we could just add a new flag to cargo dev lint :)

Then let's get this merged

@y21
Copy link
Member

y21 commented Apr 1, 2024

Do we have some kind of test that makes sure that ICEs are still reported even with this change? Just so that we'd notice if the meaning of RUSTC_ICE=0 changes to "don't write ICEs at all, not even to stdout".

@xFrednet
Copy link
Member Author

xFrednet commented Apr 1, 2024

@y21
Copy link
Member

y21 commented Apr 1, 2024

Ah ok good 👍
Thanks! @bors r+

@bors
Copy link
Contributor

bors commented Apr 1, 2024

📌 Commit 24d20b4 has been approved by y21

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 1, 2024

⌛ Testing commit 24d20b4 with merge 41e814a...

@bors
Copy link
Contributor

bors commented Apr 1, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: y21
Pushing 41e814a to master...

@bors bors merged commit 41e814a into rust-lang:master Apr 1, 2024
@xFrednet xFrednet deleted the 00000-ignore-ice branch April 1, 2024 16:25
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants