github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/tools/bazel_gazelle_generate.patch (about) 1 diff --git a/language/go/generate.go b/language/go/generate.go 2 index 2892948..feb4ad6 100644 3 --- a/language/go/generate.go 4 +++ b/language/go/generate.go 5 @@ -691,6 +691,10 @@ func (g *generator) setImportAttrs(r *rule.Rule, importPath string) { 6 } 7 8 func (g *generator) commonVisibility(importPath string) []string { 9 + if importPath == "golang.org/x/tools/go/analysis/internal/facts" { 10 + // Imported by nogo main. We add a visibility exception. 11 + return []string{"//visibility:public"} 12 + } 13 // If the Bazel package name (rel) contains "internal", add visibility for 14 // subpackages of the parent. 15 // If the import path contains "internal" but rel does not, this is