Export CLI reference as JSON - #3
Open
Silic0nS0ldier wants to merge 6 commits into
Open
Conversation
Silic0nS0ldier
changed the base branch from
master
to
jordan-mele_bzlmod_handle-override-not-existing
May 27, 2023 11:42
Silic0nS0ldier
changed the base branch from
jordan-mele_bzlmod_handle-override-not-existing
to
master
May 27, 2023 11:42
|
Thank you for contributing to the Bazel repository! This pull request has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this PR is still relevant and should stay open, please post any comment here and the PR will no longer be marked as stale. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal of this prototype is to create a better CLI reference. With this extractor prototype completed, work on the UI/UX can now begin.
Some notes on the data.
configurationin theirassociatedScopesproperty. Commands which inherit this will haveusesConfigurationOptions = true.buildbeing the best known example.coverageandcqueryare outliers, inheriting fromtest.associatedScopesindicates what a command belongs to ((command)|startup|common|configuration). Inheritance logic should be applied to this field to determine definitively if an option belongs to a command.Sample output.
{ "options": [ [ "bazelrc", { "associatedScopes": [ "startup" ], "helpText": "The location of the user .bazelrc file containing default values of Bazel options. /dev/null indicates that all further `--bazelrc`s will be ignored, which is useful to disable the search for a user rc file, e.g. in release builds.\nThis option can also be specified multiple times.\nE.g. with `--bazelrc=x.rc --bazelrc=y.rc --bazelrc=/dev/null --bazelrc=z.rc`,\n 1) x.rc and y.rc are read.\n 2) z.rc is ignored due to the prior /dev/null.\nIf unspecified, Bazel uses the first .bazelrc file it finds in the following two locations: the workspace directory, then the user's home directory.\nNote: command line options will always supersede any option in bazelrc.", "abbreviation": null, "allowsMultiple": false, "hasNegativeOption": false, "isExpansionOption": false, "deprecationWarning": "", "oldName": "", "warnOldName": true, "documenationCategory": "bazel_client_options", "valueHelp": "<path>", "optionExpansions": [], "implicitRequirements": [], "optionEffectTags": [ "changes_inputs" ], "optionMetadataTags": [] } ], ... }, "commands": { "analyze-profile": { "shortDescription": "Analyzes build profile data.", "isHidden": false, "triggersBuild": false, "mustRunInWorkspace": false, "completion": "path", "usesConfigurationOptions": false, "inherits": [] }, ... }, "optionEffectTags": { "unknown": { "description": "This option has unknown, or undocumented, effect." }, ... }, "optionMetadataTags": { "experimental": { "description": "This option triggers an experimental feature with no guarantees of functionality.", "hidden": false, "internal": false }, ... } }