Bug 255205 - Mk/Uses/go.mk: Fails to find a particular Go module
Summary: Mk/Uses/go.mk: Fails to find a particular Go module
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitri Goutnik
Depends on:
Reported: 2021-04-19 03:55 UTC by Yuri Victorovich
Modified: 2021-04-19 04:10 UTC (History)
1 user (show)

See Also:

Makefile (341 bytes, text/plain)
2021-04-19 03:55 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2021-04-19 03:55:11 UTC
Created attachment 224238 [details]

Please see the attached Makefile.

It fails for an unobvious reason:
> # get https://sum.golang.org/lookup/github.com/kr/pty@v1.1.1: 200 OK (0.016s)
> # get https://sum.golang.org/lookup/github.com/kisielk/gotool@v1.0.0: 200 OK (0.016s)
> go: github.com/xtaci/smux@v1.3.3 (replaced by ./vendor/github.com/xtaci/smux): reading vendor/github.com/xtaci/smux/go.mod: open /disk-samsung/freebsd-ports/distfiles/go/misc_sia/sia-v1.5.6/vendor/github.com/xtaci/smux/go.mod: no such file or directory
> *** Error code 1

Same fails when modules2tuple is used.
Comment 1 Dmitri Goutnik freebsd_committer 2021-04-19 04:10:12 UTC
(In reply to Yuri Victorovich from comment #0)

To allow ports to apply local patched, go.mk vendors all deps listed in go.mod. For this particular port this causes a conflict because there's already ./vendor/github.com/xtaci/smux in the upstream sources.

This will need to be worked around somehow, perhaps by temporarily renaming upstream ./vendor/github.com/xtaci/smux.