Closed
Bug 1154006
Opened 6 years ago
Closed 6 years ago
Ability to lazy load argument parsers passed in via @Command decorator
Categories
(Firefox Build System :: Mach Core, enhancement)
Firefox Build System
Mach Core
Tracking
(firefox40 fixed)
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
References
Details
Attachments
(1 file, 1 obsolete file)
There's a 'parser' argument to the @Command decorator which is super helpful if you want to delegate command line handling to the underlying module. Unfortunately it requires an ArgumentParser instance which means it needs to be instantiated at parse time. In other words, the instance will be created every time mach gets invoked, even if running 'help' or a completely unrelated command. It should also be possible (I'd even argue required) to lazy load the parsers instead.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•6 years ago
|
||
/r/7005 - Bug 1154006 - [mach] Ability to lazy load parsers passed in via the @Command decorator, r=gps Pull down this commit: hg pull -r 8d9d466395c8ef0bf64e43a17bd1293b92ec52aa https://reviewboard-hg.mozilla.org/gecko/
Attachment #8591851 -
Flags: review?(gps)
Assignee | ||
Comment 2•6 years ago
|
||
Comment on attachment 8591851 [details] MozReview Request: bz://1154006/ahal /r/7005 - Bug 1154006 - [mach] Ability to lazy load parsers passed in via the @Command decorator, r=gps Pull down this commit: hg pull -r d596a8c1c5a947de18c8c6bfe1e7642074871fcb https://reviewboard-hg.mozilla.org/gecko/
Assignee | ||
Comment 3•6 years ago
|
||
The latest version passes the context to handler.parser. I need this so the MochitestArgumentParser can intelligently set --xre-path on B2G (which gets passed in via the context), among other things. For context, my goal is to make the mochitest harness do all of the smart things that the mach command currently handles.
Comment 4•6 years ago
|
||
Comment on attachment 8591851 [details] MozReview Request: bz://1154006/ahal https://reviewboard.mozilla.org/r/7003/#review5973 Nice.
Attachment #8591851 -
Flags: review?(gps) → review+
Assignee | ||
Comment 5•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/15b5a4242cf2
Comment 6•6 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/15b5a4242cf2
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Assignee | ||
Comment 7•6 years ago
|
||
Attachment #8591851 -
Attachment is obsolete: true
Attachment #8620033 -
Flags: review+
Assignee | ||
Comment 8•6 years ago
|
||
Updated•3 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•