Bug 277203

Summary: devel/go-wire: update to 0.6.0
Product: Ports & Packages Reporter: Denis Shaposhnikov <dsh>
Component: Individual Port(s)Assignee: Nuno Teixeira <eduardo>
Status: Closed FIXED    
Severity: Affects Only Me CC: drtr0jan, eduardo, peterj
Priority: --- Flags: drtr0jan: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/google/wire/releases/tag/v0.6.0
Attachments:
Description Flags
update devel/go-wire to 0.6.0 none

Description Denis Shaposhnikov 2024-02-20 20:11:30 UTC
Created attachment 248649 [details]
update devel/go-wire to 0.6.0

This patch updates devel/go-wire to 0.6.0:

https://github.com/google/wire/releases/tag/v0.6

Fix build with added patch, which actually adds `# explicit; go 1.18`:

```
 # golang.org/x/tools v0.17.0
+## explicit; go 1.18
```

without it we are getting errors:

```
vendor/golang.org/x/tools/internal/event/keys/util.go:14:11: type parameter requires go1.18 or later (-lang was set to
.16; check go.mod)
vendor/golang.org/x/tools/internal/event/keys/util.go:14:13: embedding interface element ~[]T requires go1.18 or later
ang was set to go1.16; check go.mod)
vendor/golang.org/x/tools/internal/event/keys/util.go:14:21: embedding interface element ~string requires go1.18 or la
(-lang was set to go1.16; check go.mod)
vendor/golang.org/x/tools/internal/event/keys/util.go:15:32: invalid argument: s (variable of type S constrained by ~[]T) for len
vendor/golang.org/x/tools/internal/event/keys/util.go:16:20: cannot range over s (variable of type S constrained by ~[]T): no core type
vendor/golang.org/x/tools/internal/versions/types.go:15:16: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
```

See https://github.com/golang/go/issues/54908 for more details.
Comment 1 Boris Korzun 2024-02-20 21:10:53 UTC
Hi Denis,

what do you think, isn't needed to open the issue on a upstream (github.com/google/wire)?
Comment 2 Denis Shaposhnikov 2024-02-20 22:11:50 UTC
(In reply to Boris Korzun from comment #1)
It would be best option, but I just can't imagine what exactly we'll ask. Will we ask them bump go version just because we have troubles with building it using FreeBSD port system?

OK, I created the issue:

https://github.com/google/wire/issues/404

I see https://github.com/google/wire is stagnating, so I'm not expecting this issue will be resolved upstream. I'd suggest apply my patch, until upstream resolve it.
Comment 3 Boris Korzun 2024-02-21 07:39:06 UTC
Comment on attachment 248649 [details]
update devel/go-wire to 0.6.0

Tested, approved. LGTM.
Comment 4 Peter Jeremy freebsd_committer freebsd_triage 2024-04-20 23:59:15 UTC
I would also support this patch being applied - both because the patch works and because I am seeing consistent nil pointer exceptions with v0.5.0
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-04-27 17:19:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4a50205f7319db89a7bad1483cdd5ff5a914a412

commit 4a50205f7319db89a7bad1483cdd5ff5a914a412
Author:     Denis Shaposhnikov <dsh@bamus.cz>
AuthorDate: 2024-04-27 17:16:03 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-04-27 17:19:27 +0000

    devel/go-wire: Update to 0.6.0

    Fix build with added patch, which actually adds `# explicit; go 1.18`:

    ```
     # golang.org/x/tools v0.17.0
    +## explicit; go 1.18
    ```

    ChangeLog:      https://github.com/google/wire/releases/tag/v0.6.0
    PR:             277203

 devel/go-wire/Makefile                             |  3 +--
 devel/go-wire/distinfo                             | 10 +++++-----
 devel/go-wire/files/patch-vendor_modules.txt (new) | 10 ++++++++++
 3 files changed, 16 insertions(+), 7 deletions(-)
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2024-04-27 17:21:17 UTC
Committed, thanks!