Debian Codegraph @

debian/patches/001-fix-non-go-module-support.patch

raw
1 From: =?utf-8?q?Alo=C3=AFs_Micard?= <[email protected]>
2 Date: Fri, 11 Aug 2023 16:13:05 +0800
3 Subject: Fix build without Go module
4
5 Origin: vendor
6 Forwarded: not-needed
7 Reviewed-by: Anthony Fok <[email protected]>
8 Last-Update: 2021-12-01, 2022-06-21
9
10 Originally written for panicparse 2.2.0, and refreshed for 2.3.0
11 Last-Update: 2021-12-01, 2022-06-21
12 ---
13 internal/internaltest/internaltest.go | 2 +-
14 stack/context_test.go | 12 +++---------
15 2 files changed, 4 insertions(+), 10 deletions(-)
16
17 diff --git a/internal/internaltest/internaltest.go b/internal/internaltest/internaltest.go
18 index 155353c..aa24c12 100644
19 --- a/internal/internaltest/internaltest.go
20 +++ b/internal/internaltest/internaltest.go
21 @@ -173,7 +173,7 @@ func build(tool string, race bool) string {
22 }
23 p := f.Name()
24 _ = f.Close()
25 - path := "github.com/maruel/panicparse/cmd/"
26 + path := "github.com/maruel/panicparse/v2/cmd/"
27 if IsUsingModules() {
28 path = "github.com/maruel/panicparse/v2/cmd/"
29 }
30 diff --git a/stack/context_test.go b/stack/context_test.go
31 index 1da5d03..64f97f2 100644
32 --- a/stack/context_test.go
33 +++ b/stack/context_test.go
34 @@ -1453,9 +1453,7 @@ func TestGetGOPATHs(t *testing.T) {
35 // of go modules using the "replace" statement.
36 func TestGomoduleComplex(t *testing.T) {
37 // This test cannot run in parallel.
38 - if internaltest.GetGoMinorVersion() < 11 {
39 - t.Skip("requires go module support")
40 - }
41 + t.Skip("requires go module support")
42 old := os.Getenv("GOPATH")
43 defer os.Setenv("GOPATH", old)
44 root, err := os.MkdirTemp("", "stack")
45 @@ -1833,9 +1831,6 @@ func testPanicMismatched(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir strin
46 t.Fatalf("output: %q", b.String())
47 }
48 ver := "/v2"
49 - if !internaltest.IsUsingModules() {
50 - ver = ""
51 - }
52 want := []*Goroutine{
53 {
54 Signature: Signature{
55 @@ -2006,9 +2001,6 @@ func testPanicUTF8(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
56 t.Fatalf("output: %q", b.String())
57 }
58 ver := "/v2"
59 - if !internaltest.IsUsingModules() {
60 - ver = ""
61 - }
62 want := []*Goroutine{
63 {
64 Signature: Signature{
65 @@ -2043,6 +2035,8 @@ func testPanicUTF8(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
66 // "net" package causes a background thread to be started, which breaks "panic
67 // asleep".
68 func TestPanicweb(t *testing.T) {
69 + t.Skip("TODO: add upstream link")
70 +
71 t.Parallel()
72 if runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" {
73 t.Skip("https://github.com/maruel/panicparse/issues/66")