-
-
Notifications
You must be signed in to change notification settings - Fork 701
Open
Description
It seems that this feature (added in #4102) does not account for build --symlink_prefix=<something>
.
My .bazelrc
says:
build --symlink_prefix=.bazel/
Upon build, I get this:
nogo: errors found by nogo during build-time code analysis:
go/core/utils.go:716:8: Use len(x) == 0 rather than x == "": s == "" (empty_string_check)
-------------------Suggested Fix---------------------
--- a/go/core/utils.go
+++ b/go/core/utils.go
@@ -713,7 +713,7 @@
}
func TestRulesGo(s string) string {
- if s == "" {
+ if len(s) == 0 {
return "{}"
}
return s
-----------------------------------------------------
To apply the suggested fix, run the following command:
$ patch -p1 < bazel-out/darwin_arm64-fastbuild/bin/go/core/core.nogo.patch
This is not quite right given the path is invalid: nogo reports bazel-out/darwin_arm64-fastbuild/bin/go/core/core.nogo.patch
when the correct path is .bazel/out/darwin_arm64-fastbuild/bin/go/core/core.nogo.patch
. Is rules_go
not properly accounting for symlinks?
Environment facts:
Build label: 7.4.1
- Go version 1.23
rules_go
versionv0.53.0
gazelle
versionv0.35.0
Metadata
Metadata
Assignees
Labels
No labels