vscode-bazel
vscode-bazel copied to clipboard
Add node_modules/@bazel/buildifier to search locations
Frontend developers typically won't install Buildifier on their system path. Instead it will be fetched along with their other toolchain dependencies by a package manager like npm
or yarn
Opening a frontend project in VSCode results in a warning from the bazel plugin because buildifier isn't on the $PATH
It would be nice to look in $workspace/node_modules/@bazel/buildifier-${platform}
to find the binary. Or, it could execute $workspace/node_modules/@bazel/buildifier/buildifier.js
which has a shebang line to execute in nodejs and will spawn the platform-specific binary.
Right now I think the code just checks that it is on your path. Odds are it shouldn't assume node as the extension is wrapping bazel, so any programming language could be what developers are using.
It might make the handling somewhat like the handling for bazel
and allow a setting so it can be overridden, etc. If there are some common conventions past just $PATH
, having both binaries checks in those ways is likely a good idea.