bazel-gazelle
bazel-gazelle copied to clipboard
Question: Any support for local repository?
I have a go_repository remote dependency and I want to check it out locally and test some changes. The dependency is not a bazel project and does not have a WORKSPACE so local_repository does not work.
Is there any support for go_repository to reference a path on the host machine?
#68 and #132 are feature requests to improve the experience with local repository a bit. They've been open a while, but I still think they should be implemented.
We can't generate build files for a local_repository in place. The best workflow here is probably to just cd into that directory, then run gazelle -repo_root=. -go_prefix=example.com/prefix.
I'd rather not support anything that copies a local directory, then generates build files. I can't find the issue, but that's been considered earlier. It's impractical to keep it up to date with local changes.
I wonder if this can be solved with some sym links to the local repository.
go_local_repository(
name = "localpkg",
path = "/tmp/localpkg",
)
This could generate the BUILD files in a similar fashion to go_repository, and sym link to the actual files. However, it doesn't solve the issue with keeping things up to date...
Thanks for the quick response. I'll subscribe to those issues and close this out for now.
I'd like this feature. Can this please be re-opened?
Found myself needing this again and the workaround above is rather cumbersome. I'll reopen :smile: