What's New in Bazel 6.0

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
  • bazel-central-registry

    The central registry of Bazel modules for the Bzlmod external dependency system.

    The main change here is that Bazel now has a package repository that people can pull/push external dependencies to: https://registry.bazel.build/

    This is a huge change as external dependencies used to be one of the big pain points with the Bazel pipeline.

  • Bazel

    a fast, scalable, multi-language and extensible build system

    None, bazel's caching implementation is broken because they don't even know or specify what constituents a build a build hash/key. See this issue from 2018 that's still open [1].

    [1] https://github.com/bazelbuild/bazel/issues/4558

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • bazel_static_dynamic_c_demo

    Internet Points

    I don't know what you're talking about. This is trivial to accomplish using `linkstatic` as documented on `cc_library` and `cc_binary`. I uploaded a demo to github here: https://github.com/emidln/bazel_static_dynamic_c_demo/blob/m...

    Try it out like this:

        # you'll need a c compiler installed, xcode is fine on macos

  • rules_cc

    C++ Rules for Bazel

    Not that I'd recommend it, but if you symlink your system library into the bazel build area, as long as your sandboxing setup don't hose you (or you just turn it off), bazel will track system tools/library in the same way as everything else.

    Bazel's rules_cc even has a system_library.bzl you can import a `system_library` from that automates this for you. https://github.com/bazelbuild/rules_cc/blob/main/cc/system_l...

    I'd still recommend building everything from scratch (and understanding the relationships and graph of your dependencies), but if your build isn't that complicated and you want to role the dice on UB, this isn't that hard.

    As an aside, the most galling part of bazel's cache key calculations has to be that it's up to the individual rules to implement this how they see fit. The rules native to bazel written in java vary wildly compared to starlark-written rules. On thing you (or someone in your org) end up becoming pretty comfortable with while using bazel in anger is RTFC.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts