All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Juergen Landwehr" <juergen.landwehr@gmx.de>
To: yocto@lists.yoctoproject.org
Subject: #golang: go fetches dependencies in compile phase
Date: Mon, 12 Apr 2021 01:30:23 -0700	[thread overview]
Message-ID: <1289.1618216223180826737@lists.yoctoproject.org> (raw)
In-Reply-To: <AM9PR09MB46420D57B3A259C05C385EBEA8739@AM9PR09MB4642.eurprd09.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

Hello Konrad,

thanks for your reply.

It is interesting that you mention vendoring, because we tried this approach as well. We started to develop a "go-mod-vendor.bbclass", which retrieves the
application source code in "do_fetch_append" and then calls "go mod vendor".

The big problem was, that in that phase there is not yet a go executable available for the recipe, so we downloaded our own go version, which makes this approach a bit ugly.

But there is already a go version installed on the build host, right? In "poky/meta/recipes-devtools/go" I found a "go-native_1.14.bb" recipe.
So can we use this go exectuable somehow by adding a dependency (e.g. DEPENDS="go-native") and then use a path to the go exectuable that is guaranteed to work?

The other alternative (defining a recipe for each dependent go module) sounds really painful. Especially as we have quite a few dependencies, which have dependencies as well.
I see the point, that doing it that way makes it more visible and more Yocto like, but thinking about it gives me headaches already :)

Thanks again.

[-- Attachment #2: Type: text/html, Size: 1158 bytes --]

  reply	other threads:[~2021-04-12  8:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 13:53 #golang: go fetches dependencies in compile phase juergen.landwehr
2021-04-09 15:19 ` [yocto] " Konrad Weihmann
2021-04-12  8:30   ` Juergen Landwehr [this message]
2021-04-12  9:00 ` Robert Berger
2021-04-12 11:47   ` Juergen Landwehr
2021-04-12 12:21     ` [yocto] " Alexander Kanavin
2021-04-12 14:01       ` Juergen Landwehr
2021-04-12 14:24         ` [yocto] " Alexander Kanavin
2021-04-14 19:30     ` Robert Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289.1618216223180826737@lists.yoctoproject.org \
    --to=juergen.landwehr@gmx.de \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.