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

feat(workspace-tree): Workspace tree can show external local repository #422

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cwahbong
Copy link
Contributor

@cwahbong cwahbong commented Oct 22, 2024

Besides the existing internal packages, handles handles external local repository: the packages in pattern @repo//package/path:target.

For building the tree structure:

  • We made the WorkspaceTreeProvider able to process only the following two patterns, then normalize the patterns queried in IBazelQuerier:
    1. //internal/package/path
    2. @external//package/path
  • The algorithm for building and grouping the queried packages are mostly remained.
  • Simple test cases also added for package path handling, with corresponding refactors and clean ups.

UI:

  • Expand the symlink for local repository target in BazelTargetTreeItem.getCommand(), so that clicking the targets in external local repository would jump into the source tree instead of Bazel cache path.

Misc:

  • Also fixes some floating promises in edited files by explicitly marking them void for not waiting command/message, or properly grouping them into a promise for await.

Works towards #416.

Separate and abstract the tree view specific bazel queries in prepare
for adding test cases.

Also pull out the configuration getter since I found it simpler to
use (auto complete and check by tsc, and maybe customizing the defaults
based on more complicated logic).
Besides the existing internal packages, handles handles external local
repository: the packages in pattern `@repo//package/path:target`.

We made the WorkspaceTreeProvider able to process only the following two patterns:
* `//internal/package/path`
* `@external//package/path`
And normalize the patterns queried in IBazelQuerier.

Simple test cases also added for package path handling.
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.

1 participant