Skip to content

Multiplatform output paths are safe, correct, and efficient #6526

@gregestren

Description

@gregestren

Tracking issue on Bazel Configurability Roadmap

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 Java compilation doesn't include cpu in output paths #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.

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)not staleIssues or PRs that are inactive but not considered staleteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionstype: feature request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions