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

Most upvoted comments

@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!