unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Leo Famulari" <leo@famulari.name>
To: "Marek Paśnikowski" <marek@marekpasnikowski.pl>,
	"znavko--- via" <help-guix@gnu.org>
Subject: Re: Go build system - build from local directory fails
Date: Mon, 23 Dec 2024 15:44:26 -0500	[thread overview]
Message-ID: <50a690f8-6259-4efb-87d5-37365a00180e@app.fastmail.com> (raw)
In-Reply-To: <6136144.lOV4Wx5bFT@ayase>

On Sun, Dec 22, 2024, at 01:12, Marek Paśnikowski wrote:
> This is exactly it.  You always must supply the #:import-path in Go build 
> system.
>
> This path is vital to the operation of the build system, as it adapts Go build 
> environment to Guix environment.  This path matches the name of the currently 
> built module.
>
> In practice, it is the string that follows the 'module' keyword in go.mod 
> files.
>
> I do not know the theory behind this coupling.

There is not much theory behind it.

At the time we made the go-build-system, the process of building Go packages was different from how it is today. For example, Go modules had not been invented yet.

Additionally, those of us who made the go-build-system were not Go programmers and did not (and still do not) have a strong understanding of how Go software is built. 

But, the import path was critical for building a Go codebase at that time. It was (is?) the actual "name" of the software, and is generally equivalent to the canonical URI from where the code is fetched. An unusual choice but it was the choice made by the Go team.

Overall, Guix's Go build system is due for a complete overhaul by people who actually understand Go idioms.


      reply	other threads:[~2024-12-23 20:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 11:01 Go build system - build from local directory fails Marc
2024-12-22  6:12 ` Marek Paśnikowski
2024-12-23 20:44   ` Leo Famulari [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=50a690f8-6259-4efb-87d5-37365a00180e@app.fastmail.com \
    --to=leo@famulari.name \
    --cc=help-guix@gnu.org \
    --cc=marek@marekpasnikowski.pl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).