bazel-contrib / bazel-contrib/rules_fuzzing
Latest version of rules_fuzzing (0.5.2) introduces dependency cycle
- Dominant language
- Starlark
- Stars
- 93
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
rules_fuzzing works as expected.
## Actual Behavior
When I try to include the latest version (0.5.2), I get the following error:
```
ERROR: Failed to load Starlark extension '@@rules_python_internal//:rules_python_config.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.
- @@rules_python_internal
This could either mean you have to add the '@@rules_python_internal' 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
```
Reverting to 0.4.2 resolves the issue.
## Steps to Reproduce the Problem
1. Create a simple fuzz target.
2. Include with :
```
http_archive(
name = "rules_fuzzing",
strip_prefix = "rules_fuzzing-0.5.2",
urls = ["https://github.com/bazelbuild/rules_fuzzing/releases/download/v0.5.2/rules_fuzzing-0.5.2.zip"],
)
load("@rules_fuzzing//fuzzing:repositories.bzl", "rules_fuzzing_dependencies")
rules_fuzzing_dependencies()
load("@rules_fuzzing//fuzzing:init.bzl", "rules_fuzzing_init")
rules_fuzzing_init()
load("@fuzzing_py_deps//:requirements.bzl", "install_deps")
install_deps()
```
3. Run `bazel build --config=libfuzzer `
## Specifications
- Version: v0.5.2
- Platform: Manjaro Linux
Contributor guide
Research direction
Start by reproducing the reported Bazel build with rules_fuzzing 0.5.2 and the WORKSPACE load sequence shown in the issue, then compare it with 0.4.2. Trace the repository definitions used by repositories.bzl, init.bzl, and requirements.bzl to identify the dependency cycle. Done means the sample fuzz target builds with 0.5.2 without the cycle error.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100