You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest releases of all the above?
I cleaned my project and changed MODULE.bazel to use rules_go v0.46.0.
The error seems to be resolved. When I looked at the go.mod file for 0.46.0, it hasn't changed,
but there is a commit that seems to have corrected things. You might want to verify my
conclusion. Here is the commit: #3775
What operating system and processor architecture are you using?
macOS Sonoma, v 14.2.1
amd64
Any other potentially useful information about your toolchain?
go version go1.21.6 darwin/amd64
Goland Info:
GoLand 2023.3.4
Build #GO-233.14475.38, built on February 13, 2024
Runtime version: 17.0.10+1-b1087.17 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 24
Metal Rendering is ON
Registry:
debugger.new.tool.window.layout=true
ide.completion.variant.limit=500
suggest.all.run.configurations.from.context=true
ide.experimental.ui=true
Non-Bundled Plugins:
lechuck.intellij-plugin.task (1.5.0)
com.planetexpress.go_struct_tag_generator (1.2.8)
String Manipulation (9.12.0)
org.intellij.plugins.hcl (233.13135.65)
org.toml.lang (233.13135.67)
com.jetbrains.space (233.14475.8)
com.intellij.kubernetes (233.14475.2)
When I open my golang project in JetBrains GoLand, something runs the following command:
/usr/local/opt/go/libexec/bin/go list -modfile=/Users/mike/Go/src/github.com/ingios/falcon/bazel-falcon/external/rules_go~0.44.2/tests/go.mod -m -json -mod=mod all #gosetup
When I look at the go.mod file in that directory, it is empty and does not have a module statement.
Here is the error in the window that ran that command:
go: error reading /Users/mike/Go/src/github.com/ingios/falcon/bazel-falcon/external/rules_go~0.44.2/tests/go.mod: missing module declaration. To specify the module path:
go mod edit -module=example.com/mod
What did you expect to see?
No error
What did you see instead?
The reported error
The text was updated successfully, but these errors were encountered:
I saw a similar error when Bazel's --output_base flag was set to a path inside my workspace. Upgrading to later rules_go versions did not seem to resolve it.
What version of rules_go are you using?
0.44.2
What version of gazelle are you using?
0.35.0
What version of Bazel are you using?
7.0.0
Does this issue reproduce with the latest releases of all the above?
I cleaned my project and changed MODULE.bazel to use rules_go v0.46.0.
The error seems to be resolved. When I looked at the go.mod file for 0.46.0, it hasn't changed,
but there is a commit that seems to have corrected things. You might want to verify my
conclusion. Here is the commit: #3775
What operating system and processor architecture are you using?
macOS Sonoma, v 14.2.1
amd64
Any other potentially useful information about your toolchain?
go version go1.21.6 darwin/amd64
Goland Info:
GoLand 2023.3.4
Build #GO-233.14475.38, built on February 13, 2024
Runtime version: 17.0.10+1-b1087.17 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 24
Metal Rendering is ON
Registry:
debugger.new.tool.window.layout=true
ide.completion.variant.limit=500
suggest.all.run.configurations.from.context=true
ide.experimental.ui=true
Non-Bundled Plugins:
lechuck.intellij-plugin.task (1.5.0)
com.planetexpress.go_struct_tag_generator (1.2.8)
String Manipulation (9.12.0)
org.intellij.plugins.hcl (233.13135.65)
org.toml.lang (233.13135.67)
com.jetbrains.space (233.14475.8)
com.intellij.kubernetes (233.14475.2)
GOROOT=/usr/local/opt/go/libexec #gosetup
GOPATH=/Users/mike/Go #gosetup
What did you do?
When I open my golang project in JetBrains GoLand, something runs the following command:
/usr/local/opt/go/libexec/bin/go list -modfile=/Users/mike/Go/src/github.com/ingios/falcon/bazel-falcon/external/rules_go~0.44.2/tests/go.mod -m -json -mod=mod all #gosetup
When I look at the go.mod file in that directory, it is empty and does not have a module statement.
Here is the error in the window that ran that command:
go: error reading /Users/mike/Go/src/github.com/ingios/falcon/bazel-falcon/external/rules_go~0.44.2/tests/go.mod: missing module declaration. To specify the module path:
go mod edit -module=example.com/mod
What did you expect to see?
No error
What did you see instead?
The reported error
The text was updated successfully, but these errors were encountered: