News for hackers. Stuff that matters.
Re:Bazel Release 1.0 by klodolph on Thursday October 10, 2019 @09:37AM (#21214258)
Yes. My guess is that over a long enough period of time, the internal build system will migrate to Bazel. But I don’t think it will happen soon. Large migrations are always a pain, but Bazel does make it easier (since you can isolate dependencies very well and migrate bottom-up).

I don’t work there, but I have talked to Googlers working on build systems.

Re:Bazel Release 1.0 by evmar on Thursday October 10, 2019 @03:11PM (#21218121)
Bazel is just the open source name of the internal Google build system, it is the same codebase.
Re:Bazel Release 1.0 by klodolph on Friday October 11, 2019 @07:10PM (#21229262)
From what I understand, the two tools have some very significant differences at this point. They may be the same codebase in a broad sense, and may share a lot of code, but I bet they are using something like Copybara to synchronize them.

https://github.com/google/copybara

Re:Bazel Release 1.0 by ses1984 on Thursday October 10, 2019 @10:01AM (#21214587)
I want to try this with a monorepo codebase now but every time I try to get started I feel overwhelmed.

I'm trying to sell my team on it, but none of us has experience with bazel. I'm trying to figure out how to do a small poc where we migrate one intermediate thing in the monorepo to bazel and try to prove out how it can take over everything.

Re:Bazel Release 1.0 by klodolph on Thursday October 10, 2019 @10:45AM (#21215078)
I have personally done this.

- You are going to screw things up a couple times. The documentation for Bazel is not always clear, but you can usually find examples or explanations of complicated stuff on forums somewhere.

- Start with a leaf dependency, something in your codebase that doesn’t depend on anything else. Then work your way up. Just write a WORKSPACE + BUILD.bazel in your root, and then put a BUILD.bazel in the directory for the dependency you are going to work on.

- Look at examples like Tensor Flow, especially for how to handle third-party dependencies (although Tensor Flow is going to do it in a more complicated way).

- Migrate your tests as you go.

- Just run "bazel build //...:all" or "bazel test //...:all" from your project root as you go to make sure things don’t break.

- Undoubtedly it will take a while to develop a good mental model of how Bazel works. For fun, try looking around in the output directories, or look at the sandboxes it creates.

Re:Bazel Release 1.0 by ses1984 on Thursday October 10, 2019 @02:30PM (#21217685)
I appreciate your help and was curious if you could field one more specific question:

What if I wanted to fork tensorflow and integrate my project into it, would I need the tensorflow fork as something like a git submodule in my main repo, or is there a way to tell bazel there's another repo somewhere else and where it fits into the graph?