Skip to content

Commit

Permalink
cmd/compile/internal/ssa: make _gen an actual submodule and skip it i…
Browse files Browse the repository at this point in the history
…n TestStdlib

After tools CL 612038, the package astutil stops being vendored, but
_gen/rulegen.go needs to import this package.
In particular, after update golang.org/x/tools, the package astutil
is deleted from the vendor directory, and got error when run TestStdlib
in longtest. So in this CL, we make _gen an actual submodule and
skip it in TestStdlib.

Change-Id: I76f77b66427f6490b4746698711a6e307ad2ba79
Reviewed-on: https://go-review.googlesource.com/c/go/+/629015
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: abner chenc <[email protected]>
  • Loading branch information
sophie-zhao authored and dr2chase committed Nov 21, 2024
1 parent 6a7733a commit efe0a86
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/cmd/compile/internal/ssa/_gen/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module _gen

go 1.24

require golang.org/x/tools v0.27.0
2 changes: 2 additions & 0 deletions src/cmd/compile/internal/ssa/_gen/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
3 changes: 2 additions & 1 deletion src/cmd/compile/internal/types2/stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ func TestStdKen(t *testing.T) {

// Package paths of excluded packages.
var excluded = map[string]bool{
"builtin": true,
"builtin": true,
"cmd/compile/internal/ssa/_gen": true,
}

// printPackageMu synchronizes the printing of type-checked package files in
Expand Down
3 changes: 2 additions & 1 deletion src/go/types/stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ func TestStdKen(t *testing.T) {

// Package paths of excluded packages.
var excluded = map[string]bool{
"builtin": true,
"builtin": true,
"cmd/compile/internal/ssa/_gen": true,
}

// printPackageMu synchronizes the printing of type-checked package files in
Expand Down

0 comments on commit efe0a86

Please sign in to comment.