-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add custom ICE message that points to Clippy repo #4588
Conversation
Looks like the test fails because locally I've been running without Is there a way to set the backtrace level in a compiletest header? If I just re-record the stderr output with |
You can also call |
fn is_trigger_fn(fn_kind: FnKind<'_>) -> bool { | ||
match fn_kind { | ||
FnKind::ItemFn(ident, ..) | FnKind::Method(ident, ..) => { | ||
ident.name.as_str() == "should_trigger_an_ice_in_clippy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though Clippy internal lints are never emitted by Clippy, they still run all the time. I don't think that anyone would name a function should_trigger_an_ice_in_clippy
, but I suggest to change this name to one of the following:
should_trigger_an_ice_when_clippy_is_run
- Make it a Clippy easteregg and give it a cool name 😎
it_looks_like_you_are_trying_to_kill_clippy
or similar. (https://twitter.com/ManishEarth/status/1107297057604145152)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh i like the easter egg idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+ with the function name changed 😄
38b0d74
to
bb4cd3a
Compare
I updated the function name and hopefully fixed the test 🙏 I decided to keep the copy of rustc's @bors r=Manishearth |
📌 Commit 1814964 has been approved by |
Add custom ICE message that points to Clippy repo changelog: Link to Clippy issue tracker in ICE messages This utilizes rust-lang/rust#60584 by setting our own `panic_hook` and pointing to our own issue tracker instead of the rustc issue tracker. This also adds a new internal lint to test the ICE message. **Potential downsides** * This essentially copies rustc's `report_ice` function as `report_clippy_ice`. I think that's how it's meant to be implemented, but maybe @jonas-schievink could have a look as well =) The downside of more-or-less copying this function is that we have to maintain it as well now. The original function can be found [here][original]. * `driver` now depends directly on `rustc` and `rustc_errors` Closes #2734 [original]: https://github.com/rust-lang/rust/blob/59367b074f1523353dddefa678ffe3cac9fd4e50/src/librustc_driver/lib.rs#L1185
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 1814964 has been approved by |
Add custom ICE message that points to Clippy repo changelog: Link to Clippy issue tracker in ICE messages This utilizes rust-lang/rust#60584 by setting our own `panic_hook` and pointing to our own issue tracker instead of the rustc issue tracker. This also adds a new internal lint to test the ICE message. **Potential downsides** * This essentially copies rustc's `report_ice` function as `report_clippy_ice`. I think that's how it's meant to be implemented, but maybe @jonas-schievink could have a look as well =) The downside of more-or-less copying this function is that we have to maintain it as well now. The original function can be found [here][original]. * `driver` now depends directly on `rustc` and `rustc_errors` Closes #2734 [original]: https://github.com/rust-lang/rust/blob/59367b074f1523353dddefa678ffe3cac9fd4e50/src/librustc_driver/lib.rs#L1185
💔 Test failed - checks-travis |
Dogfood tests are failing, will fix them later today |
@phansch did you see #4588 (comment)? |
Yup, thanks! It's just that it would be nice to also show the Clippy version instead of the rustc version in the ICE message. I don't think that's possible when using |
We don't really version Clippy separately
…On Wed, Oct 9, 2019, 11:58 AM Phil Hansch ***@***.***> wrote:
@phansch <https://github.com/phansch> did you see #4588 (comment)
<#4588 (comment)>
?
Yup, thanks! It's just that it would be nice to also show the Clippy
version instead of the rustc version in the ICE message. I don't think
that's possible when using rustc_driver::report_ice?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4588?email_source=notifications&email_token=AAMK6SFJY47IJK4MEGEB2ADQNYST5A5CNFSM4I3B5TEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAY6POI#issuecomment-540141497>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMK6SHNO43FKF3HCNCWYK3QNYST5ANCNFSM4I3B5TEA>
.
|
Right, I meant the specific commit hash of the used Clippy. This could be useful for debugging nightly Clippy issues? |
I see, that makes sense. One could also figure that out by looking at the rustc commit, but that's more work. |
☔ The latest upstream changes (presumably #4663) made this pull request unmergeable. Please resolve the merge conflicts. |
4287e9e
to
a4dc78a
Compare
☔ The latest upstream changes (presumably #4825) made this pull request unmergeable. Please resolve the merge conflicts. |
a4dc78a
to
6b5dd79
Compare
@bors r=Manishearth |
📌 Commit 6b5dd79 has been approved by |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
☔ The latest upstream changes (presumably #4837) made this pull request unmergeable. Please resolve the merge conflicts. |
This utilizes rust-lang/rust#60584 by setting our own `panic_hook` and pointing to our own issue tracker instead of the rustc issue tracker. This also adds a new internal lint to test the ICE message. **Potential downsides** * This essentially copies rustc's `report_ice` function as `report_clippy_ice`. I think that's how it's meant to be implemented, but maybe @jonas-schievink could have a look as well =) The downside of more-or-less copying this function is that we have to maintain it as well now. The original function can be found [here][original]. * `driver` now depends directly on `rustc` and `rustc_errors` Closes rust-lang#2734 [original]: https://github.com/rust-lang/rust/blob/59367b074f1523353dddefa678ffe3cac9fd4e50/src/librustc_driver/lib.rs#L1185
6b5dd79
to
c1ccba0
Compare
@bors r=Manishearth |
📌 Commit c1ccba0 has been approved by |
Add custom ICE message that points to Clippy repo changelog: Link to Clippy issue tracker in ICE messages This utilizes rust-lang/rust#60584 by setting our own `panic_hook` and pointing to our own issue tracker instead of the rustc issue tracker. This also adds a new internal lint to test the ICE message. **Potential downsides** * This essentially copies rustc's `report_ice` function as `report_clippy_ice`. I think that's how it's meant to be implemented, but maybe @jonas-schievink could have a look as well =) The downside of more-or-less copying this function is that we have to maintain it as well now. The original function can be found [here][original]. * `driver` now depends directly on `rustc` and `rustc_errors` Closes #2734 [original]: https://github.com/rust-lang/rust/blob/59367b074f1523353dddefa678ffe3cac9fd4e50/src/librustc_driver/lib.rs#L1185
☀️ Test successful - checks-travis, status-appveyor |
changelog: Link to Clippy issue tracker in ICE messages
This utilizes rust-lang/rust#60584 by setting
our own
panic_hook
and pointing to our own issue tracker instead ofthe rustc issue tracker.
This also adds a new internal lint to test the ICE message.
Potential downsides
This essentially copies rustc's
report_ice
function asreport_clippy_ice
. I think that's how it's meant to be implemented, butmaybe @jonas-schievink could have a look as well =)
The downside of more-or-less copying this function is that we have to
maintain it as well now.
The original function can be found here.
driver
now depends directly onrustc
andrustc_errors
Closes #2734