unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#74370] [PATCH 0/4] Module aware go build system, downloader
@ 2024-11-15 21:11 Jørgen Kvalsvik
  2024-11-15 21:11 ` [bug#74372] [PATCH 1/4] guix: Add go module fetcher Jørgen Kvalsvik
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jørgen Kvalsvik @ 2024-11-15 21:11 UTC (permalink / raw)
  To: 74370; +Cc: Jørgen Kvalsvik

Hi all,

I wrote a downloader+build system for go that is module aware.  It
builds on a few slightly different assumptions than the go build system,
but if you have worked on that most should feel familiar. I am posting
these patches to get some feedback and to check with you if this
approach is even viable, or if I should abandon it altogether. My real
goal has been to build hugo, a popular website generator, which has a
large list of dependencies, most of them in go.

Go itself has pretty strong ideas on how to compose systems. In
particular, it wants to statically link everything, pin every dependency
and transitive dependency (combining build system with packaging and
distribution), and strongly prefer full-source builds. This causes some
friction.

These patches chooses to just roll with it, and uses go mod
downloaditself to fetch sources and create a large image of all the
dependencies a project needs to build. This effectively makes it
pointless to package libraries, as the programs using the libraries
would get them from source anyway, but fixing that is future work.

There are a few things I would like to try to do (re-using built
libraries and storing each module in a separate derivation in
particular), but I don't want to tackle that problem unless there is
real interest for this approach.

Thoughts?

Jørgen Kvalsvik (4):
  guix: Add go module fetcher
  guix: add go module aware build system
  guix: Add module aware 'guix import go'
  gnu: Add go-buf.

 Makefile.am                        |   2 +
 gnu/packages/golang-xyz.scm        |  63 +++++++++---
 guix/build-system/go.scm           | 120 ++++++++++++++++++++++
 guix/build/go-mod-build-system.scm | 154 +++++++++++++++++++++++++++++
 guix/go-mod-download.scm           | 146 +++++++++++++++++++++++++++
 guix/import/go.scm                 |  88 ++++++++++-------
 guix/scripts/import/go.scm         |   6 ++
 7 files changed, 532 insertions(+), 47 deletions(-)
 create mode 100644 guix/build/go-mod-build-system.scm
 create mode 100644 guix/go-mod-download.scm


base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f
-- 
2.39.5





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-15 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 21:11 [bug#74370] [PATCH 0/4] Module aware go build system, downloader Jørgen Kvalsvik
2024-11-15 21:11 ` [bug#74372] [PATCH 1/4] guix: Add go module fetcher Jørgen Kvalsvik
2024-11-15 21:11 ` [bug#74374] [PATCH 2/4] guix: add go module aware build system Jørgen Kvalsvik
2024-11-15 21:11 ` [bug#74371] [PATCH 3/4] guix: Add module aware 'guix import go' Jørgen Kvalsvik
2024-11-15 21:11 ` [bug#74373] [PATCH 4/4] gnu: Add go-buf Jørgen Kvalsvik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).