All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Guide to Migrating from Legacy Macros to Symbolic Macros in Bazel

By

todsacerdoti

6mo ago· 13 min readen

Summary

This technical article explains the migration from legacy macros to symbolic macros in Bazel, a build system. Symbolic macros were introduced in Bazel 8 and offer improvements like typed arguments, better visibility control for created targets, and enhanced code clarity. The content is targeted at experienced Bazel engineers and focuses on modernization of build metadata, assuming readers have solid knowledge of Bazel's macro system and build file conventions.

Key quotes

· 5 pulled
In Bazel, there are two types of macros: legacy macros and symbolic macros, that were introduced in Bazel 8.
Symbolic macros are recommended for code clarity, where possible.
They include enhancements like typed arguments and the ability to define and limit the visibility of the targets they create.
This post is intended for experienced Bazel engineers or those tasked with modernizing the build metadata of their codebases.
The following discussion assumes a solid working knowledge of Bazel's macro system and build file conventions.
Snippet from the RSS feed
Learn more about modernizing Bazel macros in your codebase

You might also wanna read