Closed
Bug 1303725
Opened 9 years ago
Closed 9 years ago
Make mach eslint output more helpful in case of an error
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox52 fixed)
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: Fallen, Assigned: Fallen)
Details
Attachments
(1 file)
If eslint produces an error, the output is not JSON. Therefore mach produces this very unhelpful error that sends you hunting:
ValueError: No JSON object could be decoded
File "/Users/kewisch/mozilla/comm/mozilla/tools/lint/mach_commands.py", line 60, in eslint
linters=['eslint'], paths=paths, **kwargs)
File "/Users/kewisch/mozilla/comm/mozilla/python/mach/mach/registrar.py", line 123, in dispatch
return self._run_command_handler(handler, context=context, **kwargs)
File "/Users/kewisch/mozilla/comm/mozilla/python/mach/mach/registrar.py", line 90, in _run_command_handler
result = fn(**kwargs)
File "/Users/kewisch/mozilla/comm/mozilla/tools/lint/mach_commands.py", line 42, in lint
return cli.run(*runargs, **lintargs)
File "/Users/kewisch/mozilla/comm/mozilla/python/mozlint/mozlint/cli.py", line 101, in run
results = lint.roll(paths, rev=rev, workdir=workdir)
File "/Users/kewisch/mozilla/comm/mozilla/python/mozlint/mozlint/roller.py", line 140, in roll
for k, v in worker.get().iteritems():
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 554, in get
raise self._value
I have a patch prepared that adds a try/catch around the json loading and bails with the real output if an error occurs.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dfe8935421b3
(contains a few other patches I am working on, let me know if you want a separate try run)
Comment 3•9 years ago
|
||
mozreview-review |
Comment on attachment 8792653 [details]
Bug 1303725 - Make mach eslint output more helpful in case of an error.
https://reviewboard.mozilla.org/r/79568/#review78438
Attachment #8792653 -
Flags: review?(mratcliffe) → review+
Pushed by mozilla@kewis.ch:
https://hg.mozilla.org/integration/autoland/rev/fdfd1f5b3131
Make mach eslint output more helpful in case of an error. r=miker
Comment 5•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•7 years ago
|
Product: Testing → Firefox Build System
Updated•7 years ago
|
Version: Version 3 → 3 Branch
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•