diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bazeldefs/tags.bzl | 4 | ||||
-rw-r--r-- | tools/bigquery/BUILD | 1 | ||||
-rw-r--r-- | tools/checkescape/checkescape.go | 9 | ||||
-rw-r--r-- | tools/deps.bzl | 9 | ||||
-rw-r--r-- | tools/github/reviver/github.go | 7 | ||||
-rw-r--r-- | tools/go_marshal/BUILD | 5 | ||||
-rw-r--r-- | tools/go_marshal/README.md | 3 |
7 files changed, 30 insertions, 8 deletions
diff --git a/tools/bazeldefs/tags.bzl b/tools/bazeldefs/tags.bzl index f5d7a7b21..6564c3b25 100644 --- a/tools/bazeldefs/tags.bzl +++ b/tools/bazeldefs/tags.bzl @@ -33,6 +33,10 @@ archs = [ "_s390x", "_sparc64", "_x86", + + # Pseudo-architectures to group by word side. + "_32bit", + "_64bit", ] oses = [ diff --git a/tools/bigquery/BUILD b/tools/bigquery/BUILD index 81994f954..2b116fe0d 100644 --- a/tools/bigquery/BUILD +++ b/tools/bigquery/BUILD @@ -6,6 +6,7 @@ go_library( name = "bigquery", testonly = 1, srcs = ["bigquery.go"], + nogo = False, # FIXME(b/184974218): Analysis failing for cloud libraries. visibility = [ "//:sandbox", ], diff --git a/tools/checkescape/checkescape.go b/tools/checkescape/checkescape.go index 8eeabbc3d..c788654a8 100644 --- a/tools/checkescape/checkescape.go +++ b/tools/checkescape/checkescape.go @@ -709,8 +709,13 @@ func run(pass *analysis.Pass, localEscapes bool) (interface{}, error) { return } - // Recursively collect information from - // the other analyzers. + // If this package is the atomic package, the implementation + // may be replaced by instrinsics that don't have analysis. + if x.Pkg.Pkg.Path() == "sync/atomic" { + return + } + + // Recursively collect information. var imp packageEscapeFacts if !pass.ImportPackageFact(x.Pkg.Pkg, &imp) { // Unable to import the dependency; we must diff --git a/tools/deps.bzl b/tools/deps.bzl index ed1135a9e..91442617c 100644 --- a/tools/deps.bzl +++ b/tools/deps.bzl @@ -94,8 +94,13 @@ def _deps_test_impl(ctx): ) return [] -# Checks that library and its deps only depends on gVisor and an allowlist of -# other dependencies. +# Checks that targets only depend on an allowlist of other targets. Targets can +# be specified directly, or prefixes can be used to allow entire packages or +# directory trees. +# +# This recursively checks the "deps" attribute of each target, dependencies +# expressed other ways are not checked. For example, protobuf targets pull in +# protobuf code, but aren't analyzed by deps_test. deps_test = rule( implementation = _deps_test_impl, attrs = { diff --git a/tools/github/reviver/github.go b/tools/github/reviver/github.go index c4b624f2a..b360f0544 100644 --- a/tools/github/reviver/github.go +++ b/tools/github/reviver/github.go @@ -92,7 +92,7 @@ func (b *GitHubBugger) Activate(todo *Todo) (bool, error) { fmt.Fprintln(&comment, "There are TODOs still referencing this issue:") for _, l := range todo.Locations { fmt.Fprintf(&comment, - "1. [%s:%d](https://github.com/%s/%s/blob/HEAD/%s#%d): %s\n", + "1. [%s:%d](https://github.com/%s/%s/blob/HEAD/%s#L%d): %s\n", l.File, l.Line, b.owner, b.repo, l.File, l.Line, l.Comment) } fmt.Fprintf(&comment, @@ -110,6 +110,11 @@ func (b *GitHubBugger) Activate(todo *Todo) (bool, error) { return true, fmt.Errorf("failed to reactivate issue %d: %v", id, err) } + _, _, err = b.client.Issues.AddLabelsToIssue(ctx, b.owner, b.repo, id, []string{"revived"}) + if err != nil { + return true, fmt.Errorf("failed to set label on issue %d: %v", id, err) + } + cmt := &github.IssueComment{ Body: github.String(comment.String()), Reactions: &github.Reactions{Confused: github.Int(1)}, diff --git a/tools/go_marshal/BUILD b/tools/go_marshal/BUILD index f79defea7..85a1adf66 100644 --- a/tools/go_marshal/BUILD +++ b/tools/go_marshal/BUILD @@ -5,9 +5,7 @@ licenses(["notice"]) go_binary( name = "go_marshal", srcs = ["main.go"], - visibility = [ - "//:sandbox", - ], + visibility = ["//:sandbox"], deps = [ "//tools/go_marshal/gomarshal", ], @@ -16,6 +14,7 @@ go_binary( config_setting( name = "marshal_config_verbose", values = {"define": "gomarshal=verbose"}, + visibility = ["//:sandbox"], ) bzl_library( diff --git a/tools/go_marshal/README.md b/tools/go_marshal/README.md index eddba0c21..bbd4c9f48 100644 --- a/tools/go_marshal/README.md +++ b/tools/go_marshal/README.md @@ -140,3 +140,6 @@ options, depending on how go-marshal is being invoked: - Set `debug = True` on the `go_marshal` BUILD rule. - Pass `-debug` to the go-marshal tool invocation. + +If bazel complains about stdout output being too large, set a larger value +through `--experimental_ui_max_stdouterr_bytes`, or `-1` for unlimited output. |