guix import go package definition is not valid

  • Done
  • quality assurance status badge
Details
2 participants
  • MSavoritias
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
MSavoritias
Severity
normal

Debbugs page

MSavoritias wrote 3 months ago
(address . guix-patches@gnu.org)
d971cdc3-b960-49e7-93a3-6393fc0e5b64@msavoritias.me
Doing:

@localhost ~$ guix import go code.forgejo.org/f3/gof3/v3
guix import: Importing package "code.forgejo.org/f3/gof3/v3"...
guix import: varoitus: Unable to determine repository root of
'code.forgejo.org/f3/gof3'. Guessing 'code.forgejo.org/f3/gof3'.
(define-public go-code-forgejo-org-f3-gof3
  (package
    (name "go-code-forgejo-org-f3-gof3")
    (version "3.10.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://code.forgejo.org/f3/gof3.git")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1ysqlj5aa7bhsyghzhycngg45wclc1j2yhq1l27d5crb0pq0wfwg"))))
    (build-system go-build-system)
    (arguments
     (list
      #:go 1.22
      #:import-path "code.forgejo.org/f3/gof3/v3"
      #:unpack-path "code.forgejo.org/f3/gof3"))
    (propagated-inputs (list go-golang-org-x-crypto
                             go-github-com-xanzy-go-gitlab
                             go-github-com-urfave-cli-v2
                             go-github-com-stretchr-testify
go-github-com-santhosh-tekuri-jsonschema-v6
                             go-github-com-hashicorp-go-version
                             go-github-com-google-go-cmp
                             go-github-com-davidmz-go-pageant
                             go-github-com-42wim-httpsig))
    (synopsis "gof3")
    (description
     "As a CLI or as a library, @code{GoF3} provides a single
operation: mirroring.
The origin and destination are designated by the URL of a forge and a
path to
the resource.  For instance, @@code{mirror --from-type forgejo --from
/some/directory}
will mirror a project in a local directory using the F3 format.")
    (license license:expat)))

This package definition is not valid.

#:go 1.22 should be written like #:go go-1.22

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1 (expecting
struct): 1.22


MSavoritias
Sharlatan Hellseher wrote 3 months ago
(address . 74992@debbugs.gnu.org)
87ttaxoqk9.fsf@gmail.com
Hi MSavoritias,

Thank you for reporting that!

It's known issue with importer which might need some after math manual
adjustment anyway (check license, check synopsis, check description,
check native/propagated inputs) which are not 100% accurate.

Summing all above adjust #go to correct one or remove it completely (the
current build go version is 1.21), should be not a big deal.

But, you may improve it! Take a look at the importer's code and maybe
implement the adjustment, WDYT?

--
Oleg,
go-team
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmdmBIYACgkQdtcnv/Ys
0rW+nhAAnST1HrPx4ud7g6ONQyNIwGSCywmir/1Yj4n+ZHD+sS01h2G+tp0y5UIF
irykLKgv3YauJ+bnqzpYytXsdMSMDO2EKV25g1e/+0429Ra0yldClOQezQEEza+H
iNbG/tkVpO7Pp+KjVz2/j80+2bL3Cl6Mfb3GNfjcaytgQZ38oacrMKIDwoghNO6r
LjrJu81uh7WC5BPW+hn0432aK54AcO6zN+/HeHzCny0PW2CqoEDIOj/Sm5wyuYik
IVZiFBanLJokYUUhS1KzFngMTzm3DEr2JnCy37nk4HbfkBDisC0YFbcuzdSWAcYR
YsT+t6fQipHl7DD3i2macLt8P/kSZgbLPMXZXASSDBxRzB+J0eJ39riy/49+Y0bG
6jMUizdiLGPj5pY5h/SusfyzO1wmuLEfGH01oqjaOoSXTUSvIeOpXKOnRzxTXmH+
+7AR/vB76rrslQgjvXEEgdNnECP+iHCxfMWkYBAFeO2Ev+FwjVWM0lN64tOILI6I
JXL6SS6roGMbWVsu8s1fWMsfOu5UWzF5fr69bITJMh53RIi/glSgr5zl47nLjcJs
iDg1zUjd1bR0kAh4DYiKxJJlOMoNMbj8r8cMyv3ZUu8ASPqr2bCVJMQwFpaWM8r3
nZDCBKyRVmvtTfkCVPVyFASHaVW1qFK55hvVMuWDGjfsLYdfyJo=
=zTmd
-----END PGP SIGNATURE-----

Sharlatan Hellseher wrote 3 months ago
(address . 74992@debbugs.gnu.org)
CAO+9K5oAwj5a6t2kKpCqo3GQzs2R+xtvZ+NKDVW2c_RVXJKH4A@mail.gmail.com
This is that part of importer which produces the guess:

,@(if (version>? min-go-version (package-version (go-package)))
`(#:go ,(string->number min-go-version))
'())
Attachment: file
Sharlatan Hellseher wrote 3 months ago
[PATCH] import/go: Fix #:go formation.
(address . 74992@debbugs.gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
18f7d731f7d9e3f3003cf9ef4f8d9aca5b7c8a90.1734922057.git.sharlatanus@gmail.com
Reported by MSavoritias <email@msavoritias.me> in #74992 "guix import go
package definition is not valid". This change fixes it: instead of
"#:go 1.22" will produce "#:go go-1.22".

* guix/import/go.scm (go-module->guix-package): Fix format for #:go key
argument.

Change-Id: I9db0688b8e2970f5e90b415966d39b45505b7c8e
---
guix/import/go.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/guix/import/go.scm b/guix/import/go.scm
index 32cba25b33..915846bed1 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -704,7 +704,9 @@ (define* (go-module->guix-package module-path #:key
(build-system go-build-system)
(arguments
(list ,@(if (version>? min-go-version (package-version (go-package)))
- `(#:go ,(string->number min-go-version))
+ `(#:go ,(string->symbol
+ (format #f "go-~a"
+ (string->number min-go-version))))
'())
#:import-path ,module-path
,@(if (string=? module-path root-module-path)

base-commit: 30fdffc4b5605431b28a23b03330e850b2184a76
--
2.46.0
Sharlatan Hellseher wrote 3 months ago
(no subject)
(address . 74992@debbugs.gnu.org)(address . poptsov.artyom@gmail.com)(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87ldw6oi33.fsf@gmail.com
CC interested guixers

This change is a quite trivial but would improve large scale import task.

I need to fix the package variable formation as well, where the
#:import-path contain /v[0-9] suffix.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmdpL3AACgkQdtcnv/Ys
0rVThRAA0BkaOMGZd0EM38tM1ZulDUDdNvHT5xUCZyuCyjiHkz8ufrbaRpTRNn4O
ERTZ4BUY4qFx8ki/vsOLig6bIFnVEvB1xZWkZ9M2ZggcXpk5D0yuOoZRXhiAVbcE
Zi4bzPSYJz/tP5mH6OJdlPIRHlnMrlZFUM27RoP6UKFJUlSaRsgQoBqk7J0Xp87u
RmTe0ZGLXXqvfMehqJtDSU2uCfwpm7J+UqwLQfh5QxLwt3YGJBOKl4U7anTz6W5t
zbcXxVeXJRXUROGdmUtpeWoaBLEMBkkw+VF2QNglfMwoi4S7iK33SwhMi48iEI5x
0K2uFRbDWMfoiyRenV3WYRXL4cY/Ykkf6fwQKDd5xvSeghPfYUqNJWIwjEqIXVCt
nHyLMO2kZ1YYqEkvVG8PaELTl8JFEntikVKVGpmAeNrdB7JTeThN4ldkKYjkfKAZ
EAtm3256BkQggg96ROglLHvsfdowQXBHS9mvxQBt0RCBXAE3IwTHKmNjBa2BBduX
67/rQXTfsyvKVwe7pWYyO0zJABxg8vxtZV+AapeWW9HbEKf7Ibt2soFB5e1lbqr3
jlCk7z5WsV+87qa09D8jxH73tkTtLcEZ5f3cyTEXerWva3ZMpqMA4sRExFn/6Y/c
sdKiF8HVE0wQHrRpvjzRUP6bMiHuxWJw92uh6LA19xSzcDCFH1M=
=wk5s
-----END PGP SIGNATURE-----

Sharlatan Hellseher wrote 2 months ago
guix import go package definition is not valid
(address . 74992-done@debbugs.gnu.org)
87a5bvkd7j.fsf@gmail.com
Hi,

Adjustment is pushed as f0adcca9db6e52aed1148a507085f4088633153a to
master.

--
Thanks,
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmeEISAACgkQdtcnv/Ys
0rXFDg/8DFU2xzPyZXi6N1TMOZhZjioLH7OvBNWdZwOylmbBIs9ry5ph059kGNTQ
5cg/0wWWfCxFSw9oXAwF+mv73GxDydvvEr3z01snG9oUnR3uZkBUyFQJ4uxKx6sO
Ock+YpZ9CuiF7x9x1JVxyyambIfEuu/hh0rgRCEhmw+4QKAxXlhtPV9yqIzorBZK
uz7j0ux8/f8X671fZ8yp5QvuLcTyTBvTD2OFTBJuHE7K4X8koNAKz5BgbVkJgpjf
V/rR6WIpWmiyh8Be+aAeehOYM8DU3/6vsNk45tOkyiJz0IzHMK1KYSwvEx6NzxOq
0azWUgCSU2KHQSATJIsu5u9PHsqTZm+FqnhnZQV18NKum/iynBPzsYmXW2opJ1IM
YRFcILf5jVY2+/dsW1c75GULzwMeDHz2HCvFTEyh3/qLQPjFKwRPaD0qLYQI087W
49/n3fYvJ9x8jWXf2rULip777baryWfIHE+Xpq7giY6kxw/y6HhqK0+gcQYOYtKf
lwSWJCOqhRR26HbbWPP7w4aN8S9ozLrD8z/8NcgPL4TDXozcEDkQXTWp+FAmumZi
mwjC1Po0ArquRw4N5O6ENmljlWke/IC44zCEPBNtoHbmL9/kjklvqbS8OcOgFj8e
yR1/rAxwOQdcFuZhZSleEwqyivgRPKzNrbWKcZJmJXJviMIXW/w=
=XzEC
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 74992@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74992
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help