Skip to content

Bazel 7.0.1 reports cyclic dependency in rules_python #20942

@rickeylev

Description

@rickeylev

Description of the bug:

Bazel 7.0.1 reports a cyclic dependency in rules_python. However, 7.0.0 and the 8.x/rolling releases don't exhibit this bug

Which category does this issue belong to?

Core

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

Checkout rules python, enable the starlark implementation, and build with 7.0.1

git clone https://github.com/bazelbuild/rules_python.git
env USE_BAZEL_VERSION=7.0.1 bazel build --nobuild //:distribution

The 7.0.0 release and rolling (8.x) releases don't have this problem

See also: https://buildkite.com/bazel/rules-python-python/builds/6938#018d1ee3-ca77-4167-bcce-3ac335c7d203

The error is

(23:24:37) ERROR: Failed to load .bzl file '@@_main~internal_deps~rules_python_internal//:rules_python_config.bzl': possible dependency cycle detected.
(23:24:37) ERROR: Error computing the main repository mapping: cycles detected during computation of main repo mapping

Which operating system are you running Bazel on?

linux

What is the output of bazel info release?

release 7.0.1

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 master; git rev-parse HEAD ?

ssh://[email protected]:443/rickeylev/rules_python
6607a4ae4f680af879a0148e95a7ea78eca9dafa
6607a4ae4f680af879a0148e95a7ea78eca9dafa

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

Yes. Not sure, I'll look into it. Just want to file this sooner rather than later

Have you found anything relevant by searching the web?

No response

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1I'll work on this now. (Assignee required)area-BzlmodBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions