Closed
Bug 1388100
Opened 8 years ago
Closed 8 years ago
Errors in the preprocessor related to else-mismatches should include which file they are in
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: jaws, Assigned: jaws)
Details
Attachments
(1 file)
STR:
In /toolkit/content/xul.css, insert an errant #else
Build Firefox
Actual results:
In the build output, should see a message that says:
WARNING: bad nesting of #else
Expected results:
In the build output, should see a message that says:
WARNING: bad nesting of #else in c:\fx\toolkit\content\xul.css
| Assignee | ||
Comment 1•8 years ago
|
||
In comment #0, I meant to say "insert an errant %else" because this is a CSS file.
Assignee: nobody → jaws
Status: NEW → ASSIGNED
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 3•8 years ago
|
||
I ran in to this while working on bug 1385913. Having the filename listed would have made this easier to narrow down. I ended up adding this logging to find my mistake.
Summary: Errors in the preprocessor should include which file they are in → Errors in the preprocessor related to else-mismatches should include which file they are in
Comment 4•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8894562 [details]
Bug 1388100 - Log filenames of else mismatches in the preprocessor.
https://reviewboard.mozilla.org/r/165722/#review170854
::: python/mozbuild/mozbuild/preprocessor.py:581
(Diff revision 1)
> if args in self.context:
> del self.context[args]
> # Logic
> def ensure_not_else(self):
> if len(self.ifStates) == 0 or self.ifStates[-1] == 2:
> - sys.stderr.write('WARNING: bad nesting of #else\n')
> + sys.stderr.write('WARNING: bad nesting of #else in %s\n' % self.context['FILE'])
I'd be tempted to make this a fatal error by raising `Preprocessor.Error`. However, my guess is it is a rabbit hole. Improving the message is an obvious step forward. So r+.
Attachment #8894562 -
Flags: review?(gps) → review+
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ab346b62f90
Log filenames of else mismatches in the preprocessor. r=gps
Comment 6•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•