Skip to content

Commit

Permalink
feat(stdlib): update TAG_AFFECTS_STDLIB dict for Go versions 1.20..1.…
Browse files Browse the repository at this point in the history
…23 (#4122)
  • Loading branch information
lbcjbb authored Sep 26, 2024
1 parent d37da53 commit 6c1154a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
21 changes: 14 additions & 7 deletions go/private/rules/transition.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -446,25 +446,30 @@ go_cross_transition = transition(
# This should be updated to contain the union of all tags relevant for all
# versions of Go that are still relevant.
#
# Currently supported versions: 1.18, 1.19, 1.20
# Currently supported versions: 1.18..1.23
#
# To regenerate, run and paste the output of
# bazel run //go/tools/internal/stdlib_tags:stdlib_tags -- path/to/go_sdk_1/src ...
_TAG_AFFECTS_STDLIB = {
"alpha": None,
"appengine": None,
"asan": None,
"boringcrypto": None,
"boringcrypto": None, # Added in Go 1.19
"checknewoldreassignment": None, # Added in Go 1.22
"cmd_go_bootstrap": None,
"compiler_bootstrap": None,
"debuglog": None,
"debugtrace": None, # Added in Go 1.22
"faketime": None,
"gc": None,
"gccgo": None,
"gen": None,
"gen": None, # Removed in Go 1.20
"generate": None,
"gofuzz": None,
"gofuzz": None, # Removed in Go 1.23
"icu": None, # Added in Go 1.23
"ignore": None,
"internal": None, # Added in Go 1.21
"internal_pie": None, # Added in Go 1.21, removed in Go 1.22
"libfuzzer": None,
"m68k": None,
"math_big_pure_go": None,
Expand All @@ -473,13 +478,15 @@ _TAG_AFFECTS_STDLIB = {
"netgo": None,
"nethttpomithttp2": None,
"nios2": None,
"noopt": None,
"noopt": None, # Added in Go 1.20
"osusergo": None,
"purego": None,
"race": None,
"sh": None,
"shbe": None,
"tablegen": None,
"testgo": None,
"static": None, # Added in Go 1.21
"tablegen": None, # Removed in Go 1.19
"testgo": None, # Removed in Go 1.19
"timetzdata": None,
"tools": None, # Added in Go 1.21
}
3 changes: 2 additions & 1 deletion go/tools/internal/stdlib_tags/stdlib_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func walkFile(path string, tags map[string]struct{}) error {

scanner := bufio.NewScanner(file)
// The Go SDK contains some very long lines in vendored files (minified JS).
scanner.Buffer(make([]byte, 0, 128*1024), 1024*1024)
scanner.Buffer(make([]byte, 0, 128*1024), 2*1024*1024)
for scanner.Scan() {
line := scanner.Text()
if !isConstraint(line) {
Expand All @@ -102,6 +102,7 @@ func walkFile(path string, tags map[string]struct{}) error {
if err = scanner.Err(); err != nil {
return fmt.Errorf("%s: %w", path, err)
}

return nil
}

Expand Down

0 comments on commit 6c1154a

Please sign in to comment.