vscode-bazel
vscode-bazel copied to clipboard
Build //:target overlay in BUILD fail going out of screen
I have a macro that creates a lot of targets and they end up going outside the screen, see:

To be fair we can probably could make the macro a bit cleaner to not expose as many targets and it is not a big issues I just wonder if anything can be done about this situation.
One possible enhancement that comes to mind would be to detect that there are greater than N targets emitted by the same macro (for some reasonable value N) and presenting a smaller list with a "More..." item that would pop up a quick pick window or a drop-down menu.
That has the side effect of trying to determine which targets are "more important" (the N) and which are "less important" (the hidden ones). The only heuristic I can think of for that is "is there a target whose name is a prefix of all the others", but that's biased by my own experience in rules_apple where I have a macro that creates a target with the same name, and then other targets that are implementation details and are named "${name}_some_suffix". If your macro generates "peer" targets (which is really the more legitimate use for macros than my use case, which is working around Bazel limitations), that heuristic doesn't work.