Closed beingminimal closed 2 years ago
No. We will not allow Bazel to run user code in its own address space implemented in any other programming language than Starlark.
Starlark has a number of properties other languages don't guarantee (lack of Turing completeness, built-in sandboxing, caching modules separately from each other, accounting of execution time and soon RAM use) and which Bazel requires.
In addition, it would increase the API surface of Bazel by quite a bit; this would result in both an unacceptably high maintenance burden and user support load, in addition to creating unnecessary and useless choices. I'd much rather there be one "well lit path" than multiple choices without a clear answer as to which choice to take when.
Please do not reopen this bug; this decision will not be re-considered.
Hi codecycleteam, I wanted to thank you for using Bazel and suggesting features for it. While lberki's technical direction is the direction we are going on this request, I wanted to reach out to you to let you know that some thought was given to your request, but that it was decided to not pursue it. We hope that you will continue to make suggestions for Bazel in the future. Thanks much, Joe
@hicksjoseph @lberki Thanks a lot for responding to this issue. I appreciate @hicksjoseph's supportive response.
It's my humble request to consider following content as feedback to increase the impact of this open source project only. Nothing personal with anyone.
We hope bazel's contributors and such a helpful community will support this initiative for existing and new coming developers to make developers life easy.
Awaiting a positive response. Thanks a lot everyone.
Whereas you are correct that I am just a single person, I do consider myself knowledgeable enough to state with confidence that implementing what you demand would be a large net negative for Bazel and its community for the reasons stated in my comment above.
It might be possible that the benefits are commensurate in the sense that it might be possible that I get hit by a meteorite while sitting here before the end of the day. Given that I have not heard significant demand for configuring Bazel in any language other than Starlark (in fact, I don't remember any instance other than this thread), I highly doubt so and given the high cost, the technical complexity and the dubious benefits, I don't think it's worthwhile to spend our time on validating this. We have all sorts of ideas all the time, we must choose which ones to pursue!
If you feel strongly about this, feel free to reach out to bazel-discuss@googlegroups.com and start a thread; however, given the difficulty of integrating probably any language other than Starlark into Bazel the burden of proof is very high.
Why are you asking us to do this at this point in time? I appreciate your interest in the well-being and success of Bazel. Maybe if I had some more background, I could suggest an approach that benefits both you and Bazel more than the one you suggested?
@lberki Thanks a lot for the reply. Here is what i think about this.
Whereas you are correct that I am just a single person, I do consider myself knowledgeable enough to state with confidence that implementing what you demand would be a large net negative for Bazel and its community for the reasons stated in my comment above.
I agree and am happy that someone knowledgeable enough is replying. I agree you are saying it will be a burden for the bazel community but let's first validate it enough that in the future is it really going to be helpful or not? Obviously we are not going to build and ship over the night. So, i think it will be helpful to validate efforts vs impact first and then decide. Here are a few things we can do to validate this
It might be possible that the benefits are commensurate in the sense that it might be possible that I get hit by a meteorite while sitting here before the end of the day. Given that I have not heard significant demand for configuring Bazel in any language other than Starlark (in fact, I don't remember any instance other than this thread), I highly doubt so and given the high cost, the technical complexity and the dubious benefits, I don't think it's worthwhile to spend our time on validating this. We have all sorts of ideas all the time, we must choose which ones to pursue!
I agree we have all sorts of ideas all the time but we should build only impactful things, but the point is let's validate it enough and let it be decided by the community.
Even projects like terraform and kubernetes have also implemented such features then there should be something impactful for developers then only they may have taken such decisions. Check the following links. https://kubernetes.io/docs/reference/using-api/client-libraries/ https://aws.amazon.com/blogs/containers/introducing-cdk-for-kubernetes/ https://www.cncf.io/projects/cdk-for-kubernetes-cdk8s/ https://www.npmjs.com/package/cdk8s (Check weekly downloads here) https://www.cncf.io/online-programs/end-yaml-engineering-with-cdk8s/ https://github.com/hashicorp/terraform-cdk https://www.terraform.io/cdktf
See cdk8s npm module weekly download here.
Only by assuming things we should not validate the need of such features for existing and future developers. And bazel is such a powerful tool which can save a ton of time for developers if we can remove all friction for adoption.
Awareness and 0% friction in adoption of bazel can really create significant impact for developers. Think once and please join the community in this validation and game changing feature for the community.
I hope you will support us in this initiative. Awaiting your response. Thanks a lot for everything.
@codecycleteam Bazel's eng lead from Google here. I fully support lberki's points who is the overall Tech Lead on our end both for Bazel and our internal build system, so he does speak indeed with some authority. His single person's voice is representing ~10 years of Bazel and Blaze development. Which does not mean that I agree to everything he'd say :), but I hope it provides some context.
Starlark has been designed for Bazel's use case and it's part of the core design. You are in fact not suggesting a feature only but a massive design change of Bazel.
All that being said, everything can be discussed openly, there are multiple channels such as bazel-discuss, this issue or even Slack.
What I suggest you to do though is to discuss it via a design review. As you are suggesting a design change, I'd expect you to not only identify potential value of the proposal, but also addressing design differences (to Starlark's scope, for example, but also to Bazel's overall design principles like hermeticity).
I'd advice not to base your proposal upon a comparison with Terraform or Kubernetes. Bazel is a build system and has been designed for this use case and your proposal needs to match Bazel's (design) goals, not others' design goals. I have some trouble following your reasoning there.
@lberki @sventiffe haha alright guys. I got the whole picture now. but in the future if you guys are considering redesigning bazel architecture and design then please consider such features first.
I appreciate your support and humbleness for this conversation. Thanks a lot for everything.
If anyone is looking for a similar approach OR solution then here is the open sourced project wireit by google. Please have a look. Thanks.
Description of the feature request:
Bazel Development Kit will allow developers to use familiar programming languages to write bazel code. This gives you access to the entire bazel ecosystem without learning StarLark and lets you leverage the power of your existing toolchain for testing, dependency management, etc.
First support typescript for this but eventually we can give support for other languages like Python, Java, C#, and Go etc.
What underlying problem are you trying to solve with this feature?
Currently not all developers are familiar with bazel and starlark language. And bazel is such a powerful tool which can save tons of time in building and shipping softwares, But most of the developers are familiar with other commonly used languages like TypeScript, Python, Java, C#, and Go. So if we can support this feature for bazel then adoption of bazel can be skyrocketed and millions of money can be saved which are currently being wasted in CI-CD pipelines.
@janakdr @ulfjack @lberki @katre @cushon @laszlocsomor @laurentlb @damienmg @aehlig @c-parsons Consider this as a most important DX improvement and give some priority to it. Please make sure this feature request will not be vanished like other issues created in open source projects as usual. This is a really needed feature for all of us. Thank You Everyone.
This concept is inspired by Terraform CDK see here. https://github.com/hashicorp/terraform-cdk https://www.terraform.io/cdktf