Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide commands intended as command variables #347

Merged

Conversation

vogelsgesang
Copy link
Collaborator

@vogelsgesang vogelsgesang commented Feb 27, 2024

The commands bazel.info.* and bazel.getOutputPath are intended to be used as command variables within launch.json and task.json. For additional context, see #273, #275 and #291.

Those commands are not intended to be called by users directly. As such, they should not show up in the command palette. Calling them from the command picker has no user-visible effect and leaves the user with the impression that those commands would be broken.

This commit removes them from the commands contribution point, thereby hiding them from the command picker. To make sure that the extension is loaded as soon as some task.json/launch.json invokes any of those commands, they now need to be registered as activationEvents, since VS Code will no longer discover those events automatically from the commands contributions.

BEGIN_COMMIT_OVERRIDE
fix: Hide commands which are intended to be command variables (#347)
END_COMMIT_OVERRIDE

The commands `bazel.info.*` and `bazel.getOutputPath` are intended to be
used as command variables within `launch.json` and `task.json`. For
additional context, see  bazelbuild#273, bazelbuild#275 and bazelbuild#291.

Those commands are not intended to be called by users directly. As such,
they should not show up in the command palette. Calling them from the
command picker has no user-visible effect and leaves the user with the
impression that those commands would be broken.

This commit removes them from the `commands` contribution point, thereby
hiding them from the command picker. To make sure that the extension is
loaded as soon as some `task.json`/`launch.json` invokes any of those
commands, they now need to be registered as `activationEvents`, since VS
Code will no longer discover those events automatically from the
`commands` contributions.
@cameron-martin cameron-martin merged commit 6d3e988 into bazelbuild:master Feb 28, 2024
4 checks passed
@vogelsgesang vogelsgesang deleted the avogelsgesang-hide-command-vars branch March 26, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants