bazelbuild / bazelbuild/bazel

Crash on combination of scoped flag, transitions and invalid PROJECT.scl

Open
#28,318 2 comments 0 reactions 1 assignee Claimed by @gregestren View on GitHub
P1 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:

I have found that the following combination of code causes a Precondition failure here - https://cs.opensource.google/bazel/bazel/+/release-9.0.0rc6:src/main/java/com/google/devtools/build/lib/analysis/producers/BuildConfigurationKeyProducer.java;l=375

PROJECT.scl with an entry for a buildable_unit with isdefault=True, but no project_directories at all

label_flag (or string_flag or whatever) with scope="project"

in-graph transition on that flag

### 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.

_No response_

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

_No response_

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

_No response_

### 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.

_No response_

### 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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.