• small gotcha with Go ports

    From Chris Torek@chris.torek@gmail.com to muc.lists.freebsd.ports on Mon Sep 8 04:07:55 2025
    From Newsgroup: muc.lists.freebsd.ports

    --000000000000b7239f063e483309
    Content-Type: text/plain; charset="UTF-8"

    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

    --000000000000b7239f063e483309
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div>I was having trouble (re)building devel/git-lfs and t= raced 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 t=
    o save everything first to see what changed).</div><div><br></div><div>This=
    makes me wonder if Mk/Uses/<a href=3D"http://go.mk">go.mk</a> should auto-= clean when the DISTVERSION (and/or GO_MODULE?) is changed. It&#39;s a bit b= rute-force but it matches the general behavior of most ports. Or, perhaps j= ust run `go mod tidy` earlier? We have a `go mod tidy -e` step in go-post-e= xtract, but by then it&#39;s too late. There are a bunch of failures (ignor=
    ed because of `-x`) in the `go-post-fetch` step.</div><div><br></div><div>I= &#39;m not enough of an expert on either the <a href=3D"http://go.mk">go.mk=
    </a> file or in Go itself to know where all the pitfalls might be. (Also, w=
    ith it building automatically again, I can just ignore the problem for now = :-) )</div><div><br></div><div>Chris</div></div>

    --000000000000b7239f063e483309--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Robert William Vesterman@bob@vesterman.com to muc.lists.freebsd.ports on Mon Sep 8 17:54:27 2025
    From Newsgroup: muc.lists.freebsd.ports

    This is a multi-part message in MIME format. --------------CGygEgbkivVDBZ4Zuqx1HBqh
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit

    (sorry if this doesn't thread properly in the archives - I was not
    subscribed to the list until after the post I'm responding to was written):

    I've been having problems with several go-based ports in recent days.
    Chris Torek recently posted a "small gotcha with Go ports message, and I
    tried one of his suggestions: I got rid of the "go" directory from
    DISTDIR. Everything started working. So, first, thanks, Chris!

    Second, I wanted to note a couple things about my particular situation
    which may or may not be helpful in finding and/or fixing the underlying
    cause:

    (1) I recently upgrade go from the then-latest version to the current
    latest (I think 1.23 to 1.24?).

    (2) My make.conf has a line to set the DISTDIR to a non-default location.

    Finally, links to the two Bugzilla reports I opened, in case anyone is interested in the specific errors I was getting or whatever:

    security/step-certificates: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289304

    net/rclone (but this particular sort of bug was happening for several
    other ports too): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289305



    --------------CGygEgbkivVDBZ4Zuqx1HBqh
    Content-Type: text/html; charset=UTF-8
    Content-Transfer-Encoding: 7bit

    <!DOCTYPE html>
    <html>
    <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    </head>
    <body>
    (sorry if this doesn't thread properly in the archives - I was not
    subscribed to the list until after the post I'm responding to was
    written):<br>
    <br>
    I've been having problems with several go-based ports in recent
    days. Chris Torek recently posted a "small gotcha with Go ports
    message, and I tried one of his suggestions: I got rid of the "go"
    directory from DISTDIR. Everything started working. So, first,
    thanks, Chris!<br>
    <br>
    Second, I wanted to note a couple things about my particular
    situation which may or may not be helpful in finding and/or fixing
    the underlying cause:<br>
    <br>
    (1) I recently upgrade go from the then-latest version to the
    current latest (I think 1.23 to 1.24?).<br>
    <br>
    (2) My make.conf has a line to set the DISTDIR to a non-default
    location.<br>
    <br>
    Finally, links to the two Bugzilla reports I opened, in case anyone
    is interested in the specific errors I was getting or whatever:<br>
    <br>
    security/step-certificates:
    <a class="moz-txt-link-freetext" href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289304">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289304</a><br>
    <br>
    net/rclone (but this particular sort of bug was happening for
    several other ports too):
    <a class="moz-txt-link-freetext" href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289305">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289305</a><br>
    <br>
    <br>
    <br>
    </body>
    </html>

    --------------CGygEgbkivVDBZ4Zuqx1HBqh--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.21a-Linux NewsLink 1.2