Open thoughtpolice opened 1 year ago
Completely agreed! I would imagine you want to race parsing the Starlark file for name = ...
entries and actually run the Starlark code in the equivalent of buck2 targets
, and if after 0.5s you don't have the real stuff, you use the Starlark file data. We've had this as an internal request for some time, often being a "nice to have", but never becoming a "we'll do it now". Volunteers most welcome.
For what it's worth, I think this might be blocked on https://github.com/clap-rs/clap/issues/1232.
It looks like as of 3 weeks ago clap might support this now. I could try to put something together?
It would be awesome if
buck2
could, on the command line, auto-complete the name of a target given a target pattern prefix such aspath/to/module:
(completing any target in theBUCK
file) orpath/to/library:foo
(anything with a name prefix offoo
). I often find myself wanting this.I am not sure how much "work" is necessary to resolve all the names in 100% of cases, but it seems like a in theory
BUCK
files can be parsed for their target outputs without actually constructing the action graph, right? If you can just iterate everyname
field on every rule in the file, that's probably a good start.