small gotcha with Go ports
Chris Torek <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.ports |
|---|---|
| Message-ID | <CAPx1GvfG=FtJzMME5SQaGN0QSYuM=zLKmczxQ7Noo5XaRhkLww@mail.gmail.com> |
I was having trouble (re)building devel/git-lfs and traced it to the fact that the vendored module imports were out of date (so `make distclean` from the port, or removing the appropriate distfiles `go/` subdirectory, made it build correctly unattended again - though I failed to save everything first to see what changed). This makes me wonder if Mk/Uses/go.mk should auto-clean when the DISTVERSION (and/or GO_MODULE?) is changed. It's a bit brute-force but it matches the general behavior of most ports. Or, perhaps just run `go mod tidy` earlier? We have a `go mod tidy -e` step in go-post-extract, but by then it's too late. There are a bunch of failures (ignored because of `-x`) in the `go-post-fetch` step. I'm not enough of an expert on either the go.mk file or in Go itself to know where all the pitfalls might be. (Also, with it building automatically again, I can just ignore the problem for now :-) ) Chris