Package: golang-github-manyminds-api2go
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu jammy ubuntu-patch

Dear Maintainer,

This package currently FTBFS with Go 1.18 due to some unused variables

In Ubuntu, the attached patch was applied to achieve the following:

  * Fix FTBFS with Go 1.18


Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy
  APT policy: (500, 'jammy')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-22-generic (SMP w/32 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru 
golang-github-manyminds-api2go-1.0-RC4/debian/patches/fix-ftbfs-with-go1.18.patch
 
golang-github-manyminds-api2go-1.0-RC4/debian/patches/fix-ftbfs-with-go1.18.patch
--- 
golang-github-manyminds-api2go-1.0-RC4/debian/patches/fix-ftbfs-with-go1.18.patch
   1969-12-31 18:00:00.000000000 -0600
+++ 
golang-github-manyminds-api2go-1.0-RC4/debian/patches/fix-ftbfs-with-go1.18.patch
   2022-03-16 13:37:17.000000000 -0500
@@ -0,0 +1,54 @@
+Description: Fix FTBFS with Go 1.18
+ Go 1.18 is more strict about unused variables. There are some
+ unused variables in this package that have already been deleted
+ in the upstream repository
+Origin: upstream, 
https://github.com/GlenPickle/api2go/commit/4e34a06d27e6b961326cf75238250e3d03530aab
+Applied-Upstream: 
https://github.com/GlenPickle/api2go/commit/4e34a06d27e6b961326cf75238250e3d03530aab
+Last-Update: 2022-03-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: golang-github-manyminds-api2go-1.0-RC4/api_interfaces_test.go
+===================================================================
+--- golang-github-manyminds-api2go-1.0-RC4.orig/api_interfaces_test.go
++++ golang-github-manyminds-api2go-1.0-RC4/api_interfaces_test.go
+@@ -414,14 +414,13 @@
+       var (
+               api                *API
+               rec                *httptest.ResponseRecorder
+-              payload, payloadID SomeData
++              payload             SomeData
+       )
+ 
+       BeforeEach(func() {
+               api = NewAPI("v1")
+               api.AddResource(SomeData{}, ResourceDeletionOnly{})
+               rec = httptest.NewRecorder()
+-              payloadID = SomeData{ID: "12345", Data: "A Brezzn"}
+               payload = SomeData{Data: "A Brezzn"}
+       })
+ 
+Index: golang-github-manyminds-api2go-1.0-RC4/api_test.go
+===================================================================
+--- golang-github-manyminds-api2go-1.0-RC4.orig/api_test.go
++++ golang-github-manyminds-api2go-1.0-RC4/api_test.go
+@@ -1052,7 +1052,6 @@
+       Context("marshal errors correctly", func() {
+               var (
+                       source    *fixtureSource
+-                      post1Json map[string]interface{}
+ 
+                       api *API
+                       rec *httptest.ResponseRecorder
+@@ -1063,12 +1062,6 @@
+                               "1": {ID: "1", Title: "Hello, World!"},
+                       }, false}
+ 
+-                      post1Json = map[string]interface{}{
+-                              "id":    "1",
+-                              "title": "Hello, World!",
+-                              "value": nil,
+-                      }
+-
+                       api = NewAPI("")
+                       api.AddResource(Post{}, source)
+ 
diff -Nru golang-github-manyminds-api2go-1.0-RC4/debian/patches/series 
golang-github-manyminds-api2go-1.0-RC4/debian/patches/series
--- golang-github-manyminds-api2go-1.0-RC4/debian/patches/series        
1969-12-31 18:00:00.000000000 -0600
+++ golang-github-manyminds-api2go-1.0-RC4/debian/patches/series        
2022-03-16 13:35:20.000000000 -0500
@@ -0,0 +1 @@
+fix-ftbfs-with-go1.18.patch

Reply via email to