Closed
Bug 614130
Opened 14 years ago
Closed 14 years ago
distinguish between supported/experimental/internal commands/options and tool/command options
Categories
(Add-on SDK Graveyard :: Documentation, defect)
Add-on SDK Graveyard
Documentation
Tracking
(Not tracked)
RESOLVED
FIXED
1.0b1
People
(Reporter: myk, Assigned: adw)
References
Details
Attachments
(2 files, 1 obsolete file)
The cfx --help output should distinguish between supported, experimental, and internal commands and options, noting that the experimental and internal commands/options might be changed or removed in the future. It should also distinguish between options for the cfx tool itself (or all commands generally) and those for individual commands (or subsets thereof), with the former being specifiable only before the command argument, and the latter being specifiable only after it. (Note: actually enforcing those requirements is non-trivial, but for the purposes of shipping a beta, it is only necessary to make the documentation differentiate between the kinds of options and specify which kind must go where, since the implementation is more lenient than the proposed documentation, and thus we can update the implementation to match the documentation at a later date without breaking documentation-based expectations.) Finally, it should identify the command argument as a required argument to the tool (currently it identifies it as optional). Internal Commands and Options: commands: sdocs, test* (but not "test") options: --e10s, --keydir, --addons, --test-runner-pkg Experimental Commands and Options: commands: develop options: --use-server cfx Tool and General Options: -h, --help -v, --verbose Command-specific Options: Supported Commands: docs init test -g, --use-config -a, --app -b, --binary -p, --profiledir --dependencies -f, --filter --times Internal Options: --addons --keydir --test-runner-pkg --e10s run -g, --use-config --static-args --pkgdir --extra-packages --templatedir -a, --app -b, --binary -p, --profiledir Internal Options: --addons --keydir --e10s xpi -g, --use-config --static-args --pkgdir --extra-packages --templatedir --update-url --update-link Internal Options: --keydir Experimental Commands: develop Internal Commands: sdocs testcfx testex -g, --use-config -a, --app -b, --binary -p, --profiledir --dependencies -f, --filter --times --use-server --addons --keydir --test-runner-pkg testpkgs -g, --use-config -a, --app -b, --binary -p, --profiledir --dependencies -f, --filter --times --use-server --addons --keydir --test-runner-pkg testall -g, --use-config -a, --app -b, --binary -p, --profiledir --dependencies -f, --filter --times --use-server --addons --keydir --test-runner-pkg
Reporter | ||
Comment 1•14 years ago
|
||
These changes also have implications for the cfx Tool reference <https://jetpack.mozillalabs.com/sdk/0.9/docs/#guide/cfx-tool>.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → adw
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•14 years ago
|
||
I wanted to output options per command like in comment 0, but it seems optparse can't easily list options more than once. So this lists commands per option instead. Each option keeps a list of the commands it supports, which is used to automatically generate the list. In the future this would also allow `cfx --help run` to list all the options that run supports, for example. This patch also organizes options using lists so that they can be sorted and displayed alphabetically by name. I'll attach the output of cfx with this patch so it's easy to look over.
Attachment #493201 -
Flags: review?(avarma)
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #493202 -
Flags: feedback?(myk)
Reporter | ||
Comment 4•14 years ago
|
||
Comment on attachment 493202 [details]
cfx output with patch applied
Ah, well, this also looks pretty good.
Attachment #493202 -
Flags: feedback?(myk) → feedback+
Comment 5•14 years ago
|
||
Comment on attachment 493201 [details] [diff] [review] patch This patch seems to have bit-rot already, do you think you can rebase it against the current trunk?
Attachment #493201 -
Flags: review?(avarma) → review-
Comment 6•14 years ago
|
||
Also, Drew, it looks like, as per my comment in bug 614128 comment 7, the --logfile and --profile-memory options will now be under the "Internal Commands and Options" classification, rather than being removed from the SDK entirely.
Comment 7•14 years ago
|
||
One semi-quick way of resolving this is to actually just have cfx --help display the raw contents of static-files/md/dev-guide/cfx-tool.md. That may be weird but at least it would get rid of the schism that currently exists between having to duplicate the docs on the Markdown and in the tool itself. Perhaps I am just being a butt, however.
Assignee | ||
Comment 8•14 years ago
|
||
I kind of like that idea since it prevents duplication. But it does seem like cfx-tool.md will always be a superset of cfx --help, i.e., cfx-tool.md will contain pretty much the same text as cfx --help will, but it might also describe cfx using prose, examples, etc. -- things that aren't really appropriate at the command line. Maybe instead we could add an item to the release checklist about capturing the output of cfx --help and just copying and pasting it into cfx-tool.md? Anyhow, I'll work on getting this patch up to date today for the beta.
Comment 9•14 years ago
|
||
Aye, true. Though one thing I've noticed about some command-line tools' help systems, e.g. "git help merge", is that they basically just show a man page, which contains all kinds of prose and examples. I wonder, if we split up the .md file with certain invisible delimiters like the HTML-style comments and formatted them appropriately, we might be able to do something similar, such that 'cfx help' just shows a list of commands and global flags, and doing 'cfx help init' shows the particular section of the Markdown file that explains cfx init. Maybe that is going way too far/complicated though.
Assignee | ||
Comment 10•14 years ago
|
||
Yeah, I would love for `cfx help` to work like that. That's a byproduct I had in mind by associating a list of supported commands with each option. But a full man page for each command and cfx itself would be great.
Attachment #493201 -
Attachment is obsolete: true
Attachment #494022 -
Flags: review?(avarma)
Comment 11•14 years ago
|
||
Comment on attachment 494022 [details] [diff] [review] patch 2 Cool! I've addressed some minor issues re: what options are compatible with what commands here: https://github.com/toolness/jetpack-sdk/commit/9f03c9a596c208d4427b3c312d21f60085e94116 They're all basically nits, though, so feel free to push or fix the nits and push.
Attachment #494022 -
Flags: review?(avarma) → review+
Assignee | ||
Comment 12•14 years ago
|
||
Thanks, I fixed all the nits. https://github.com/mozilla/addon-sdk/commit/d250c3a81458b7a72e208ab52044bcb10243e7c7 https://github.com/mozilla/addon-sdk/commit/6b91af1d0bd1437b8aad3e7ae29d3eda311e5bde https://github.com/mozilla/addon-sdk/commit/84868722f4c2ad3f3a87ca59b6620ca74782336d https://github.com/mozilla/addon-sdk/commit/4d29ad7ddf2d7eeb2708ff4a6e9d0f1504bfd74f
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: -- → 0.10
Reporter | ||
Updated•13 years ago
|
Target Milestone: 0.10 → 1.0b1
You need to log in
before you can comment on or make changes to this bug.
Description
•