vscode-bazel icon indicating copy to clipboard operation
vscode-bazel copied to clipboard

Ability to build the entire repo

Open oliverdain opened this issue 5 years ago • 3 comments

It does not seem to be possible to build //.... If I select Bazel build package recursively I have to select a package and // is not an option. I have tons of packages so it'd be really nice to be able to just build all of them.

oliverdain avatar Jan 23 '20 01:01 oliverdain

To collect the packages we do bazel query '...:*' --output=package. Looking closely, if one is at the root of the repo, the output include a blank line (as that package has no name). So we likely need to make sure we aren't losing that item and then figure out how we want to express it in the treeview and quickpicks.

thomasvl avatar Jan 23 '20 21:01 thomasvl

If the vscode workspace root is a sub package, then the query does pull up the package just fine, so the question really is how do we want to show this when rooted to the bazel workspace also.

For the quickpicks, we could change the UI when picking the package to add the :all or /... on the packages and then the "root" would be //... or //:all depending on the command.

But in the treeview, showing // as the top package feels a little odd and it be correct we'd need to indent all the other packages (and root targets) under it, which also feed odd. Since the treeview does show targets, we could insert a :all at each level (maybe force it to the top sort order wise), but /... isn't really a target so I'm not sure what we'd insert for that. And forcing every package in the tree view to get two extra subnodes feels like we might end up making more scrolling.

Oh, and if the vscode workspace as two folders, the tree view does show something for those roots, so that would provide a place to hang the menu for all the actions…

thomasvl avatar Jan 23 '20 21:01 thomasvl