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 as a submodule #43886
Conversation
rust-highfive
assigned
nrc
Aug 15, 2017
oli-obk
force-pushed the
oli-obk:clippy
branch
from
555a0e5
to
1766992
Aug 15, 2017
This comment has been minimized.
This comment has been minimized.
|
This seems to block CI on clippy builds, yeah? It seems like rust-dev-tools/dev-tools-team#18 (comment) said we should do this too, but just want to check with @nrc again on that. I'm very happy if rustc blocks on clippy builds in CI, but I'm just not sure if that's what nrc was going for. |
This comment has been minimized.
This comment has been minimized.
Yes that's how I read that comment, too. I don't think it's too much of a burden on developers to "just get it compiling again", since they just got the entire rustc compiling again and know the knobs to twist. The runtime effects of such a change can then be left to us, as they traditionally are much less complex to figure out (once you have written a few lints). The only issue I see is that it requires a stage2 build due to a dependency on Note that currently this also builds |
This comment has been minimized.
This comment has been minimized.
We should document the process for fixing this somewhere before landing IMO. (I can do a writeup if you want)
Because of toml? Ideally libclippy.so or the rust-clippy driver won't read from toml at all, that's all cargo clippy's job. Though passing this info down to rust-clippy without a format will be annoying. |
This comment has been minimized.
This comment has been minimized.
done
We can probably pass these things as CLI flags, which are already parsed. |
Manishearth
reviewed
Aug 15, 2017
| you can point the submodule at your pull request by calling | ||
|
|
||
| ``` | ||
| git checkout pulls/$id_of_your_pr/head |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
oli-obk
referenced this pull request
Aug 15, 2017
Merged
Rust needs clippy to have a Cargo.lock #1963
oli-obk
added some commits
Aug 15, 2017
arielb1
added
the
S-waiting-on-author
label
Aug 15, 2017
This comment has been minimized.
This comment has been minimized.
|
I'm not sure why this is marked |
This comment has been minimized.
This comment has been minimized.
|
probably because it's marked as WIP? |
oli-obk
changed the title
WIP: Add clippy as a submodule
Add clippy as a submodule
Aug 16, 2017
This comment has been minimized.
This comment has been minimized.
|
How regularly should we be updating this? Only in the event of breakage, or should we keep it in sync every day so that rustc contributors have to do less merge conflict work upgrading? We probably should maintain a |
This comment has been minimized.
This comment has been minimized.
That makes sense. We can merge the |
This comment has been minimized.
This comment has been minimized.
This is up to the Clippy devs. Updating means a PR that has to go through the bors process (though it should be a rollup), so it is not trivial. I tend to update the RLS every week or two, basically when I do a release of the client or there is a significant change. |
This comment has been minimized.
This comment has been minimized.
Sorry, I was not 100% clear in that comment. I meant that building and testing should be possible, but neither should block landing PRs. |
nrc
added
the
S-waiting-on-review
label
Aug 17, 2017
This comment has been minimized.
This comment has been minimized.
|
This looks good to me (modulo the building blocking PRs thing). @Mark-Simulacrum - could you r? the build system changes please? |
This comment has been minimized.
This comment has been minimized.
|
Build system changes seem fine. Note that this won't dist clippy in the current configuration, but that's presumably intentional. |
This comment has been minimized.
This comment has been minimized.
I'm not sure what the point of running it inside CI is, if noone ever notices that the build breaks. Should I turn it on so it is unconditionally run and tested in Or is this where we add the exception file to the build system, so if clippy breaks, one adds it to the file and it's not built anymore on CI? This way everbody notices when they break clippy and have a choice between ignoring it and @ mentioning us or fixing it? |
This comment has been minimized.
This comment has been minimized.
It is a more long-term goal that Clippy block CI, the core team are not ready to do that until at least the RLS rides the trains to beta (it is considered too risky to have multiple tools doing new things).
That sounds good to me. |
This comment has been minimized.
This comment has been minimized.
|
Oh wait I think no, let's please not run tests yet. We are not in a position to do so right now. It wouldn't be a great experience to download broken trees from git "by default" as I suspect the clippy submodule will be broken quite often. Although we can land PRs that'd just hurt developers. I've commented elsewhere about how we're going to run tests, but that support isn't here yet. I don't personally know why we'd add build support in tree before there's infrastructure to actually run tests for it, but I won't stop it if others would like it. |
This comment has been minimized.
This comment has been minimized.
Makes total sense.
I'm very confused now. This PR only builds clippy. It does not run its tests.
broken as in doesn't build or broken as in "that commit doesn't exist, git will complain"? Because it'll only be the former.
The goal of this PR is to ensure that it will never be broken again, because it'll only break if the developer changes something that would break it. That developer is at the same time in the unique position to know exactly how to fix it (since they just had to fix it all over rustc).
Soo... simply as stated above
|
This comment has been minimized.
This comment has been minimized.
|
The goal of this PR, in that case, is not satisfiable right now. We aren't in a position to ensure that "clippy never breaks again". |
This comment has been minimized.
This comment has been minimized.
|
That's fine, it doesn't have to happen in this PR. If I made it easy to tune out the clippy building failure, but have it still happen by default on local builds, would that be ok? I mean it could be as simple as uncommenting an entry in a This way, if your PR breaks clippy, you either fix clippy, or turn building it off for everyone who comes after your build. In the first case, we get a PR at clippy, in the second case, someone should ping us, we create a new PR that reenables clippy together with the fixed clippy. This means noone ever gets a broken clippy without it being their fault. |
This comment has been minimized.
This comment has been minimized.
Clippy tests don't break often. Mostly clippy-side changes break them, and we CI Clippy side. If a rustc change breaks clippy that's the concern, and we're fine with having tests broken for a short while as we fix things. This PR has two goals. It starts giving Clippy authors early warning about breakage, and gives PR authors the ability to fix it. Many clippy breakages are from rustc changes that contain mostly automated fixes to the rest of The second goal is to prototype the eventual contribution model. This way we can work towards a smooth integration and work out all the kinks before all the parts are ready. |
This comment has been minimized.
This comment has been minimized.
Yes that's what the "planned infrastructure" is currently thought to look roughly like. This doesn't exist today, however, so no, I do not think we should enable anything for local builds. |
This comment has been minimized.
This comment has been minimized.
|
Ok. So I'm kind of lost here now wrt what I should do in this PR. I can create said infrastructure if that is desirable and noone has existing plans or already started working on it. Or should I just disable all the clippy building and require one to run |
arielb1
removed
the
S-waiting-on-review
label
Aug 22, 2017
This comment has been minimized.
This comment has been minimized.
Isn't that what this PR does? I don't mind adding more infrastructure here, although I'm not sure if we've hammered out precisely what we'd like it to look like. The discussion here leads me to believe that at least mine and @nrc's perceptions of these workflows may differ? |
This comment has been minimized.
This comment has been minimized.
No, it also builds clippy if you just do |
This comment has been minimized.
This comment has been minimized.
|
I disabled building clippy by default and edited the OP message to reflect the current state of the PR |
This comment has been minimized.
This comment has been minimized.
|
@oli-obk I've created a tracking issue for the requirements of what we think the infrastructure for running tests would look like. |
carols10cents
added
S-waiting-on-review
and removed
S-waiting-on-author
labels
Aug 28, 2017
This comment has been minimized.
This comment has been minimized.
|
It sounds like this is back in the reviewers' court. @alexcrichton @nrc what are the next steps on this? (also it looks like travis passed even though it says it's still running) |
This comment has been minimized.
This comment has been minimized.
|
I believe this needs an r+ from @nrc |
shepmaster
added
the
T-dev-tools
label
Sep 1, 2017
This comment has been minimized.
This comment has been minimized.
|
@rust-lang/dev-tools It has been over 6 days since the last comment from a reviewer. Perhaps someone besides @nrc can step up? |
alexcrichton
reviewed
Sep 1, 2017
| @@ -298,6 +298,32 @@ Speaking of tests, Rust has a comprehensive test suite. More information about | |||
| it can be found | |||
| [here](https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md). | |||
|
|
|||
| ### External Dependencies | |||
|
|
|||
| Currently building Rust will also build the following external projects: | |||
This comment has been minimized.
This comment has been minimized.
alexcrichton
Sep 1, 2017
Member
I think this documentation may wish to be updated with the current state of the PR
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ (sorry for the delay) |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Sep 2, 2017
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Sep 2, 2017
This comment has been minimized.
This comment has been minimized.
|
|
oli-obk commentedAug 15, 2017
•
edited
This builds clippy as part of./x.py build(locally and in CI).This allows building clippy with
./x.py build src/tools/clippyNeeds rust-dev-tools/dev-tools-team#18 (comment) to be resolved before it can be merged.Contributers can simply open a PR to clippy and point the submodule at thepull/$pr_number/headbranch.This does not build clippy or test the clippy test suite at all as per rust-dev-tools/dev-tools-team#18 (comment)
r? @nrc
cc @Manishearth @llogiq @mcarton @alexcrichton