-
-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create "glaze" BUILD file generator for Go #15
Comments
@damienmg Issue title needs a small fix :-) Is the intention that Google will adapt and release the internal tool, or will this be an entirely new tool for the open source Bazel? |
oops done. The idea is to adapt the internal tools AFAIU. |
Will the tool allow generating BUILD files for a project with vendored libraries? This is the issue I'm currently coming up against. (See also my mailing list posting.) |
Is there any timeline on when this might happen? I'm new to bazel, but if there are problems with open sourcing the internal tool, I wonder if maybe we could recreate it as open source (the go parsing libraries are pretty good and have lots of examples because of generators now). I even wonder if we could write it as a go generator... What I would find very helpful are some example outputs of glaze so that we know what we're aiming for. For example, I think having the glaze-output for https://github.com/golang/glog would be a nice trivial example, and https://github.com/golang/protobuf would be a good non-trivial example (and both libraries are fairly widely used, I presume also inside google...) |
No, but I'm trying to show some limited version of glaze. I don't think there's a timeline for opensourcing To unblock this situation, I have just started to prototype a limited version of glaze which generates |
We have no timeline for getting glaze open-sourced. This requires open-sourcing our BUILD file parsing library that will come sooner that glaze. Sorry for the delay but as @yugui has explained we have no go rules maintainer for now on the Google side and we need to fix that first. |
@yugui thank you! I would love to help (even if only by testing) on your version of the glaze tool. Is it on github? Based on your examples, I was able to get a bazel build (all the way to docker images!) for one of my simpler projects... I used the vendor approach, as described in https://github.com/bazelbuild/rules_go I am not sure of any disadvantages this would have vs the external approach you seem to favor. One potential advantage is that a go vendoring tool could also create the BUILD files in the vendor directory. It was tedious (looks like we have to create a target for every package & subpackage), but it was largely mechanical, so I am optimistic that we can create a tool for the simpler cases! |
PS and thank you to @damienmg also - knowing that the glaze tool is not imminent is also helpful. Perhaps if we are heading in a totally contrary direction to how glaze works you can repoint us though! |
@damienmg I'm guessing that parser tool you're speaking of is not the one inside of https://github.com/bazelbuild/buildifier/? |
@jmhodges I was thinking of another one but glaze actually use buildifier so it is the good one :) |
Just adding a quick note, we should to also get This is now possible because Google have tentatively open-sourced Grok as Kythe. (More specifically, |
While we're all waiting for glaze, here is a quick and dirty script that automates away most of the tedium of writing BUILD files for a large collection of dependencies. Requires buildifier installed. I was able to get a project with ~300 vendored packages (mostly kubernetes client code) building with bazel with relatively few manual fixups required. YMMV! |
I plan to send some more PRs toward
|
Allow adding strings
See bazelbuild/bazel#758 for more context
The text was updated successfully, but these errors were encountered: