Repository navigation
api: positionals and environment variables in cli.json (part of #13178) - #13433
Merged
Merged
Conversation
- help_surface() lists each command's visible positionals (value name, required, multiple, values, defaults). - help_environment() lists the variables dx --help documents: the DX_ flag defaults and NO_COLOR, BUILD_WORKSPACE_DIRECTORY, BUILD_WORKING_DIRECTORY, from the same table the top help renders. - api/cli.json records both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
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.
Part of #13178.
help_surface()(cli/plan/src/args/pages.rs) now lists each command's visible positionals: value name, whether it is required, whether it takes more than one word, values and defaults.help_environment()lists the variablesdx --helpdocuments. These are theDX_flag defaults plusNO_COLOR,BUILD_WORKSPACE_DIRECTORYandBUILD_WORKING_DIRECTORY, and they come from the same table (help::OTHER_ENV) the top help renders. A test checks that every entry appears in the top help.tools/api/snapshot.rswrites both toapi/cli.json.Tests (local):
bazel test //cli/plan:dx_plan_test //tools/ci:command_docs_testpassed, including the help goldens.tools/dx lint //cli/plan:dx_plan //tools/api:update //tools/api:api_testpassed.//tools/api:api_testfails, and it already fails on main:dx.schema.json changed but its version is still 1; bump the schema version first. dx --affected: intersect with scopes, clear no-git error, --base and [affected] base #13277 changeddx.schema.jsonwithout updatingapi/schemas.txt. Tracked in api: api_test red on main, dx.schema.json changed without a schema version bump #13432. Because of that failure,api/cli.jsonwas generated by runningupdateagainst an emptyapi/dir.No nested-Bazel or consumer tests were run.
Still to do for #13178:
starlark_doc_extractresolves upstream repos. It needsbzl_librarytargets first.api/starlark.json.api/labels.txt.cli.json.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K