aspect-build / aspect-build/rules_lint

[Bug]: aspect_rules_lint_rules_rust submodule is not consumable by downstream repos in 2.6.0

Open
#879 15 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Starlark
Stars
154
Forks
125
Avg merge
3d 21h
Merged PRs (30d)
20

Description

### What happened?

### Summary

Thanks a lot for all the work on clippy aspect under #865. However, the new aspect_rules_lint_rules_rust module is currently impossible to bring in without patching upstream sources, which makes the documented migration path (load("@aspect_rules_lint_rules_rust//:clippy.bzl", ...)) unusable in practice.

### The three blockers, in order:

1. Not published to BCR. https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/aspect_rules_lint_rules_rust does not exist, so a plain bazel_dep(name = "aspect_rules_lint_rules_rust", version = "...") fails to resolve.
2. Excluded from every git archive output. .gitattributes at v2.6.0 contains: lint/rules_rust export-ignore and lint/rules_rust/** export-ignore . This strips the directory from the official release tarball (rules_lint-v2.6.0.tar.gz) and from GitHub's auto-generated refs/tags/v2.6.0.tar.gz. So archive_override cannot reach it via any URL on github.com.
3. git_override works, but the submodule's MODULE.bazel is only valid in-tree. Once cloned, it contains:
bazel_dep(name = "aspect_rules_lint") # no version
...
local_path_override(
module_name = "aspect_rules_lint",
path = "../..",
)
Since Bazel only honors *_override declarations in the root module, the local_path_override is silently dropped, leaving the versionless bazel_dep to fail.

### Version

Development (host) and target OS/architectures:
lsb_release -d
Description: Debian GNU/Linux 13 (trixie)

Output of `bazel --version`:
bazel --version
bazel 8.7.0

Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:
current: 2.5.2
proposed: 2.6.0

Language(s) and/or frameworks involved:
Bazel, C++, Rust, Python

### How to reproduce

```shell
### Repro

Any downstream MODULE.bazel that follows the new docs:
bazel_dep(name = "aspect_rules_lint", version = "2.6.0")
bazel_dep(name = "aspect_rules_lint_rules_rust", version = "0.0.0")
git_override(
module_name = "aspect_rules_lint_rules_rust",
remote = "https://github.com/aspect-build/rules_lint.git",
commit = "3f0c79fa75cc37e7dafbdb7e6005ad62b0b0775b", # v2.6.0
strip_prefix = "lint/rules_rust",
)
fails at main-repo-mapping with the error above.
```

### Any other information?

### Workarounds available to downstream users

- single_version_override(module_name = "aspect_rules_lint", version = "2.6.0") at the root, to satisfy the versionless bazel_dep from the submodule.
- git_override(... patches = [...]) to pin the version inside the submodule's MODULE.bazel.
- Vendor lint/rules_rust/ into the downstream repo.

All three force consumers to know upstream internals, which I suppose was not the goal of the split.

Contributor guide

Open the contributing guide

Research direction

Start with .gitattributes, lint/rules_rust/MODULE.bazel, and the downstream MODULE.bazel reproduction in the issue. Check the v2.6.0 archive contents and run the documented git_override flow with Bazel 8.7.0. Done means downstream users can load clippy.bzl from aspect_rules_lint_rules_rust without patching upstream files or adding internal overrides.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, git, python, rust
Domain
build-system, devtools, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.