Closed
Bug 1299618
Opened 8 years ago
Closed 8 years ago
UnicodeEncodeError on Windows when running |mach lint|
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox51 fixed)
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
References
Details
Attachments
(1 file)
Regression from bug 1258341. Technically this has been broken for awhile, but apparently no one has tried running |mach lint| on Windows until now.
It seems like the msys shell just isn't capable of handling unicode. I have a patch that at least causes the command to *not fail*. Though the 'x' at the end of the output shows up garbled. I don't think it's worth much time trying to fix it further though.
A workaround to this until it lands is:
export PYTHONIOENCODING=UTF-8
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
Note: even after this patch instead of the unicode 'x', users will see some garbage text. But at least they'll be able to run |mach lint|. So we should land this patch for now and deal with actually getting the 'x' to display properly later. Or more likely, just not print unicode in the first place when on msys.
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8787036 [details]
Bug 1299618 - [mozlint] Encode results to utf-8 before printing to stdout,
https://reviewboard.mozilla.org/r/75882/#review74012
::: python/mozlint/mozlint/cli.py:104
(Diff revision 1)
>
> # run all linters
> results = lint.roll(paths, rev=rev, workdir=workdir)
>
> formatter = formatters.get(fmt)
> - print(formatter(results))
> + print(formatter(results).encode('utf-8', 'replace'))
Can you add a comment note about the problems with this partial solution?
Attachment #8787036 -
Flags: review?(smacleod) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8787036 [details]
Bug 1299618 - [mozlint] Encode results to utf-8 before printing to stdout,
https://reviewboard.mozilla.org/r/75880/#review74126
Tested on try here:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecd4a45235011d232a275841b3e804b6efb1ef11
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eeba75f09439
[mozlint] Encode results to utf-8 before printing to stdout, r=smacleod
Comment 7•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Updated•7 years ago
|
Product: Testing → Firefox Build System
Updated•6 years ago
|
Version: Version 3 → 3 Branch
Updated•2 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
•