Skip to content

Commit 2aff10d

Browse files
committed
Update to support Go 1.27
1 parent 8472afa commit 2aff10d

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

go

Submodule go updated from e87b10e to 5ab89b0

patches/testing_patch.diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ test runs against global state. This patch introduces a per test level callback
66
test and not have state between tests interfere with each other.
77

88
diff --git a/src/testing/testing.go b/src/testing/testing.go
9-
index 3475bfca4a..074755aef1 100644
9+
index 832d9e597f..7a08341d64 100644
1010
--- a/src/testing/testing.go
1111
+++ b/src/testing/testing.go
12-
@@ -1017,6 +1017,12 @@ func (c *common) FailNow() {
12+
@@ -1110,6 +1110,12 @@ func (c *common) FailNow() {
1313
// indentation and the final newline if necessary. It prefixes the string
1414
// with the file and line of the call site.
15-
func (c *common) log(s string) {
15+
func (c *common) log(s string, isErr bool) {
1616
+ // allow encore to capture the log as well;
1717
+ // we do it here so that all the branches which result in a log message
1818
+ // during tests get captured, however we do it _before_ the lines get modified
@@ -22,7 +22,7 @@ index 3475bfca4a..074755aef1 100644
2222
s = strings.TrimSuffix(s, "\n")
2323

2424
// Second and subsequent lines are indented 4 spaces. This is in addition to
25-
@@ -1704,11 +1710,15 @@ func (t *T) Parallel() {
25+
@@ -1953,11 +1959,15 @@ func (t *T) Parallel() {
2626
}
2727
running.Delete(t.name)
2828

@@ -38,19 +38,19 @@ index 3475bfca4a..074755aef1 100644
3838
if t.chatty != nil {
3939
t.chatty.Updatef(t.name, "=== CONT %s\n", t.name)
4040
}
41-
@@ -1773,6 +1783,7 @@ var errNilPanicOrGoexit = errors.New("test executed panic(nil) or runtime.Goexit
41+
@@ -2029,6 +2039,7 @@ var errNilPanicOrGoexit = errors.New("test executed panic(nil) or runtime.Goexit
4242

4343
func tRunner(t *T, fn func(t *T)) {
4444
t.runner = callerName(0)
4545
+ encoreStartTest(t, fn)
4646

4747
// When this goroutine is done, either because fn(t)
4848
// returned normally or because a test failure triggered
49-
@@ -1780,6 +1791,7 @@ func tRunner(t *T, fn func(t *T)) {
49+
@@ -2036,6 +2047,7 @@ func tRunner(t *T, fn func(t *T)) {
5050
// a signal saying that the test is done.
5151
defer func() {
5252
t.checkRaces()
5353
+ encoreEndTest(t)
5454

55-
// TODO(#61034): This is the wrong place for this check.
56-
if t.Failed() {
55+
// Check if the test panicked or Goexited inappropriately.
56+
//

patches/version_patch.diff

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ to:
1010
`go version go1.21.0-encore darwin/arm64`
1111

1212
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
13-
index 024050c2dd..01be354b3d 100644
13+
index 78d55bec55..ad99860f33 100644
1414
--- a/src/cmd/dist/build.go
1515
+++ b/src/cmd/dist/build.go
16-
@@ -406,7 +406,8 @@ func findgoversion() string {
16+
@@ -407,7 +407,8 @@ func findgoversion() string {
1717
// its content if available, which is empty at this point.
1818
// Only use the VERSION file if it is non-empty.
1919
if b != "" {
@@ -23,12 +23,12 @@ index 024050c2dd..01be354b3d 100644
2323
}
2424
}
2525

26-
@@ -441,7 +442,7 @@ func findgoversion() string {
26+
@@ -437,7 +438,7 @@ func findgoversion() string {
2727
if m == nil {
2828
fatalf("internal/goversion/goversion.go does not contain 'const Version = ...'")
2929
}
3030
- version := fmt.Sprintf("go1.%s-devel_", m[1])
3131
+ version := fmt.Sprintf("go1.%s-devel-encore_", m[1])
32-
version += chomp(run(goroot, CheckExit, "git", "log", "-n", "1", "--format=format:%h %cd", "HEAD"))
33-
34-
// Cache version.
32+
switch {
33+
case isGitRepo():
34+
version += chomp(run(goroot, CheckExit, "git", "log", "-n", "1", "--format=format:%h %cd", "HEAD"))

0 commit comments

Comments
 (0)