Closed Bug 1077272 Opened 10 years ago Closed 10 years ago

Allow argument groups in mach commands

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla35

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file, 2 obsolete files)

In bug 1074656 I am merging |mach dmd| into |mach run|, and it would make sense
to do the same thing with |mach debug|.

When this is done, argument groups would be really nice.
Here's the output when I combine this patch with my in-progress patch for bug
1074656:

> usage: mach [global arguments] run [command arguments]
> 
> Run the compiled program.
> 
> Global Arguments:
>   -v, --verbose         Print verbose output.
>   -l FILENAME, --log-file FILENAME
>                         Filename to write log data to.
>   --log-interval        Prefix log line with interval from last message rather
>                         than relative time. Note that this is NOT execution
>                         time if there are parallel operations.
>   --log-no-times        Do not prefix log lines with times. By default, mach
>                         will prefix each output line with the time since
>                         command start.
>   -h, --help            Show this help message.
> 
> Command Arguments:
>   params                Command-line arguments to be passed through to the
>                         program. Not specifying a -profile or -P option will
>                         result in a temporary profile being used.
>   +remote, +r           Do not pass the -no-remote argument by default.
>   +background, +b       Do not pass the -foreground argument by default on Mac
>   +noprofile, +n        Do not pass the -profile argument by default.
> 
> Command Arguments for DMD:
>   +dmd                  Enable DMD. The following arguments have no effect
>                         without this.
>   +sample-below SAMPLE_BELOW
>                         Sample blocks smaller than this. Use 1 for no
>                         sampling. Default is 4093.
>   +max-frames MAX_FRAMES
>                         The max. depth of stack traces. Default and maximum is
>                         24.
>   +show-dump-stats      Show stats when doing dumps.
>   +mode {normal,test,stress}
>                         Mode of operation. Default is normal.

You can imagine adding another group for debugging.
Attachment #8499335 - Flags: review?(gps)
Component: Build Config → mach
I missed a spot.
Attachment #8500225 - Flags: review?(gps)
Attachment #8499335 - Attachment is obsolete: true
Attachment #8499335 - Flags: review?(gps)
Comment on attachment 8500225 [details] [diff] [review]
Allow argument groups in mach commands

Review of attachment 8500225 [details] [diff] [review]:
-----------------------------------------------------------------

Oooo - nice. This will be very handy. It may also make it easier to consolidate down to |mach test|. This is a brilliant hack.

I'm only granting f+ now because there is a bit of context conflict with bug 1076649. Please resubmit for review when it is rebased on top of that bug and verified to still work (I think it should).
Attachment #8500225 - Flags: review?(gps) → feedback+
Blocks: 1074656
Updated version that accounts for the changes in bug 1076649.
Attachment #8501435 - Flags: review?(gps)
Attachment #8500225 - Attachment is obsolete: true
Comment on attachment 8501435 [details] [diff] [review]
Allow argument groups in mach commands

Review of attachment 8501435 [details] [diff] [review]:
-----------------------------------------------------------------

Very nice!
Attachment #8501435 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/c547a8d0f076
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.