Open xuzhenglun opened 3 months ago
friendly ping @stefanpenner
I haven't had much time for bazel stuff recently, but that might be changing. I'll attempt to carv out some time to investigate.
FWIW the go work demo was how I originally made this work, and I believe it inspired the tests within gazelle itself, so it is surprising to see a failure here.
What version of gazelle are you using?
0.38.0
What version of rules_go are you using?
0.49.0
What version of Bazel are you using?
7.2.1
Does this issue reproduce with the latest releases of all the above?
yes
What operating system and processor architecture are you using?
Darwin ReficuldeMBP.reficul.lab 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103 arm64
What did you do?
I was following the official tutorial of go workspace with bzlmod. I created a demo project looks like below:
go.work looks like:
MODULE.bazel
looks like:In this demo,
main.go
importsexample/hello/reverse
by usinggo.work
, and a new added functionInt
is called. ThisInt
method is only existed in this local package. so ifgo.work
works, building should success. ifgo.work
doest work, then building should fail.This demo works great by using
go build
, but fails by usingbazel build //:demo
. did anything I do wrong?The demo project could be found in attachment: go-work.tar.gz
What did you expect to see?
building without any error.
What did you see instead?