Closed Bug 1205144 Opened 4 years ago Closed 4 years ago

mach-commands shouldn't list removed commands

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement
Not set

Tracking

(firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

Details

Attachments

(1 file)

It seems we've removed commands mochitest-*, but we still list them in mach-commands, which is annoying, because the auto-completion stops just after mochitest, and I'll need to manually type a whitespace, which in theory is not necessary.
Bug 1205144 - Remove 'REMOVED' commands from output of mach-commands and mach-debug-commands.
Attachment #8661585 - Flags: review?(gps)
I just check the condition name instead of checking every condition is because querying conditions is too slow for auto-completion.
Comment on attachment 8661585 [details]
MozReview Request: Bug 1205144 - Remove 'REMOVED' commands from output of mach-commands and mach-debug-commands.

https://reviewboard.mozilla.org/r/19407/#review17725

::: python/mach/mach/commands/commandinfo.py:22
(Diff revision 1)
> +                if not v.conditions or v.conditions[0].__name__ != 'REMOVED')

I'm not a huge fan of referencing functions/classes by name. However, we've done this elsewhere because the symbols aren't easily available for import.

Still, you should at least add a comment to the REMOVED function in testing/mochitest/mach_commands.py saying this file references it by name. (Ideally there should be a base class for the decorator in the mach package that we use. But this is scope bloat.)
Attachment #8661585 - Flags: review?(gps) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa5be14d26e5adf896324d91b73cc628bf18b8db
Bug 1205144 - Remove 'REMOVED' commands from output of mach-commands and mach-debug-commands. r=gps DONTBUILD
Assignee: nobody → quanxunzhen
https://hg.mozilla.org/mozilla-central/rev/fa5be14d26e5
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.