bazelbuild / bazelbuild/bazel

Multiplatform output paths are safe, correct, and efficient

Open
#6,526 42 comments 13 reactions 1 assignee Claimed by @gregestren View on GitHub
not stale P2 team-Configurability type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

Tracking issue on [Bazel Configurability Roadmap](https://bazel.build/roadmaps/configuration.html)

By "multiplatform" I mean any scenario where two different rules in the same build build with different settings. This also includes non-platform settings like *app version*, but "multiplatform" is a concise term to capture the essence.

Long-story short is `bazel-out/$(cpu)-$compilation_mode)/...` doesn't work well for multiplatform builds:

* Unrelated actions can inadvertently write to the same output path (correctness issue)
* `cpu` is redundant for cpu-agnostic actions (efficiency issue: switching up the CPU shouldn't require re-executing these actions: see https://github.com/bazelbuild/bazel/issues/6527)
* Actions that depend on flags that *aren't* CPU or compilation mode write to the same path when those flags change (correctness issue)
* All the above can destroy remote execution efficiency

This issue tracks the long and complicated effort of making a better output path syntax. Expect the next deliverable on this to be a design doc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.