-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add bazel.info.* commands #291
Merged
Merged
Conversation
This file contains 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
coeuvre
approved these changes
Dec 14, 2022
vogelsgesang
added a commit
to vogelsgesang/vscode-bazel
that referenced
this pull request
Feb 27, 2024
The commands `bazel.info.*` and `bazel.getOutputPath` are intended to be used by the command variables within `launch.json` and `task.json`. For additional context, see bazel-contrib#273, bazel-contrib#275 and bazel-contrib#291. Those commands are not intended to be called by users directly. As such, they should not show up in the command picker. This commit removes them from the `commands` contribution point, thereby hiding them from the command picker.
vogelsgesang
added a commit
to vogelsgesang/vscode-bazel
that referenced
this pull request
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 bazel-contrib#273, bazel-contrib#275 and bazel-contrib#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
pushed a commit
that referenced
this pull request
Feb 28, 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.
vogelsgesang
added a commit
to vogelsgesang/vscode-bazel
that referenced
this pull request
Feb 29, 2024
Not sure why this wasn't added initially in bazel-contrib#291. Maybe the assumption was that the workspace root is already available through VS Code's `${workspaceFolder}`. However, that represents the place where VS Code was opened. The Bazel workspace folder might be further up in the directory tree.
vogelsgesang
added a commit
to vogelsgesang/vscode-bazel
that referenced
this pull request
Feb 29, 2024
Not sure why this wasn't added initially in bazel-contrib#291. Maybe the assumption was that the workspace root is already available through VS Code's `${workspaceFolder}`. However, that represents the place where VS Code was opened. The Bazel workspace folder might be further up in the directory tree.
cameron-martin
pushed a commit
that referenced
this pull request
Feb 29, 2024
Not sure why this wasn't added initially in #291. Maybe the assumption was that the workspace root is already available through VS Code's `${workspaceFolder}`. However, that represents the place where VS Code was opened. The Bazel workspace folder might be further up in the directory tree.
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.
I proposed these originally in #273 as an initial idea for what became #275. But I have encountered another use case that makes me think they are generally useful:
When debugging on macOS, lldb needs to be configured with the command
platform settings -w $execution_root
, where$execution_root
is what's returned bybazel info execution_root
. Withbazel.info.*
commands, you can create a launch configuration that contains: