diff --git a/.gitignore b/.gitignore index 9d14fb7..d293c5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /avo-0.4.0.tar.gz /avo-0.5.0.tar.gz +/avo-0.6.0.tar.gz diff --git a/dcba6827a0d2e3d52a41121a803f6364e7672a42.patch b/dcba6827a0d2e3d52a41121a803f6364e7672a42.patch deleted file mode 100644 index ac8a541..0000000 --- a/dcba6827a0d2e3d52a41121a803f6364e7672a42.patch +++ /dev/null @@ -1,58 +0,0 @@ -From dcba6827a0d2e3d52a41121a803f6364e7672a42 Mon Sep 17 00:00:00 2001 -From: Michael McLoughlin -Date: Sun, 5 Mar 2023 11:51:11 -0800 -Subject: [PATCH] gotypes: handle change in error message in go 1.20 - -Uses a regular expression to handle the change in error message -introduced in: - -https://github.com/golang/go/commit/2da95e0ec80cb7df1f89a7b7f147dde42ad17a19 - -Updates #367 ---- - gotypes/signature_test.go | 21 +++++++++++++-------- - 1 file changed, 13 insertions(+), 8 deletions(-) - -diff --git a/gotypes/signature_test.go b/gotypes/signature_test.go -index 03f8e9b3..ffb80a9d 100644 ---- a/gotypes/signature_test.go -+++ b/gotypes/signature_test.go -@@ -3,7 +3,7 @@ package gotypes - import ( - "go/token" - "go/types" -- "strings" -+ "regexp" - "testing" - - "golang.org/x/tools/go/packages" -@@ -118,17 +118,22 @@ func TestParseSignature(t *testing.T) { - - func TestParseSignatureErrors(t *testing.T) { - cases := []struct { -- Expr string -- ErrorContains string -+ Expr string -+ ErrorPattern string - }{ -- {"idkjklol", "undeclared name"}, -- {"struct{}", "not a function signature"}, -- {"uint32(0xfeedbeef)", "should have nil value"}, -+ {"idkjklol", `(undeclared|undefined)`}, -+ {"struct{}", `not a function signature`}, -+ {"uint32(0xfeedbeef)", `should have nil value`}, - } - for _, c := range cases { -+ errrx, err := regexp.Compile(c.ErrorPattern) -+ if err != nil { -+ t.Fatal(err) -+ } -+ - s, err := ParseSignature(c.Expr) -- if s != nil || err == nil || !strings.Contains(err.Error(), c.ErrorContains) { -- t.Errorf("expect error from expression %s\ngot: %s\nexpect substring: %s\n", c.Expr, err, c.ErrorContains) -+ if s != nil || err == nil || !errrx.MatchString(err.Error()) { -+ t.Errorf("expect error from expression %s\ngot: %s\nexpect match: %s\n", c.Expr, err, c.ErrorPattern) - } - } - } diff --git a/golang-github-mmcloughlin-avo.spec b/golang-github-mmcloughlin-avo.spec index e8d0da7..66832d3 100644 --- a/golang-github-mmcloughlin-avo.spec +++ b/golang-github-mmcloughlin-avo.spec @@ -1,4 +1,4 @@ -# Generated by go2rpm 1.9.0 +# Generated by go2rpm 1.10.0 %ifarch x86_64 %bcond_without check %endif @@ -6,9 +6,10 @@ # https://github.com/mmcloughlin/avo %global goipath github.com/mmcloughlin/avo -Version: 0.5.0 +Version: 0.6.0 + +%gometa -L -%gometa %global common_description %{expand: Generate x86 Assembly with Go.} @@ -16,17 +17,13 @@ Generate x86 Assembly with Go.} %global golicenses LICENSE %global godocs examples README.md -Name: %{goname} +Name: golang-github-mmcloughlin-avo Release: %autorelease Summary: Generate x86 Assembly with Go License: BSD-3-Clause URL: %{gourl} Source: %{gosource} -# https://github.com/mmcloughlin/avo/pull/375/ -# https://github.com/mmcloughlin/avo/commit/dcba6827a0d2e3d52a41121a803f6364e7672a42.patch -# required for golang-1.20 -Patch: dcba6827a0d2e3d52a41121a803f6364e7672a42.patch %description %{common_description} @@ -44,7 +41,7 @@ Patch: dcba6827a0d2e3d52a41121a803f6364e7672a42.patch %if %{with check} %check -%gocheck +%gocheck -d gotypes %endif %gopkgfiles diff --git a/sources b/sources index 7a8fc19..32a9bfb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (avo-0.5.0.tar.gz) = c91fc8002f7dd0587490dfeb6e414e553102ebce3aeb4922dd19f58858cedd11c19caa0c64494ba82a8da8921ca61fae2c3d436449b8e8b71788954228ba5e36 +SHA512 (avo-0.6.0.tar.gz) = b0d3889a493b0ac6c348971c756b14de54b6cec5bc7e6e1bdd0486b024a6c34c9c0e62c3ec3f5151c6ee1b12ef58cc3f71c1038201c4607262b0662269082e70