Closed
Bug 882859
Opened 12 years ago
Closed 12 years ago
Move FAIL_ON_WARNINGS into moz.build
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla26
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 4 obsolete files)
6.08 KB,
patch
|
Details | Diff | Splinter Review | |
161.03 KB,
patch
|
joey
:
review+
|
Details | Diff | Splinter Review |
18.33 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
1.66 KB,
patch
|
mshal
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #762237 -
Flags: review?(gps)
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #762239 -
Flags: review?(joey)
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #762240 -
Flags: review?(mshal)
Comment 4•12 years ago
|
||
Comment on attachment 762237 [details] [diff] [review]
Part a: logic
Review of attachment 762237 [details] [diff] [review]:
-----------------------------------------------------------------
\o/
Attachment #762237 -
Flags: review?(gps) → review+
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #762245 -
Flags: review?(gps)
Assignee | ||
Comment 6•12 years ago
|
||
CC'ing the one guy who might bitrot me here
Comment 7•12 years ago
|
||
Not actively working on any FAIL_ON_WARNINGS patches, so you're clear. :)
Comment 8•12 years ago
|
||
Comment on attachment 762245 [details] [diff] [review]
Part d: disallow it in makefiles
Review of attachment 762245 [details] [diff] [review]:
-----------------------------------------------------------------
Good riddance.
Attachment #762245 -
Flags: review?(gps) → review+
Comment 9•12 years ago
|
||
Comment on attachment 762240 [details] [diff] [review]
Part c: manual moves
Review of attachment 762240 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me! Anyone know if all the _MSC_VER checks are legitimate? Or something that has just been copied/pasted around?
Attachment #762240 -
Flags: review?(mshal) → review+
Comment 10•12 years ago
|
||
(In reply to Michael Shal [:mshal] from comment #9)
> Looks good to me! Anyone know if all the _MSC_VER checks are legitimate? Or
> something that has just been copied/pasted around?
Not something to be copypasted.
Those are usually there because the directory is warning-free *except* for a MSVC-specific warnings. Ideally we should fix these MSVC build warnings and remove the exemption, but it's not always obvious what the best way to do that is. (and people tend to be slow about fixing build warnings, since they're low-priority)
Comment 11•12 years ago
|
||
(oh, I see - you were asking if it *has* been copypasted. Not sure; 2 ways to check: (a) look at hg blame to see if it was a conscious decision, and/or (b) remove it and see what happens :))
Comment 12•12 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #11)
> (oh, I see - you were asking if it *has* been copypasted. Not sure; 2 ways
> to check: (a) look at hg blame to see if it was a conscious decision, and/or
> (b) remove it and see what happens :))
Yeah, that's what I meant to say :). I'm sure at least one of them has a reason for being there, but it struck me as odd that there would be so many. In any case we don't need to fix it for this bug.
Comment 13•12 years ago
|
||
Looks like all MSVC exemptions are legitimate.
Assignee | ||
Comment 14•12 years ago
|
||
Random statistic:
bxr.html | 4271 ++++++++++++-----------------------------------------------------------------------------------------------------------------------
1 files changed, 420 insertions(+), 3851 deletions(-)
Comment 15•12 years ago
|
||
Comment on attachment 762239 [details] [diff] [review]
Part b: automated moves
I tried to verify that FOW is being attention to but the build does not seem to fail with embedded warnings, at least beneath netwerk/dns/.
1) modify netwerk/dns/nameprep.c and add a few unused variables to trigger a warning condition.
2) netwerk/dns/moz.build contains 'FAIL_ON_WARNINGS = True' from the patch
3) compile, -Werror was not passed as a compiler flag and make reported
WARNINGS_AS_ERRORS=$(null)
config/config.mk
================
# Check for normal version of flag, and add WARNINGS_AS_ERRORS if it's set to 1.
ifdef FAIL_ON_WARNINGS
CXXFLAGS += $(WARNINGS_AS_ERRORS)
CFLAGS += $(WARNINGS_AS_ERRORS)
endif # FAIL_ON_WARNINGS
% check.sh
grep='WARN', FILE: netwerk/dns/moz.build
FAIL_ON_WARNINGS = True
grep='WARN', FILE: netwerk/dns/Makefile.in
grep='WARN', FILE: obj-x86_64-unknown-linux-gnu/netwerk/dns/backend.mk
A FOW assignment seems to be missing from backend.mk, maybe v=True was handled as something other than bool.
python/mozbuild/mozbuild/backend/recursivemake.py
+ elif isinstance(v, bool):
+ if v:
+ backend_file.write('%s := 1\n' % k)
Attachment #762239 -
Flags: review?(joey) → review-
Comment 16•12 years ago
|
||
You have to explicitly --enable-warnings-as-errors in your mozconfig for these to take effect.
Assignee | ||
Comment 17•12 years ago
|
||
It seems like this is the same thing from bug 883284, where we don't pick it up in config.mk.
Comment 18•12 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #16)
> You have to explicitly --enable-warnings-as-errors in your mozconfig for
> these to take effect.
This would be good to mention in the var docs. If that was the only problem the patch can have an r+.
Comment 19•12 years ago
|
||
If it's not making it into backend.mk then there might be another issue. If it's making it there but not taking effect then it might be a combination of the configure flag and possibly what Ms2ger mentioned above.
Assignee | ||
Comment 20•12 years ago
|
||
I checked manually for content/events/src; the backend.mk correctly has "FAIL_ON_WARNINGS := 1", and the Makefile has
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk
include $(topsrcdir)/config/rules.mk
so I'm going to blame that. Which means that we need to deal with it somehow.
Comment 21•12 years ago
|
||
(I don't know how close this is to landing, given comment 20 & friends, but just as a heads-up: bug 885598 adds a few more FAIL_ON_WARNINGS annotations)
Updated•12 years ago
|
Depends on: FAIL_ON_WARNINGS
Comment 22•12 years ago
|
||
(bug 889136 adds another new annotation, too.)
(I won't mention any further new annotations here; not sure how soon we'll sort out the backend.mk issue, but when we do, it'd probably be worth doing a 'hg log -p | grep FAIL_ON_WARNINGS' before landing to catch any annotations that've been added since the last patch was posted here on June 13)
Comment 23•12 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #22)
> (bug 889136 adds another new annotation, too.)
(sorry, I meant bug 889099)
(I'll shut up now, I promise)
Assignee | ||
Comment 24•12 years ago
|
||
Yeah, I'll catch them then.
Assignee | ||
Comment 25•12 years ago
|
||
Attachment #762237 -
Attachment is obsolete: true
Assignee | ||
Comment 26•12 years ago
|
||
This should only contain changes to makefiles that don't include config.mk directly. Any removed comments and now-empty makefiles are dealt with in the next patch.
Attachment #762239 -
Attachment is obsolete: true
Attachment #791729 -
Flags: review?(joey)
Assignee | ||
Comment 27•12 years ago
|
||
Attachment #762240 -
Attachment is obsolete: true
Attachment #791730 -
Flags: review?(joey)
Assignee | ||
Comment 28•12 years ago
|
||
I haven't yet done the following:
* dom/plugins/test/testplugin/Makefile.in
* js/xpconnect/shell/Makefile.in
* netwerk/test/Makefile.in
* security/manager/ssl/tests/unit/test_ocsp_stapling/Makefile.in
* uriloader/exthandler/tests/Makefile.in
* xpcom/tests/Makefile.in
and I'll probably do those in a followup.
Attachment #762245 -
Attachment is obsolete: true
Attachment #791731 -
Flags: review?(khuey)
Comment 29•12 years ago
|
||
Comment on attachment 791729 [details] [diff] [review]
Part b (1): automatic moves
Review of attachment 791729 [details] [diff] [review]:
-----------------------------------------------------------------
Patch looks good.
Attachment #791729 -
Flags: review?(joey) → review+
Comment 30•12 years ago
|
||
Comment on attachment 791730 [details] [diff] [review]
Part b (2): manual moves
Review of attachment 791730 [details] [diff] [review]:
-----------------------------------------------------------------
Nits:
=================================================================
Source Error: tools/profiler/moz.build
line 9: Trailing whitespace detected - or remove extra blank line.
Source Error: netwerk/system/maemo/Makefile.in
line 17: Trailing whitespace detected
Source Error: netwerk/system/android/Makefile.in
line 16: Trailing whitespace detected
Source Error: embedding/browser/webBrowser/Makefile.in
line 18: Trailing whitespace detected
Comment 31•12 years ago
|
||
Comment on attachment 791730 [details] [diff] [review]
Part b (2): manual moves
Review of attachment 791730 [details] [diff] [review]:
-----------------------------------------------------------------
Patch looks good for the most part but there are several stray edits that should be submitted in a separate patch.
can r+ once the comments are relocated.
content/xslt/src/xslt/Makefile.in
=================================
+
+# For nsDependentJSString
dom/bindings/Makefile.in
========================
+
+# Need this to find all our DOM source files.
dom/system/windows/Makefile.in
==============================
+
+# We fire the nsDOMDeviceAcceleration
embedding/components/windowwatcher/src/Makefile.in
==================================================
-LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \
+
+# For nsJSUtils
+LOCAL_INCLUDES += \
+ -I$(topsrcdir)/dom/base \
+ $(NULL)
image/encoders/ico/Makefile.in
==============================
+
+# Decoders need RasterImage.h
image/src/Makefile.in
=====================
+
+# We need to instantiate the decoder
netwerk/dns/Makefile.in
=======================
+
+# need to include etld_data.inc
netwerk/streamconv/src/moz.build
================================
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' and CONFIG['OS_TEST'] != 'x86_64':
dom/plugins/test/testplugin/moz.build
gfx/thebes/moz.build b/gfx/thebes/moz.build
js/xpconnect/wrappers/moz.build
media/mtransport/build/moz.build
[...]
==================================================
* Is _MSC_VER guaranteed to be defined on all platforms ?
+FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
gfx/thebes/Makefile.in b/gfx/thebes/Makefile.in
-ifndef _MSC_VER
-FAIL_ON_WARNINGS = 1
-endif # !_MSC_VER
Attachment #791730 -
Flags: review?(joey) → review-
Assignee | ||
Comment 32•12 years ago
|
||
(In reply to Joey Armstrong [:joey] from comment #31)
> Comment on attachment 791730 [details] [diff] [review]
> Part b (2): manual moves
>
> Review of attachment 791730 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Patch looks good for the most part but there are several stray edits that
> should be submitted in a separate patch.
> can r+ once the comments are relocated.
These comments are those that were removed in the automated patch; I'll merge both on landing.
Assignee | ||
Updated•12 years ago
|
Attachment #791730 -
Flags: review- → review?(joey)
Comment 33•12 years ago
|
||
(In reply to :Ms2ger from comment #32)
> (In reply to Joey Armstrong [:joey] from comment #31)
> > Comment on attachment 791730 [details] [diff] [review]
> > Part b (2): manual moves
> >
> > Review of attachment 791730 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > Patch looks good for the most part but there are several stray edits that
> > should be submitted in a separate patch.
> > can r+ once the comments are relocated.
>
> These comments are those that were removed in the automated patch; I'll
> merge both on landing.
If the bug is handling migration of 'FAIL_ON_WARNINGS' -- adding comments/reformatting LOCAL_INCLUDE and adding platform checks around MOZ_WIDGET_TOOLKIT should be handled in a separate patch since they are different logic.
Also are try results available to validate the results ? Esp CONFIG['_MSC_VER'] ?
netwerk/streamconv/src/moz.build
================================
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' and CONFIG['OS_TEST'] != 'x86_64':
dom/plugins/test/testplugin/moz.build
gfx/thebes/moz.build b/gfx/thebes/moz.build
js/xpconnect/wrappers/moz.build
media/mtransport/build/moz.build
[...]
==================================================
* Is _MSC_VER guaranteed to be defined on all platforms ?
+FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
gfx/thebes/Makefile.in b/gfx/thebes/Makefile.in
-ifndef _MSC_VER
-FAIL_ON_WARNINGS = 1
-endif # !_MSC_VER
Updated•12 years ago
|
Attachment #791730 -
Flags: review?(joey)
Attachment #791731 -
Flags: review?(khuey) → review?(mshal)
Comment 34•12 years ago
|
||
Comment on attachment 791731 [details] [diff] [review]
Part c: Move in dom/plugins/ipc/hangui
Bit confusing to review since FAIL_ON_WARNINGS is used in config.mk, and MOZ_GLUE_LDFLAGS is supposed to override the setting in autoconf.mk, but I think all the changes are good.
Attachment #791731 -
Flags: review?(mshal) → review+
Comment 35•12 years ago
|
||
Good point, there's a ifdef FAIL_ON_WARNINGS in config.mk (in fact, that's what actually enables it), and backend.mk is included *after* than.
Assignee | ||
Comment 36•12 years ago
|
||
Almost, but not quite:
http://mxr.mozilla.org/mozilla-central/source/config/rules.mk?mark=63-63,77-77#58
Comment 37•12 years ago
|
||
ah, thus the removal of config.mk includes.
Comment 38•12 years ago
|
||
Comment on attachment 791730 [details] [diff] [review]
Part b (2): manual moves
Review of attachment 791730 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me. I'm not too worried about FAIL_ON_WARNINGS causing anything too severe to lose sleep over.
::: tools/profiler/moz.build
@@ +5,5 @@
> # file, You can obtain one at http://mozilla.org/MPL/2.0/.
>
> if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
> + FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
> +
Nit: whitespace
Attachment #791730 -
Flags: review+
Comment 39•12 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #38)
> Comment on attachment 791730 [details] [diff] [review]
> Part b (2): manual moves
>
> Review of attachment 791730 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Looks good to me. I'm not too worried about FAIL_ON_WARNINGS causing
> anything too severe to lose sleep over.
>
> ::: tools/profiler/moz.build
> @@ +5,5 @@
> > # file, You can obtain one at http://mozilla.org/MPL/2.0/.
> >
> > if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
> > + FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
> > +
>
> Nit: whitespace
I've had some of the conversion patches rejected over stray content and comments like these. Any particular reason they are ok in this patch ?
Assignee | ||
Comment 40•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/db29093b48d2
https://hg.mozilla.org/mozilla-central/rev/9fb5b1f56c21
https://hg.mozilla.org/mozilla-central/rev/ea6d4b1744f5
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•