Masthash

#bazel

Bart Louwers
4 weeks ago

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

Daniel Aditya Istyana
1 month ago

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.

Doug Parker
1 month ago

@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.

I'm kind of impressed that every single tool or plugin meant to work with #bazel is AT MOST half-baked.

Wille
2 months ago

Tried to figure out with #ChatGPT 3.5 how to generate #Bazel build artifacts from an existing #scala #sbt project.

It came up with some plausible, but ultimately hallucinated instructions:
* The plugin does not seem to exist.
* The instructions were doomed to fail, even if the plugin had existed.

Reid D. M.
2 months ago

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

Buck Baskin
2 months ago

One of the things I learned that I didn’t know while developing this feature: #Bazel. First and foremost, I don’t have a good mental model of how it works, especially when it comes to looking up compilers and setting options for compilers. #FormaK benefits by being able to easily zip together Python, C++ and generated C++ in Bazel, but working on improving the C++ integration feels like stumbling in the dark hoping I find a light switch

Francis ☑️
2 months ago

@samir someone left my company after spending 4 months working to integrate #bazel 😬

Mx. Savanni D'Gerinel
2 months ago

#Make was the last good build tool.

The jury is still out on #Bazel and #Nix.

Fight me.

Reid D. M.
2 months ago

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.

refnode
2 months ago

Trying a #bazel gazelle inventory run as poc on the #aws #go sdk github.com/aws/aws-sdk-go-v2 as part of a try to perform a bazel build for the #crossplane aws provider.

a time consuming run ...

:David Campey
2 months ago

Finally getting to hello world after installing mediapipe on Windows seems like an achievement!

MSYS2, pacman, python, Visual Studio (2019!), Visual C++ Build tools (from VS2019, not 2022), Windows SDK, chocolatey, Bazel(isk), git clone, opencv unzipping installer, and a few env vars.

Well documented here, but still 😅https://developers.google.com/mediapipe/framework/getting_started/install#installing_on_windows

#cv #mediapipe #python #microsoft #google #git #foss #windows #bazel

Console output of a successful build, setting one last env var, and running hello_world.exe, to see output of "Hello World!" repeated 10 times.

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

#rules_xcodeproj #Bazel #Xcode

Paul Meyer
3 months ago

Finally found the time to start transforming my #NixOS config into a flake. Still some impurities left, but I already find flakes amazing.

At the same time, we're moving our build system, CI and dev tooling to #bazel at work. Really interesting to learn both systems side by side.

Daniel Aditya Istyana
3 months ago

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.

Cc: @SmileyKeith @brentley

Doug Parker
3 months ago

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.

#Bazel #GraphViz

Eugene Yokota
3 months ago

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

Eugene Yokota
3 months ago

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

Son Luong Ngoc
3 months ago

Me: Hey #Bazel, what depends on "golang.org/x/net" in my repo?

Mr.Bazel:

---

I will use this image in a future slide. And it's only 1/8 of the actual SVG file 😤

Eugene Yokota
4 months ago

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

Doug Parker
4 months ago

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!

Doug Parker
4 months ago

@rheber Strictly speaking you don't, I get that. But I want one because:

1. The commit which adds an empty `package.json` should also add a lockfile for symmetry, to make sure it isn't forgotten later, and to keep everything to a single commit.

2. Some tools expect or require a lockfile to function. In this case, #Bazel is very strict that a lockfile must exist to do anything, even if it's empty.

Doug Parker
4 months ago

Apparently the production #Bazel docs use the nightly build. I found `native.package_relative_label()` in the docs and was trying to use it but consistently failing. I tried to trace down when the function was added, and discovered it was merged _yesterday_. How's that for turnaround time?

https://bazel.build/rules/lib/native#package_relative_label
https://github.com/bazelbuild/bazel/commit/b859571804f2095caaf018b172b59c90f185fd51

Jon Parise
4 months ago

I made a small quality-of-life improvement to #Bazel's Objective-C/C++ compile action sets back in 2021 while working on Pinterest's iOS build system.

https://github.com/bazelbuild/bazel/pull/14010

It took a while to be reviewed, but I'm happy to see that it was just merged.

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

#Bazel #Xcode

Doug Parker
4 months ago

@techytacos Don't get me wrong, #ISR is great. #Bazel is great. ISR + Bazel? More conflicts than sodium and water.

Doug Parker
4 months ago

#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!

Picture of the Simpsons at a moment where a doctor is explaining to Mr. Burns how he has _all_ the diseases but isn't affected by them. The doctor demonstrates this by having a number of small tools attempt to squeeze through a door at the same time, yet none get through because they all block each other. The doctor stresses that even a slight breeze could upset the balance and have significant impact, but Mr. Burns takeaway is: "I'm indestructable..."
Daniel Aditya Istyana
4 months ago

I’m currently doing some profiling work with #Bazel to see if extracting some modules would speed up overall build time.

After gathering the data from build profile, this modules takes 50s on average to compile with 40s for its fastest time and 61s for the slowest time. With n=10, I got 12.7 for 2STDev which means I don’t need to remove all the data point.

I think I should’ve make it run 20 times.

Daniel Aditya Istyana
4 months ago

Been doing this modularization and profiling work in #Bazel since end of last year.

I guess a lot of time is spent on waiting build to success. 😂

mehulkar
4 months ago

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

Doug Parker
4 months ago

Just wasted an hour debugging why:

```BUILD
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@npm//@bazel/typescript:index.bzl", "ts_config")

ts_config(
name = "tsconfig",
src = "tsconfig.json",
)
```

Wasn't working as expected.

Apparently #Bazel #Starlark is just ok with loading the same symbol from two different locations and has no complaints! 🙃

Šimon Tóth
4 months ago

@kytta Save your sanity with #Bazel

Eugene Yokota
4 months ago

I am joining @aish's Machine Learning System team at Netflix!

excited to work on developer experience for data scientists, esp on #Scala and #Bazel. I also want to thank everyone who reached out to me during the transition to check up on me etc. you kept my spirits high!

16 inch MacBook Pro, a folded letter that says "Welcome to Netflix", and a tangerine

I happy to announce that I’ve just released version 0.12 of #rules_xcodeproj!

Like the release before it, I didn’t plan to have another release before the 1.0 release candidates, but since a fair amount of improvements and bug fixes made it in, I felt it wasn’t worth waiting to get these changes out.

Please read the release notes (https://github.com/buildbuddy-io/rules_xcodeproj/releases/tag/0.12.0) for a detailed account of what is included in this release.

#Bazel #Xcode

Son Luong Ngoc
5 months ago

Google casually mentioned that they use a custom hash algorithm for their internal build tool #bazel is mind-blowing.

https://github.com/bazelbuild/remote-apis/pull/235#issuecomment-1360889983

I barely know what AVX2 is. Git is still having a really hard time getting off SHA1 into SHA256. And these guys said "oh we have been passed all that since 2018"... 🤣

David Neto
5 months ago

Bazel has a good chance at being a good build system, once it gets past its growing pains.

Growing pains: shifting conventions on how to get stuff done; dense and circuitous documentation.

#bazel

Björn Gohla
5 months ago

@lobsters seems like #bazel caching would have also solved that @GabriellaG439

#Bazel 6.0 was just released!

I spent some time (okay, a lot of time) reviewing all of the commits since Bazel 5.4, and wrote up a blog post summarizing the ones I found interesting: https://brentley.dev/whats-new-in-bazel-6.0/

Son Luong Ngoc
6 months ago

@rain These might help giving some context from #bazel side

https://github.com/bazelbuild/starlark/pull/99

https://github.com/bazelbuild/starlark/issues/97

I am not familiar with Godel's theorem though.

Do Skylark/Starlark as present in #bazel etc describe exactly the set of "primitive recursive functions" as seen in Gödel's incompleteness theorem?

Reid D. M.
6 months ago

LOOKS LIKE BUILDFILES ARE BACK ON THE MENU BOYS #bazel

Sven Tiffe :bazel:
6 months ago

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 🙈

Eugene Yokota
6 months ago

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/

Sven Tiffe
6 months ago

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