-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add bazel support for coredns? #3458
Comments
[ Quoting <notifications@github.com> in "[coredns/coredns] Add bazel support..." ]
Open this issue for further discussion, to see if we could start thinking about using bazel.
With gazelle you can just create your WORKSPACE and BUILD.bazel files
automatically from the go.mod With a small `alias` definition you don't even
have to create a mirror of the github code internally.
I don't *really* see why would should carry these files in the repo. Another
reason *not* to do it, is to avoid "insert-favorite-other-build-system"
discussion, this alludes to .
My 2C
|
What problems are we solving by moving to bazel? |
Yes 80+ files is a concern. thanks for the feedback. |
One background is that I see increasing usage of bazel in container and k8s eco. Many projects offers at least an alternative bazel build solution, mostly for organizations that could take advantage of remote caching. |
Let me close this issue for now. Looks like it does not wide enough need yet. |
[ Quoting <notifications@github.com> in "Re: [coredns/coredns] Add bazel sup..." ]
> What problems are we solving by moving to bazel?
One background is that I see increasing usage of bazel in container and k8s eco. Many projects offers at least an alternative bazel build solution, mostly for organizations that could take advantage of remote caching.
note that 'apt-get install bazel' is not a thing yet as it's apparently very
hard to package as well - as long as that doesn't happen and don't see this
growing in the OSS space.
|
This is a discussion about possibly adding bazel support for CoreDNS.
Admittedly, I was not a big fun of bazel in the past for several reasons:
Bazel releases in the past break API compatibility almost every 3-4 weeks.
When working on C++-heavy projects such as tensorflow, were forced to stick with very one version of bazel and there was even no margin of variants for bazel versions.
For example, at one point tf was forced to stick with bazel
0.24.1
alone, for more than a couple of months. Not even0.24.0
or0.25.0
. Otherwise, bazel will throw out a huge error message such that you just want to give up.Bazel tries to cover many languages. However, other than C++, bazel was not truly mature or follow other language's common practices. In one of a
C++
+python
project we stays withpytest
for that specific reason.Bazel is probably the best build tool for C++ (I used scons and gyp long time ago). However, There are still some edge cases in C++ bazel didn't cover.
For example, last time I checked, Bazel's
cc_import
does not support soname like libmylib.so.2 ([feature request] Support cc_import of .so with soname bazelbuild/bazel#7059).But there are also some nice features of bazel:
Bazel's remote cache is very nice for an organization. That is probably the best feature out of bazel if set correctly.
Bazel run everything in a sandboxed environment. That means you really don't need to worry about multiple versions of your compiler. This is especially handy in macOS machines as I don't want to setup those environment variables all over the places for GO_PATH, etc.
Bazel is reaching 1.0 so I assume the API compatibility issue will be in much better shape.
Language support is catching up so it is becoming a viable tool if the project is multiple-language.
Open this issue for further discussion, to see if we could start thinking about using bazel.
The text was updated successfully, but these errors were encountered: