We have been having some problems with our build tooling for several multi language monorepos at work where we mix together Python, Julia, Go, Docker/Podman (OCI) containers, etc. Doing small things like getting a proper depot closure from a Manifest, building a sysimage, etc as part of a build was being done manually everywhere, and things that worked one day seemed to break the next.
One day I just couldn’t take it anymore and we decided to bring everything under Bazel so we could have single definitive reproducible builds with shared cache and other modern build system conveniences. While there are some existing rules for Bazel (rules_julia), we still wanted to use our existing Julia package tooling and internal registry, and basically just have the Manifest and the minimal depot required to satisfy it being the thing that was actually keyed in Bazel, and then build on top of that. Define some common rules that we could re-use across every single Julia component that we need to deploy to production.
The result is rules_julia_depot, I hope this may be helpful to others who are looking for a way to integrate Julia into Bazel builds without completely abandoning the parts of Pkg which we are all familiar with and have come to depend on. I’m using these rules already to produce fairly complicated builds with multiple manifests and then integrating those into many different targets including containers w/ integrated sysimages, tests, tools, etc. For our production releases of ReactantServer.jl, the plan is also to move to these rules so we can publish regular releases with full known working configurations intended for use in production.
I’m fairly new to Bazel, but I plan to keep building on this foundation and hopefully create a set of generally useful rules for more tightly integrating Julia into multi-language production systems.