bazel-contrib / bazel-contrib/rules_go
Gazelle does not pick up files added by patch
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 760
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 12
Description
### What version of rules_go are you using?
0.50.0
### What version of gazelle are you using?
0.38.0
### What version of Bazel are you using?
7.3.1
### Does this issue reproduce with the latest releases of all the above?
Yes
### What operating system and processor architecture are you using?
macOS
### Any other potentially useful information about your toolchain?
### What did you do?
Attepmted to apply [this patch](https://github.com/user-attachments/files/16852819/testcontainers-auth-errors.patch) with the following directive after our `use_repo(go_deps,...` statement in `MODULE.bazel`:
```
go_deps.module_override(
patch_strip = 1,
patches = [
"//:testcontainers-auth-errors.patch",
],
path = "github.com/testcontainers/testcontainers-go",
)
```
### What did you expect to see?
A successful build.
### What did you see instead?
```
external/gazelle~~go_deps~com_github_testcontainers_testcontainers_go/docker_auth.go:128:25: undefined: getRegistryCredentials
```
Gazelle does not seem to pick up the `docker_config.go` file added by the patch; manually adding it to the generated `BUILD.bazel` file solves the problem.
Contributor guide
Research direction
Start with the MODULE.bazel go_deps.module_override example and the generated BUILD.bazel entry for github.com/testcontainers/testcontainers-go. Reproduce the failure on macOS using docker_auth.go, the added docker_config.go, and the supplied patch, then trace how Gazelle processes patched external repositories. Done means a successful build without manually editing the generated BUILD.bazel file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100