bazel-contrib / vscode-bazel

Bazel support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel
Apache License 2.0
244 stars 79 forks source link

refactor(workspace-tree): Future proof icon path resolution #424

Closed cwahbong closed 2 weeks ago

cwahbong commented 2 weeks ago

Current resource path resolution is using the source file as the base directory, this would fail if we minify the package into single js.

Use extension path as the base directory is more reliable: it is also working for the current packaging, and we just have to make sure the resource layout of the minified package remains the same.

An enum is provided with a test looping through all value and checking the existence of the icon files in extension.

cwahbong commented 2 weeks ago

This fixes the icon issues happened in #421.