bazelbuild / bazelbuild/bazel

--platforms silently ignores multiple entries

Open
#30,684 4 comments 0 reactions 0 assignees View on GitHub
P3 team-Configurability type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

`--platforms` only use a single label. If multiple labels are passed, all but the first are dropped silently, **without** any kind of warning or error message.

### Which category does this issue belong to?

_No response_

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

`bazel build //:all --platforms=@platforms//host,this-extra-platform-is-ignored-without-warning-or-error`

### Which operating system are you running Bazel on?

Linux

### What is the output of `bazel info release`?

release 9.2.0

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

```text

```

### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

Commit 81acd2a352387399914ea1ef2a5efa1b4ecc766b effectively removed the [printing of a warning message](https://github.com/bazelbuild/bazel/blob/f644f2dff90cbbba0e14551051578c5e93328650/src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java#L55-L62).

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in src/main/java/com/google/devtools/build/lib/analysis/PlatformConfiguration.java and inspect commit 81acd2a352387399914ea1ef2a5efa1b4ecc766b against the earlier warning logic. Reproduce the behavior with the provided bazel build command; done means multiple --platforms entries are no longer silently dropped and the user receives the intended warning or error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.