Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd clippy and fix commands to x.py #56595
Conversation
rust-highfive
assigned
nikomatsakis
Dec 7, 2018
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
label
Dec 7, 2018
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
rust-highfive
assigned
alexcrichton
and unassigned
nikomatsakis
Dec 10, 2018
alexcrichton
referenced this pull request
Dec 10, 2018
Closed
Add more rust_private attributes #56559
bors
added a commit
that referenced
this pull request
Dec 11, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Dec 12, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Dec 13, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Dec 14, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Dec 14, 2018
This comment has been minimized.
This comment has been minimized.
|
Thanks for the PR! I'm somewhat hesitant to merge this in though because it seems like it's presumably duplicating a lot of code already there for other aspects of rustbuild. Rustbuild already suffers from a good deal of duplication, so I think I'd personally prefer if we could try to explore strategies of deduplication before merging these in |
This comment has been minimized.
This comment has been minimized.
|
I would kind of like to merge this actually. It would be a big step towards moving the compiler to edition 2018. |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton there is definitely room for improvement in terms of deduplication, that's one of the reasons for the WIP; I just wanted to make sure the general approach was fine before squeezing the code a bit more. I'll rebase and deduplicate the code shortly. |
ljedrz
force-pushed the
ljedrz:x_py_clippy_fix
branch
from
9135b3e
to
0e43db1
Dec 15, 2018
ljedrz
changed the title
[WIP] Add clippy and fix commands to x.py
Add clippy and fix commands to x.py
Dec 15, 2018
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton I updated the commit - the new commands are now integrated into |
bors
added a commit
that referenced
this pull request
Dec 15, 2018
bors
added a commit
that referenced
this pull request
Dec 15, 2018
This comment has been minimized.
This comment has been minimized.
|
|
ljedrz
force-pushed the
ljedrz:x_py_clippy_fix
branch
from
0e43db1
to
aee9a7a
Dec 16, 2018
This comment has been minimized.
This comment has been minimized.
|
Rebased. |
sinkuu
reviewed
Dec 16, 2018
| @@ -23,6 +23,22 @@ pub struct Std { | |||
| pub target: Interned<String>, | |||
| } | |||
|
|
|||
| fn args(kind: Kind) -> Vec<String> { | |||
| match kind { | |||
| Kind::Clippy => vec!["--".to_owned(), "-W".to_owned(), "clippy::all".to_owned()], | |||
This comment has been minimized.
This comment has been minimized.
sinkuu
Dec 16, 2018
Contributor
-W clippy::all breaks on any error. Is there a way to produce errors but not have them break the progress?
--cap-lints warn should work.
This comment has been minimized.
This comment has been minimized.
ljedrz
Dec 17, 2018
•
Author
Contributor
I managed to pass it into clippy arguments, but it doesn't seem to be enough
This comment has been minimized.
This comment has been minimized.
You can make
This is also due to rustc shim. It removes |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the suggestions @sinkuu! I'll apply them soon. Edit: I added |
ljedrz
force-pushed the
ljedrz:x_py_clippy_fix
branch
2 times, most recently
from
5176bb1
to
0820b48
Dec 17, 2018
Dylan-DPC
removed
the
S-waiting-on-review
label
Feb 11, 2019
This comment has been minimized.
This comment has been minimized.
|
ping from triage @ljedrz you have conflicts to address |
ljedrz
force-pushed the
ljedrz:x_py_clippy_fix
branch
from
0820b48
to
b4362a2
Feb 12, 2019
This comment has been minimized.
This comment has been minimized.
|
Rebased. |
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ljedrz
force-pushed the
ljedrz:x_py_clippy_fix
branch
from
b4362a2
to
bbc1323
Feb 12, 2019
This comment has been minimized.
This comment has been minimized.
|
|
ljedrz
force-pushed the
ljedrz:x_py_clippy_fix
branch
from
bbc1323
to
cfab6c7
Feb 13, 2019
This comment has been minimized.
This comment has been minimized.
|
ping from triage @ljedrz you have conflicts to attend to. |
This comment has been minimized.
This comment has been minimized.
|
|
oli-obk
referenced this pull request
Feb 26, 2019
Closed
Cosmetic changes to compiler comments and docs #58619
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@Dylan-DPC actually I forgot about this one among the HirIdification efforts ^^. @oli-obk is there still a plan to include that unstable flag that would allow normal errors to be printed? |
This comment has been minimized.
This comment has been minimized.
|
@ljedrz oops.. haven't closed it yet :P do you plan on working on it this week or can i close it and you can reoopen or create a new PR (preferably) when you feel like working on it? |
This comment has been minimized.
This comment has been minimized.
|
@ljedrz I'll hack something up |
This comment has been minimized.
This comment has been minimized.
|
@Dylan-DPC rebasing this shouldn't be a problem, I can do it shortly. |
ljedrz
force-pushed the
ljedrz:x_py_clippy_fix
branch
from
cfab6c7
to
c0d52e7
Mar 11, 2019
This comment has been minimized.
This comment has been minimized.
|
Rebased. |
oli-obk
referenced this pull request
Mar 12, 2019
Open
Emit ansi color codes in the `rendered` field of json diagnostics #59128
TimNN
added
S-waiting-on-review
S-blocked
and removed
S-waiting-on-author
S-waiting-on-review
labels
Mar 19, 2019
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
It's blocked on #59128 getting merged (which is waiting for bors to get to it) |
This comment has been minimized.
This comment has been minimized.
|
Would it make sense to have bors increase the priority of PRs that are blocking other PRs? |
ljedrz commentedDec 7, 2018
•
edited
Since they are kind of similar in nature, I have used the same approach as for
cargo check. At least some of the boilerplate could probably be shared, but I'd prefer to gather some feedback before I decide to merge them more aggressively.This works reasonably well for
clippy; with-A clippy::alland some extra#![feature(rustc_private)]s almost the whole codebase can be processed. There are some concerns, though:check, in order to be able to traverse all the crates, some of them need to be marked with the#![feature(rustc_private)]attribute-W clippy::allbreaks on any error. Is there a way to produce errors but not have them break the progress?check)cargo fixis much more stubborn; it refuses to acknowledge crates likecoreandstd, so it doesn't progress much at all.Since this is a bit more tricky than I have envisioned, I need some guidance:
rustc_privatefeatures necessary? I was hoping for the same treatment ascheckclippyandcargo fixneeded e.g. in order to produce errors in the same manner ascheckor did I miss something?check,clippyandfixfiles be condensed?Hopes-to-fix: #53896
Cc @alexcrichton, @zackmdavis