#Bazel
For any Rubyists are using bazel: I'd love to hear what you're using it for! I want to know more!
Context: official ruby rules were recently published at https://github.com/bazel-contrib/rules_ruby
Cool #Bazel E2E CLI testing ruleset.
https://blogsystem5.substack.com/p/end-to-end-tool-testing-with-bazel
One of the things Iโve struggled with when learning #MLIR is how to compose all the different lowerings into a pipeline that ends in the result I want, especially when other people wrote those pipelines. When starting from a high level dialect like #linalg (linear algebra), there can be dozens of lowerings involved, and some of them can reintroduce ops from dialects you thought you completely lowered already, or have complex pre-conditions or relationships to other lowerings. There are also simply too many lowerings to easily scan.
There are two ways to specify a lowering from the MLIR binary. One is completely on the command line. You can use the --pass-pipeline flag with a tiny DSL, like this
How do you find the bug in a lowering? Apparently there are some folks doing this via formal verification, formalizing the dialects and the lowerings in #lean to prove correctness
#bazel #llvm
https://jeremykun.com/2023/11/01/mlir-lowering-through-llvm/
Who has a good strategy for building and testing with Github Actions in a #monorepo.
Currently using #makefile in each project. Not looking foward to a bunch of GHA workflows for every project and wondering if there is a better way.
Tried #earthly but didn't seem to make things easier.
Sorta also dragging my feet on #Bazel, but still may go that way.
How #RabbitMQ build times decreased from 3 hours to 20 minutes thanks to #Bazel https://youtu.be/IXimf4DCAoY?t=22639
Ricardo Wurmus managed to write a #Guix package for #Bazel, although it still uses some of the bundled .jar files (pre-built opaque binaries):
https://hpc.guix.info/package/bazel
Itโs quite an achievement given the breadth and complexity of Bazel.
Even trickier is packaging software such as JAX that uses Bazel as its build system:
https://hpc.guix.info/package/python-jaxlib
๐๐น๐ฐ๐ฎ๐ฟ๐ฎ๐ ๐บ๐ฒ๐น๐ฑ๐ ๐๐ถ๐ฐ๐ต ๐บ๐ฒ๐ ๐ฏ๐น๐ฒ๐๐๐๐ฟ๐ฒ ๐ฎ๐ณ ๐๐ผ๐ผ๐ฟ ๐๐ผ๐ฒ๐ฟ๐ป๐ผ๐ผ๐ถ ๐ถ๐ป ๐๐ฎ๐๐ฒ๐น
Carlos Alcaraz doet komende week niet mee aan het ATP-toernooi van Bazel. De Spaanse tennisser meldde zich woensdag met een blessure af bij de organisatie.
TIL about Subresource Integrity (SRI), a standardized string format on specifying a cryptographic hash, not too dissimilar to what #Bazel already does with ubiquitous sha256, but more generalized.
> An `integrity` value begins with at least one string, with each string including a prefix indicating a particular hash algorithm (currently the allowed prefixes are `sha256`, `sha384`, and `sha512`), followed by a dash, and ending with the actual base64-encoded hash.
https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
SemanticDB support, which was originally implemented by @olafurpg nearly two years ago landed a few days ago on rules_scala (#Scala plugin for #Bazel) thanks to four co-authors Matt Peterson, @aish, Dmitry Komanov, and 'crt-31' pushing this effort through
https://github.com/bazelbuild/rules_scala/pull/1508
Great post on #ClosureCompiler, it's history at #Google and how it evolved compared to #TypeScript.
https://effectivetypescript.com/2023/09/27/closure-compiler/
I can help with one of the last points:
> True to form, this tool [tsickle] is open source but pretty inscrutable to an outsider. It may be used by Angular but I couldn't tell.
I can confirm that Angular does *not* run `tsickle` or Closure in user projects with `ng build`. There was an experiment some years ago where we tried this to see if we could improve bundle sizes, but found that asking users to write Closure-optimizable code was too difficult and hard to justify outside Google. As a result, we never ran this in prod.
I believe we do technically run `tsickle` in Angular GitHub repositories, as we have a unique build system setup with #Bazel and #rules_nodejs. If you've ever contributed to Angular, you probably ran `tsickle`. We've been trying to remove this dependency, but I don't think it's happened yet.
Is it just me, or does #bazel alone suffice to disprove the #DontDoEvil claim?
Xcode 15 is finally here! It's been a joy to use these last few months.
I should mention that #rules_xcodeproj has worked with it since the first beta (though we made some fixes as more releases came out), so be sure to upgrade to 1.10.1 (https://github.com/MobileNativeFoundation/rules_xcodeproj/releases/tag/1.10.1) if you haven't already.
Are there any good #web conferences / meetups with an #RFP open in the #BayArea or virtual?
There are a few projects I've been working on which I'd love to give talks about and share with the community (not Angular related). Could be talking about any/all of:
1. #HydroActive - A different take on hydration in an HTML-first world. https://github.com/dgp1130/HydroActive/
2. #rules_prerender - A #Bazel ruleset serving as a fast and scalable #StaticSiteGenerator. https://github.com/dgp1130/rules_prerender/
3. #HTMLFragments - A no-tooling, web standard-based approach to HTML over the wire. https://blog.dwac.dev/posts/html-fragments/
Greatly appreciate boosts for reach!
fundamentals of build: You want one of 3 things:
1. artifact (binary) for your target or
2. Perfect runnable instructions for building artifact (bin) for your target or
3. Runnable instructions for building artifact on a variety of targets that you have tested on your target.
This allows for `1 || 2 || 3`. Good #buildtools take this into account. #Nix, #bazel, even good ol' #GNUMake. But, then we don't use that functionality; we forget about it in our scripts & they fail, missing a bin they coulda built or they fail, building a bin they coulda stolen. Note that this post puts off worrying about dependencies, because 1, 2 & 3 can worry about those, too, if you do it right.
@raiderrobert I learned more than I ever wanted to know about how you can build #Python wheels using #Bazel
...the elusive `ENAMETOOLONG` error code made multiple appearances ๐คฆ

Little #Git / #Bazel trick for you. When you have a branch will multiple commits and want to make sure none of them introduce any test breakages, run:
$ git rebase main --exec "bazel test //..."
This will checkout every commit since `main` and run `bazel test //...`, stopping if any tests fail.
You can do this with any test command, but what's awesome about Bazel is that the build cache is still valid between commits. Anything which didn't change will be cached.
This means you can easily run *all* tests for *every* commit on a branch with dozens of commits in only a few seconds. The cacheability is *amazing* here. It's an excellent way to verify a every step of a large change.
did some #Rust coding today (autogenerating #Bazel build files from Protobuf)
because I am a Rust newbie, copy-pasting is easy, but seemingly-rudimentary refactoring is so challenging (because of the ownership), I kind of have to choose my own battle to not burn hours. I did manage to write an async lambda in one of the battles, which feels like an achievement unlocked
https://github.com/bazeltools/bzl-gen-build/pull/13
Hey kids wanna see something cursed #bazel #python https://gist.github.com/arrdem/05d32cc8870e87f1d6fa07df31586d19
@ianthetechie God speed. Not sure if it is an option, but have you given #Bazel a try? https://github.com/bazelbuild/rules_apple/blob/master/doc/tutorials/ios-app.md
wrote 'automate refactoring with Bazel + Scalafix'
https://eed3si9n.com/automate-refactoring-with-bazel-and-scalafix/ #Scala #Bazel

I stopped feeling bad about #autotools files (configure.ac Makefile.am m4/*) when I realized how much noise a new maven package throws on your disk.
The main difference is: for #maven / #npm / #cargo / #gradle / #bazel / ... these are autogenerated.
Thatโs why I started #conf: https://hg.sr.ht/~arnebab/conf โ auto-generation for autotools projects with `conf new --lang <language>`.
It needs more templates โฆ contributions welcome!
(just send me a patch or a link to pull from)
#gnu #make #freesoftware
My #softwareengineering discovery of the year has been without a doubt the #bazel build system.
Once you get used to the extremely fast incremental builds, shared cache, extensibility etc. there is no going back. I really recommend it, at least for #cpp
@mathias whatโs the alternative? @ASFMavenProject? #Bazel? They all have their individual drawbacks. I mean, yes Iโm totally biased, but I donโt see an alternative to @Gradle for building JVM projects that offers the same flexibility and performance.
Even after all this time I'm still not a fan of #gradle. I use it because that's where the support is for #android development, but, on a purely build bases, #bazel and #buck are, in my experience, more robust build tools.
Today's "Nope, still don't like it" trigger was having a gradle build fail with "Gradle build daemon disappeared unexpectedly..." when the build has been specified as to not use a daemon. That's either poor parameter naming, or documented parameters being ignored.
This is the best introduction to #Bazel that I have found. This ~30 minute talk covers writing your own macros and rules, using LaTeX compilation as an example. Maybe Bazel is deemed difficult enough as it is, but many resources, even books on Bazel, do not cover this. https://media.ccc.de/v/froscon2017-1946-bazel
Iโm currently trying to package several of our static library into dynamic framework using ios_framework rule in #Bazel but thereโs an intermittent failure on bundling steps.
It says I copied the same framework twice.
@thePunderWoman That's a #Bazel thing, and not really a common term. I think many Nooglers get just as confused regardless of background.
Even the internal Bazel docs concede that it's a misnomer. It's just called that to algin with `go_binary`, `java_binary`, etc.
wish the #bazel rules_python upstream would notice my PR one way or another but hey. corporate OSS project not the community projects I'm used to. either way about to get shmoovin
Really donโt love how common it is for #bazel packaging to pin a version of the thing itโs packaging. New bazel means new packaging means new packaged library version. Too much coupling!
So here's my #bazel review. Good theoretical model. When it works it may as well be alien technology. But it's horrendously underdocumented and obviously not designed for consumption by people who haven't already learned on Blaze. And the OSS rules are pretty low quality. And half the stuff you need to make it work - cache management, bad action purging, analysis cache persistence, ... happens to not be OSS.
I started writing a toot-storm, but I realized a blog post was a better medium for it. Enjoy: https://www.buildbuddy.io/blog/multiple-xcode-configurations-with-rules_xcodeproj-1-3
Is it currently not possible to implement on-demand resources in #Bazel? Have been searching on internet as well as in rules_apple and swift but found little information about this.
Shout out to `bazel query --output graph` and https://dreampuf.github.io/ for visualizing it. Debugged some tricky dependency graphs today and I'm not sure I could have done it without those tools.
in the first draft I couldn't figure out how to cross build using MODULE.bazel, but eventually I figured it out, so I updated the post yesterday. also made a PR to show that it actually works on GitHub Actions.
https://eed3si9n.com/cross-build-anything-with-bazel/#modifying-the-3rdparty-resolution-modulebazel
https://github.com/eed3si9n/gigahorse/pull/85 #Bazel
wrote a blog post 'cross build anything with Bazel'
this technique is not limited to JVM, I figured #Scala cross building is a representative example, so I used it as an example on how it can be done using the local_repository technique
https://eed3si9n.com/cross-build-anything-with-bazel/ #Bazel
it happens so that in different orgs that I work for, the first things I tackle is the library dependency issue.
this week @ianoc showed me a neat trick of using --override_repository
to switch out a local repository in #Bazel. I've heard this technique described in the past but didn't realize how powerful it was atm.
https://bazel.build/reference/command-line-reference#flag--override_repository
Need a #productivity boost? Next week we got new workshops and trainings to help you become a productivity machine! #Java #Gradle #Maven #Bazel #Android
2/14 - Gradle Build #Cache Deep Dive: https://gradle.com/training/gradle-build-cache-deep-dive-3/?time=1676332800
2/15 - Gradle Build Cache Deep Dive - EMEA: https://gradle.com/training/gradle-build-cache-deep-dive-emea/?time=1676419200
2/16 - Intro to #DPE Workshop: https://gradle.com/training/intro-to-dpe-workshop-2/?time=1676505600https://www.facebook.com/photo.php?fbid=644077451052547&set=a.528530279273932&type=3
After a lot of work, I've finally landed a release of #Bazel #rules_prerender which is compatible with #aspect_rules_js! https://github.com/dgp1130/rules_prerender/releases/tag/releases%2F0.0.17
This has been a long time coming, and the issue shows how big a change this was (https://github.com/dgp1130/rules_prerender/issues/48). It didn't help that I kept getting distracted with other things and forgot everything I was doing. ๐
#aspect_rules_js does seem like a solid improvement and it sets up #rules_prerender for a lot of awesome improvements in the future (#ESM, #bzlmod, better bundling, etc.) Super excited about where we can take this next!
Shout out to @alexeagle and Greg Magolan (who I don't think is on Mastodon?) for their help, couldn't have done it without you!
Iโm so excited to announce weโve released version 1.0 of #rules_xcodeproj!
For a release this important, Iโve written a blog post. Please enjoy ๐.
https://www.buildbuddy.io/blog/introducing-rules_xcodeproj-1-0
@techytacos Don't get me wrong, #ISR is great. #Bazel is great. ISR + Bazel? More conflicts than sodium and water.
#Terrible #Idea: An incremental static rendering (#ISR) solution which calls #Bazel build in production to generate #HTML, #JS, and #CSS files which get served directly to users.
This is objectively one of the dumbest and worst ideas I've ever come up with, so I made a feature request for it over-analyzing the idea way too much.
https://github.com/dgp1130/rules_prerender/issues/53
I would be very curious to know exactly _which_ aspect of the idea breaks first. Is it memory limitations? Cache invalidation? Database management? Backend usage? #RBE SLOs? So many things things that could ruin it!
Since the hashtag is totally empty for me on here, I'll start it:
Anyone on the #fediverse want to talk to #turborepo, let me know :D.
#vercel #monorepo #nextjs #frontend #programming #nx #moon #bazel #etc #etc
LOOKS LIKE BUILDFILES ARE BACK ON THE MENU BOYS #bazel
Google Cloud and Firestore vs Datastore (3/n): the documentation for getting started refers to a Maven dependency that is no longer hosted in the registry (doc refers to firebase-admin 1.32.0, most recent version seems to be 9.1.1). Not a deal for people who know what they are doing, but not an example of a smooth experience.
Wondering what this means for #Bazel though where we experience similar feedback about documentation ๐
Hi, I am Eugene, a programmer working around #fp, #Scala, and tooling like #sbt and #Bazel, most recently I was at Twitter's Build team
I enjoy exploring complex landscape, and tweaking them to make things better for other programmers #introduction https://eed3si9n.com/about/
Exploring Fediverse from a different place, here's my local #introduction
Working as Eng Manager at #Google in #Munich on #Bazel which became my happy place after different projects and roles. I enjoy working as #facilitator, #mentor and #respect advisor in my org.
I've been exploring Mastodon from a private instance so far, and already learned that discovering content and people is a whole different thing on a well established instance. Let's try!
Thank you @nova (or, .io?) for hosting!
Time for my #introduction!
Iโm Brentley (he/she/they) and Iโm a Developer Evangelist at @buildbuddy. I focus on #iOS / #Mobile and #Bazel. Iโm also the creator of #rules_xcodeproj, a Bazel-integrated #Xcode project generator.
Iโm a big user/fan of #SwiftLang, but I would love to someday be able to learn and use #Elixir or #Lisp for something in production ๐.
On the non-tech side, I love #movies, #tv, and #TTRPG. Iโll sometimes dabble in #videogames (mainly #pokemon).
Imagine if you could:
- open VS Code
- write some #Rust
- install and setup #Bazel
- compile to #WASM
- create a serverless #Nodejs function
- deploy to the Cloud
ALL. FROM. YOUR. BROWSER!
This is the future of Web development. Start now! https://env.new