A Bazel query REPL
Running Bazel queries are great with the command line and hooking into other CLI tools, but creating the queries can be a lot of trial and error. A query REPL would be great for interactively querying the graph and, if possible, reusing variables in complicated query scripts.
Searched through issues, searched Google, came up with nothing. Has this idea been brought up before?
If this is too big to fit here, I'm happy to email [email protected] as well.
This is a reasonable feature to try to build. It seems like something that could be done as a standalone tool externally to Bazel, rather than into the code directly.
Thanks for the reply @aiuto - yeah, I was thinking something like ibazel. What do you think would be the best way to get a prototype going?
I guess to build it in your own github repository. Develop it until you
think it is worth sharing. Then advertise it on bazel-discuss. If it gets
traction, we can consider moving to the bazelbuild organization. But that
is not a prerequisite to having a useful and recommended tool.
On Fri, May 22, 2020 at 9:53 AM Austin Cawley-Edwards <
[email protected]> wrote:
Thanks for the reply @aiuto https://github.com/aiuto - yeah, I was
thinking something like ibazel
https://github.com/bazelbuild/bazel-watcher. What do you think would be
the best way to get a prototype going?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/bazelbuild/bazel/issues/11463#issuecomment-632701394,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXHHHCYCVULAF5D2JY7AADRSZ7U5ANCNFSM4NHHTBGA
.
cc as fyi, @jin @alandonovan
I agree there is no benefit to adding this to Blaze itself and it is best done as an external wrapper.
If you're working in Go (which is the right tool for the job) then you should use the "github.com/chzyer/readline" package. Feel free to borrow from the Go Starlark REPL.
https://github.com/google/starlark-go/blob/cd131d1ce9d424fe23fac85e99953ad099021287/repl/repl.go#L37
Most helpful comment
I agree there is no benefit to adding this to Blaze itself and it is best done as an external wrapper.
If you're working in Go (which is the right tool for the job) then you should use the "github.com/chzyer/readline" package. Feel free to borrow from the Go Starlark REPL.
https://github.com/google/starlark-go/blob/cd131d1ce9d424fe23fac85e99953ad099021287/repl/repl.go#L37