bazel-gazelle: Gazelle erroring on relative path replace directives
What version of gazelle are you using?
0.18.1
What version of rules_go are you using?
0.19.0
What version of Bazel are you using?
0.28.1
Does this issue reproduce with the latest releases of all the above?
I believe so.
What operating system and processor architecture are you using?
macOS / x64
What did you do?
With a go.mod file like the following:
module github.com/foo/bar
go 1.12
require (
baz.com v0.0.0
)
replace baz.com => ./build-support/baz
What did you expect to see?
I was hoping to see the same behavior as I do with absolute paths. Namely:
gazelle: go_repository does not support file path replacements for compass.com -> /Users/cwaeland/development/foo/build-support/baz
What did you see instead?
I get the following output:
go: parsing build-support/baz/go.mod: open /private/var/folders/s6/tpqlfq494czcv34zgzwm4vy40000gp/T/gazelle-temp-gomod900090332/build-support/baz/go.mod: no such file or directory
go: error loading module requirements
gazelle: error parsing "go.mod": exit status 1
I thought this would have been covered by https://github.com/bazelbuild/bazel-gazelle/issues/407 but it doesn’t seem to be.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 15 (11 by maintainers)
Commits related to this issue
- update-repos can work with a go.mod file in place (#912) Allow update-repos to operate in-place rather than through a temp copy. Previously, any go.mod files containing relative on-disk replace direc... — committed to bazelbuild/bazel-gazelle by dragonsinth 4 years ago
- update-repos can work with a go.mod file in place (#912) Allow update-repos to operate in-place rather than through a temp copy. Previously, any go.mod files containing relative on-disk replace direc... — committed to bazelbuild/bazel-gazelle by dragonsinth 4 years ago
- bazel: Fixup gazelle rule generation We now have relative path replace directives in the repo to support submodules. Our current gazelle invocation will error on this. ref: https://github.com/bazelb... — committed to justaugustus/promo-tools by justaugustus 4 years ago
- bazel: Fixup gazelle rule generation We now have relative path replace directives in the repo to support submodules. Our current gazelle invocation will error on this. ref: https://github.com/bazelb... — committed to justaugustus/promo-tools by justaugustus 4 years ago
- bazel: Fixup gazelle rule generation We now have relative path replace directives in the repo to support submodules. Our current gazelle invocation will error on this. ref: https://github.com/bazelb... — committed to justaugustus/promo-tools by justaugustus 4 years ago
- bazel: Fixup gazelle rule generation We now have relative path replace directives in the repo to support submodules. Our current gazelle invocation will error on this. ref: https://github.com/bazelb... — committed to justaugustus/promo-tools by justaugustus 4 years ago
@jayconrod ah, ok, np, I do generally agree with you (and about upgrading as well) I personally am not as much into the Go world, but that makes perfect sense. I was concerned it was some Gazelle-level decision that wasn’t documented, but it being a Go-level standard works fine. Thanks for explaining!