Fix bug in |mach mach-completion|

RESOLVED FIXED in Firefox 66

Status

enhancement
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: ahal, Assigned: ahal)

Tracking

Trunk
mozilla66

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 months ago

My apologies, I misunderstood the meaning of parser in bug 1518586 and didn't test enough. It looks like only mach commands that use parser=... in their command decorator have that attribute (otherwise it will be None). I mistakenly thought the parser that dispatcher.py creates was stored there. This causes a mach error for commands that don't use a parser (which in turn causes us to use the text of said error as the targets for completion).

Instead what we need to look for is handler.arguments in addition to handler.parser. I'll update ASAP.

(Assignee)

Comment 1

3 months ago
This fixes an issue from bug 1518586.

It stemmed from the fact that I misunderstood how the 'parser' attribute
was being used in mach commands and didn't do enough testing. This patch
fixes things such that we check that 'parser' is not None, as well as
add the completion targets from 'handler.arguments'.

Comment 2

3 months ago
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/797e7094701d
[mach] Fix bug in 'mach completion', r=nalexander

Comment 3

3 months ago
bugherder
Status: ASSIGNED → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.