aspect-build / aspect-build/rules_lint
[Bug]: Using archive_override for rules_lint
- Dominant language
- Starlark
- Stars
- 154
- Forks
- 125
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 20
Description
### What happened?
When trying to use `archive_override` with version `2.0.0` in `MODULE.bazel` the following error is encountered
```
ERROR: //external/aspect_rules_lint+/tools/toolchains/sarif_parser_toolchain.bzl:136:43: An error occurred during the fetch of repository 'aspect_rules_lint++toolchains+sarif_parser_linux_amd64':
Traceback (most recent call last):
File "/external/aspect_rules_lint+/tools/toolchains/sarif_parser_toolchain.bzl", line 136, column 43, in _sarif_parser_platform_repo_impl
sha256 = RELEASED_BINARY_INTEGRITY[release_file],
Error: key "sarif_parser-linux_amd64" not found in dictionary
ERROR: no such package '@@aspect_rules_lint++toolchains+sarif_parser_linux_amd64//': key "sarif_parser-linux_amd64" not found in dictionary
ERROR: /toy/scripts/BUILD.bazel:3:10: ///toy/scripts:hello_ depends on @@aspect_rules_lint++toolchains+sarif_parser_linux_amd64//:sarif_parser_toolchain in repository @@aspect_rules_lint++toolchains+sarif_parser_linux_amd64 which failed to fetch. no such package '@@aspect_rules_lint++toolchains+sarif_parser_linux_amd64//': key "sarif_parser-linux_amd64" not found in dictionary
Target ///toy/scripts:hello_ failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: Analysis of aspects '[//:defs.bzl%ty] with parameters {} on ///toy/scripts:hello_' failed; build aborted: Loading failed
```
Example of MODULE.bazel setup
```
bazel_dep(name = "aspect_rules_lint", version = "2.0.0")
archive_override(
module_name = "aspect_rules_lint",
integrity = "sha256-zRteS+npQnwX3p3WDqff1If0XI/6Wdr0ExaZ6PLDqW4=",
strip_prefix = "rules_lint-35ee86973e8b50c5c68565deaee10e96a96d0b19",
urls = [ "https://github.com/bazeltools/rules_lint/archive/35ee86973e8b50c5c68565deaee10e96a96d0b19.zip",
],
)
```
Contributor guide
Research direction
Reproduce the failure with the provided MODULE.bazel archive_override configuration, then inspect tools/toolchains/sarif_parser_toolchain.bzl around line 136 and the RELEASED_BINARY_INTEGRITY lookup. Done means the archive_override setup can fetch the sarif_parser_linux_amd64 repository and the example target builds successfully.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100