-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 compiler-specific warnings in Bazel. #4717
Conversation
e9516b7
to
f1ebdbf
Compare
aac9a4b
to
9a1cdb7
Compare
9a1cdb7
to
5968e53
Compare
I'm not exactly in love with this approach, but it seems to work on both OS X and Ubuntu. @jwnimmer-tri for initial feature review. I've also opened bazelbuild/bazel#2358 |
First pass done. I will probably wait for one round of any edits you elect to do, and after that work on stress testing it locally. Reviewed 8 of 8 files at r1. a discussion (no related file): a discussion (no related file): tools/amend_crosstool.sh, line 1 at r1 (raw file):
Meta This file mixed tabs and spaces for indent. Also lines are >80 and while that's not a rule I guess, it's better for reviewable to keep it all <80. tools/amend_crosstool.sh, line 10 at r1 (raw file):
Add citation to bazelbuild/build#2358 discussion? tools/amend_crosstool.sh, line 20 at r1 (raw file):
BTW If you put the tools/amend_crosstool.sh, line 24 at r1 (raw file):
BTW Consider confirming that the exitcode of the tools/amend_crosstool.sh, line 36 at r1 (raw file):
BTW Should we read these from a one-per-line text file like tools/amend_crosstool.sh, line 43 at r1 (raw file):
BTW De-duplicate the above three lines between the two cases that share them? tools/bazel.rc, line 9 at r1 (raw file):
BTW Consider a comment citation for where to place new warning flags that are only for some compilers? tools/toolchain.bzl, line 17 at r1 (raw file):
BTW I think the word Comments from Reviewable |
Review status: all files reviewed at latest revision, 11 unresolved discussions. tools/toolchain.bzl, line 8 at r1 (raw file):
Unclear what purpose this serves. Comments from Reviewable |
5968e53
to
4033a56
Compare
Review status: 3 of 10 files reviewed at latest revision, 11 unresolved discussions. a discussion (no related file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. a discussion (no related file):
Yes, we definitely could. tools/amend_crosstool.sh, line 1 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/amend_crosstool.sh, line 10 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/amend_crosstool.sh, line 20 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/amend_crosstool.sh, line 24 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/amend_crosstool.sh, line 36 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/amend_crosstool.sh, line 43 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/bazel.rc, line 9 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/toolchain.bzl, line 8 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. tools/toolchain.bzl, line 17 at r1 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Done. Comments from Reviewable |
4033a56
to
78eeb31
Compare
Alright, just a few more notes. Next I will stress test it locally. After these discussions have a response, probably a fine time to tag a second reviewer. Reviewed 7 of 7 files at r2. tools/amend_crosstool.sh, line 1 at r1 (raw file): Previously, david-german-tri (David German) wrote…
These two intro paragraphs are still showing up >>80 in reviewable for me? tools/amend_crosstool.sh, line 26 at r2 (raw file):
BTW Meta its always a bit safer to quote all variable-provided filenames, e.g. tools/amend_crosstool.sh, line 42 at r2 (raw file):
Does this script fail-fast when tools/BUILD, line 40 at r2 (raw file):
BTW Both of these labels are public visibility. I guess that's okay? Comments from Reviewable |
Reviewed 1 of 1 files at r3. tools/BUILD, line 30 at r2 (raw file):
Huh, I would have thought this was at least Comments from Reviewable |
tools/BUILD, line 30 at r2 (raw file): Previously, jwnimmer-tri (Jeremy Nimmer) wrote…
Indeed, changing gcc_options.txt only has an effect the second time I run bazel. I think the Comments from Reviewable |
I take that back. I'm going to stop testing, and we should defer additional review, until the PR correctly and immediately rebuilds everything when the files in this PR are edited. Comments from Reviewable |
I agree. Looking into it now. Review status: all files reviewed at latest revision, 5 unresolved discussions. Comments from Reviewable |
It turns out there is no way to invalidate a repository_rule based on changes to a file that it references. (Because we referenced a Label, we got invalidation of that Label on the second call to I'm abandoning this approach in favor of (3) from bazelbuild/bazel#2358. |
This change is