[bug#67503,0/2] Improvements to the go importer

Message ID cover.1701166089.git.efraim@flashner.co.il
Headers
Series Improvements to the go importer |

Message

Efraim Flashner Nov. 28, 2023, 10:18 a.m. UTC
I had intended to do some go packaging but found myself working on the
go importer instead.

According to the upstream go documentation, go.mod IS supposed to list
the indirect dependencies so that when someone runs 'go build' or 'go
install' all the dependencies are already listed.  For us, the indirect
dependencies are already listed as propagated-inputs for the packages
which actually use them.

For the second patch I'm not super happy about using 'second' (yes,
(flatten (go.mod-directives go.mod 'go)) does return (version "1.18"))
but I couldn't find a nice way to return just the version string, and it
seemed better than cadr.  Using version>? was the simplest way to do the
version compare, but I can copy the logic over if we'd rather not import
(guix utils).

Efraim Flashner (2):
  guix: import: Don't include indirect dependencies in go.
  guix: import: Report go version for go importer.

 guix/import/go.scm | 37 +++++++++++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 6 deletions(-)


base-commit: 62376e3eb67644454bc655bed56be4be965bd13e
  

Comments

Steve George Oct. 31, 2024, 1:39 p.m. UTC | #1
Hi,

Bumping this as a reminder ...
Unsure if go-team was on the original submission.

Futurile / Steve
  
Sharlatan Hellseher Dec. 8, 2024, 6 p.m. UTC | #2
Hi,

It looks like current go importer has that implementation.
What's missing is updater which is awere about pseudo
golang version and workspace specific tag (subdirs/v1.2.3).

--
Thanks,
Oleg