-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make the BUG_REPORT_URL configurable for tools #109486
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Clippy already sets its own URL, so that is already possible. However Clippy needs to do a lot to do that: rust/src/tools/clippy/src/driver.rs Lines 196 to 252 in 439292b
Definitely worth improving the situation here. |
Ah hmm, looks like the original problem was a bug in rustfix:
I'll open a separate issue there. |
@rust-lang/miri the way I'm implementing this requires a change to the miri subtree in rust-lang/rust. What URL would you prefer for the bug report, just https://github.com/rust-lang/miri/issues/new ? |
#110989 - looks like rustfmt isn't using |
In my experience, ICEs in Miri are just as often rustc bugs. I don't care if users report them in either place. |
Do you have a ballpark feel for the size of the change? FWIW I'd be okay with making the rustfmt update in tree if it's reasonably small and logically part of a batch of related in-tree changes |
about 3 lines of code :) most of which will be the URL itself |
sgtm, feel free to go ahead 👍 |
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc `@rust-lang/clippy` Fixes rust-lang#109486.
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ``@rust-lang/clippy`` Fixes rust-lang#109486.
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ```@rust-lang/clippy``` Fixes rust-lang#109486.
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ````@rust-lang/clippy```` Fixes rust-lang/rust#109486.
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ````@rust-lang/clippy```` Fixes rust-lang/rust#109486.
Make the BUG_REPORT_URL configurable by tools This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy the entire hook implementation. I haven't changed clippy in case they want to make the change upstream instead of the subtree, but I'm happy to do so here if the maintainers want - cc ````@rust-lang/clippy```` Fixes rust-lang/rust#109486.
Right now,
install_ice_hook
hard-codes the bug report url to"https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md"
:rust/compiler/rustc_driver_impl/src/lib.rs
Line 1192 in 6502613
For tools, this is not correct; rustdoc at least wants
T-rustdoc
instead ofT-compiler
, and other tools want different repositories altogether. I'm opening this bug here because it's relevant to all tools, even though the original context was for clippy.Fixing this seems a little tricky since
DEFAULT_HOOK
can't take an argument and doesn't have access to TyCtxt, but maybe we can solve this with thread-locals or something similar?cc @rust-lang/rustdoc @rust-lang/clippy @rust-lang/miri @rust-lang/rustfmt
_Originally posted by @ingomancer in rust-lang/rust-clippy#10529
The text was updated successfully, but these errors were encountered: