Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marker file sensitivity to repo mapping causes cycles for legacy WORKSPACE #21372

Closed
benjaminp opened this issue Feb 15, 2024 · 1 comment
Closed

Comments

@benjaminp
Copy link
Collaborator

Since 9edaddd, we have the following failure:

$ touch requirements_lock.txt
$ cat > WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
    strip_prefix = "rules_python-0.31.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
   name = "my_deps",
   requirements_lock = "//:requirements_lock.txt",
)
load("@my_deps//:requirements.bzl", "install_deps")
install_deps()
$ bazel build --noenable_bzlmod
$ bazel shutdown
$ bazel build  --noenable_bzlmod
Starting local Bazel server and connecting to it...
ERROR: Failed to load Starlark extension '@@my_deps//:requirements.bzl'.
Cycle in the workspace file detected. This indicates that a repository is used prior to being defined.
The following chain of repository dependencies lead to the missing definition.
 - @@my_deps
This could either mean you have to add the '@@my_deps' repository with a statement like `http_archive` in your WORKSPACE file (note that transitive dependencies are not added automatically), or move an existing definition earlier in your WORKSPACE file.
ERROR: Error computing the main repository mapping: cycles detected during computation of main repo mapping
Computing main repo mapping: 
@Wyverald
Copy link
Member

dupe of #21289

@Wyverald Wyverald closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants