./mach eslint --setup fails on Windows

RESOLVED FIXED in Firefox 55

Status

defect
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: mak, Assigned: standard8)

Tracking

({regression})

unspecified
mozilla55

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox53 unaffected, firefox54 unaffected, firefox55 fixed)

Details

Attachments

(1 attachment)

$ ./mach eslint --setup
Installing eslint for mach using "C:\Program Files\nodejs\npm install --loglevel=error"...
Traceback (most recent call last):
  File "d:\src\python/mozlint\mozlint\roller.py", line 56, in _run_worker
    return _run_linters(*args, **lintargs)
  File "d:\src\python/mozlint\mozlint\roller.py", line 43, in _run_linters
    res = func(paths, linter, **lintargs) or []
  File "d:\src\python/mozlint\mozlint\types.py", line 37, in __call__
    return self._lint(paths, linter, **lintargs)
  File "d:\src\python/mozlint\mozlint\types.py", line 104, in _lint
    return payload(files, **lintargs)
  File "d:\src\tools\lint\eslint.lint.py", line 46, in lint
    return setup_helper.eslint_setup()
  File "d:\src\tools\lint\eslint\setup_helper.py", line 75, in eslint_setup
    if not call_process("eslint", cmd):
  File "d:\src\tools\lint\eslint\setup_helper.py", line 105, in call_process
    subprocess.check_call(cmd, cwd=cwd, stdout=fnull)
  File "d:\mozilla-build\python\lib\subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "d:\mozilla-build\python\lib\subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "d:\mozilla-build\python\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "d:\mozilla-build\python\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 non Þ un'applicazione di Win32 valida
Error running mach:

    ['eslint', '--setup']
This started a couple days ago...

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

WindowsError: [Error 193] %1 non Þ un'applicazione di Win32 valida

  File "d:\src\tools/lint/mach_commands.py", line 62, in eslint
    argv=extra_args, **kwargs)
  File "d:\src\python/mach\mach\registrar.py", line 123, in dispatch
    return self._run_command_handler(handler, context=context, **kwargs)
  File "d:\src\python/mach\mach\registrar.py", line 90, in _run_command_handler
    result = fn(**kwargs)
  File "d:\src\tools/lint/mach_commands.py", line 43, in lint
    return cli.run(*runargs, **lintargs)
  File "d:\src\python/mozlint\mozlint\cli.py", line 111, in run
    workdir=workdir)
  File "d:\src\python/mozlint\mozlint\roller.py", line 150, in roll
    results, failed = worker.get()
  File "d:\mozilla-build\python\lib\multiprocessing\pool.py", line 567, in get
    raise self._value
ehr, sorry the "This started a couple days ago..." comment was intended to be at the top! I messed up with the textarea.
(Assignee)

Updated

2 years ago
Assignee: nobody → standard8
Component: mach → Lint
Product: Core → Testing
(Assignee)

Comment 2

2 years ago
I found the issue, in bug 1346994 we missed a return statement which meant we ended up returning '/path/to/npm', rather than '/path/to/npm.cmd' - for windows only.

Patch coming up.
Blocks: 1346994
Keywords: regression

Comment 4

2 years ago
mozreview-review
Comment on attachment 8872615 [details]
Bug 1368656 - Fix ./mach eslint on windows - add a return in the for loop when trying extensions to ensure we get the right one.

https://reviewboard.mozilla.org/r/144152/#review147872
Attachment #8872615 - Flags: review?(florian) → review+

Comment 5

2 years ago
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/21941d086084
Fix ./mach eslint on windows - add a return in the for loop when trying extensions to ensure we get the right one. r=florian
Duplicate of this bug: 1368693

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/21941d086084
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55

Updated

a year ago
Product: Testing → Firefox Build System
You need to log in before you can comment on or make changes to this bug.