Skip to content

Commit 95bad65

Browse files
authored
Avoid unicode filename (#78)
This is similar to 53e9d3e. Over at https://github.com/cockroachdb/cockroach, we use bazel and it chokes on this file: ``` java.io.IOException: Error extracting [...]/com_github_maruel_panicparse_v2-v2.2.1.zip to [...]: [...]/com_github_maruel_panicparse_v2/cmd/panic/internal/utf8/?tf8.go (Illegal byte sequence) ``` which is why we're on a fork so far. It would be nice to avoid this. There is an (eternal, it seems) [upstream discussion], so there is little home of bazel starting to support non-unicode filenames. [upstream discussion]: bazelbuild/bazel#374
1 parent c579e89 commit 95bad65

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// that can be found in the LICENSE file.
44

55
// Package ùtf8 tests a package and function with non-ASCII names.
6+
//
7+
// The filename itself does not contain unicode as this causes issues
8+
// importing panicparse under bazel. For more context, see PR #78.
69
package ùtf8
710

811
// Strùct is a totally normal structure with a totally normal name.

stack/context_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ func testPanicUTF8(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
20232023
),
20242024
// See TestCallUTF8 in stack_test.go for exercising the methods on
20252025
// Call in this situation.
2026-
pathJoin(ppDir, "internal", "utf8", "ùtf8.go"),
2026+
pathJoin(ppDir, "internal", "utf8", "utf8.go"),
20272027
10),
20282028
newCallLocal("main.glob..func21", Args{}, pathJoin(ppDir, "main.go"), 322),
20292029
newCallLocal("main.main", Args{}, pathJoin(ppDir, "main.go"), 340),

stack/stack_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ func TestCallPkg(t *testing.T) {
163163
// See testPanicUTF8 in context_test.go.
164164
name: "UTF8",
165165
f: "github.com/maruel/panicparse/cmd/panic/internal/%c3%b9tf8.(*Strùct).Pànic",
166-
s: "/gpremote/src/github.com/maruel/panicparse/cmd/panic/internal/ùtf8/ùtf8.go",
167-
DirSrc: pathJoin("ùtf8", "ùtf8.go"),
168-
SrcName: "ùtf8.go",
169-
LocalSrcPath: "/gplocal/src/github.com/maruel/panicparse/cmd/panic/internal/ùtf8/ùtf8.go",
170-
RelSrcPath: "github.com/maruel/panicparse/cmd/panic/internal/ùtf8/ùtf8.go",
166+
s: "/gpremote/src/github.com/maruel/panicparse/cmd/panic/internal/ùtf8/utf8.go",
167+
DirSrc: pathJoin("ùtf8", "utf8.go"),
168+
SrcName: "utf8.go",
169+
LocalSrcPath: "/gplocal/src/github.com/maruel/panicparse/cmd/panic/internal/ùtf8/utf8.go",
170+
RelSrcPath: "github.com/maruel/panicparse/cmd/panic/internal/ùtf8/utf8.go",
171171
ImportPath: "github.com/maruel/panicparse/cmd/panic/internal/ùtf8",
172172
Location: GOPATH,
173173
},

0 commit comments

Comments
 (0)