From 53e9d3ee100e0cf54d18eeae09dda6e09a29d090 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Fri, 18 Dec 2020 13:20:56 -0500 Subject: [PATCH] =?UTF-8?q?panic:=20rename=20cmd/panic/internal/=C3=B9tf8?= =?UTF-8?q?=20to=20utf8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This slightly change "panic utf8" output. Package path with unicode is officially not supported in go1.16. It was only mostly working before but with go1.16 it'll be hard broken. https://github.com/golang/go/issues/43052 Tested with go @ tag go1.16beta1. Confirmed the package do not compile without this fix. --- .../panic/internal/utf8/\303\271tf8.go" | 0 cmd/panic/main.go | 2 +- stack/context_test.go | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename "cmd/panic/internal/\303\271tf8/\303\271tf8.go" => "cmd/panic/internal/utf8/\303\271tf8.go" (100%) diff --git "a/cmd/panic/internal/\303\271tf8/\303\271tf8.go" "b/cmd/panic/internal/utf8/\303\271tf8.go" similarity index 100% rename from "cmd/panic/internal/\303\271tf8/\303\271tf8.go" rename to "cmd/panic/internal/utf8/\303\271tf8.go" diff --git a/cmd/panic/main.go b/cmd/panic/main.go index e86e785..ba0e105 100644 --- a/cmd/panic/main.go +++ b/cmd/panic/main.go @@ -37,7 +37,7 @@ import ( "github.com/maruel/panicparse/v2/cmd/panic/internal" correct "github.com/maruel/panicparse/v2/cmd/panic/internal/incorrect" - "github.com/maruel/panicparse/v2/cmd/panic/internal/ùtf8" + ùtf8 "github.com/maruel/panicparse/v2/cmd/panic/internal/utf8" ) func main() { diff --git a/stack/context_test.go b/stack/context_test.go index b6e56da..608f012 100644 --- a/stack/context_test.go +++ b/stack/context_test.go @@ -1822,11 +1822,11 @@ func testPanicUTF8(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) { // This is important to note here the inconsistency in the Go // runtime stack generator. The path is escaped, but symbols are // not. - "github.com/maruel/panicparse"+ver+"/cmd/panic/internal/%c3%b9tf8.(*Strùct).Pànic", + "github.com/maruel/panicparse"+ver+"/cmd/panic/internal/utf8.(*Strùct).Pànic", Args{Values: []Arg{{Value: 0xc0000b2e48, IsPtr: true}}}, // See TestCallUTF8 in stack_test.go for exercising the methods on // Call in this situation. - pathJoin(ppDir, "internal", "ùtf8", "ùtf8.go"), + pathJoin(ppDir, "internal", "utf8", "ùtf8.go"), 10), newCallLocal("main.glob..func19", Args{}, pathJoin(ppDir, "main.go"), 322), newCallLocal("main.main", Args{}, pathJoin(ppDir, "main.go"), 340),