GNU bug report logs -
#49566
[PATCH core-updates 0/4] import: {egg, gem, opam, hackage}: Emit new-style package inputs.
Previous Next
Reported by: Sarah Morgensen <iskarian <at> mgsn.dev>
Date: Thu, 15 Jul 2021 01:29:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49566 in the body.
You can then email your comments to 49566 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#49566
; Package
guix-patches
.
(Thu, 15 Jul 2021 01:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sarah Morgensen <iskarian <at> mgsn.dev>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 15 Jul 2021 01:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello Guix,
Together with [0] this should take care of updating all the importers to
new-style package inputs. These are all standalone edits. Tests pass but I did
not manually verify importing.
[0] https://issues.guix.gnu.org/49531
--
Sarah Morgensen (4):
import: egg: Emit new-style package inputs.
import: gem: Emit new-style package inputs.
import: opam: Emit new-style package inputs.
import: hackage: Emit new-style package inputs.
guix/import/egg.scm | 14 ++++++--------
guix/import/gem.scm | 8 ++------
guix/import/hackage.scm | 11 +++++------
guix/import/opam.scm | 11 +++++------
tests/egg.scm | 27 +++++++--------------------
tests/gem.scm | 15 ++++-----------
tests/hackage.scm | 18 +++++-------------
tests/opam.scm | 10 +++-------
8 files changed, 37 insertions(+), 77 deletions(-)
base-commit: 8456581375cf03c46005d00907f8fdd1f5615f1e
--
2.31.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49566
; Package
guix-patches
.
(Thu, 15 Jul 2021 01:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49566 <at> debbugs.gnu.org (full text, mbox):
* guix/import/egg.scm (egg->guix-package): Generate dependency list from
a list of symbols.
[egg-parse-dependency]: Return a list of symbols.
[maybe-inputs]: Wrap INPUTS in 'list' instead of 'quasiquote'.
* tests/egg.scm (match-chicken-foo): Adjust accordingly.
---
guix/import/egg.scm | 14 ++++++--------
tests/egg.scm | 27 +++++++--------------------
2 files changed, 13 insertions(+), 28 deletions(-)
diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index 107894ddcf..86b54ff56f 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -246,12 +247,9 @@ not work."
(let ((name (prettify-name (extract-name name))))
;; Dependencies are sometimes specified as symbols and sometimes
;; as strings
- (list (string-append (if system? "" package-name-prefix)
- name)
- (list 'unquote
- (string->symbol (string-append
- (if system? "" package-name-prefix)
- name))))))
+ (string->symbol (string-append
+ (if system? "" package-name-prefix)
+ name))))
(define egg-propagated-inputs
(let ((dependencies (assoc-ref egg-content 'dependencies)))
@@ -290,7 +288,7 @@ not work."
'())
((inputs ...)
(list (list input-type
- (list 'quasiquote inputs))))))
+ `(list ,@inputs))))))
(values
`(package
@@ -318,7 +316,7 @@ not work."
(license ,egg-licenses))
(filter (lambda (name)
(not (member name '("srfi-4"))))
- (map (compose guix-name->egg-name first)
+ (map (compose guix-name->egg-name symbol->string)
(append egg-propagated-inputs
egg-native-inputs)))))))
diff --git a/tests/egg.scm b/tests/egg.scm
index 0884d8d429..9e45a42443 100644
--- a/tests/egg.scm
+++ b/tests/egg.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -86,16 +87,9 @@
('build-system 'chicken-build-system)
('arguments ('quasiquote ('#:egg-name "foo")))
('native-inputs
- ('quasiquote
- (("chicken-test" ('unquote chicken-test))
- ("chicken-srfi-1" ('unquote chicken-srfi-1))
- ("chicken-begin-syntax" ('unquote chicken-begin-syntax)))))
- ('inputs
- ('quasiquote
- (("libgit2" ('unquote libgit2)))))
- ('propagated-inputs
- ('quasiquote
- (("chicken-datatype" ('unquote chicken-datatype)))))
+ ('list 'chicken-test 'chicken-srfi-1 'chicken-begin-syntax))
+ ('inputs ('list 'libgit2))
+ ('propagated-inputs ('list 'chicken-datatype))
('home-page "https://wiki.call-cc.org/egg/foo")
('synopsis "Example egg")
('description #f)
@@ -108,16 +102,9 @@
('source (? file-like? source))
('build-system 'chicken-build-system)
('arguments ('quasiquote ('#:egg-name "bar")))
- ('native-inputs
- ('quasiquote
- (("chicken-test" ('unquote chicken-test))
- ("chicken-begin-syntax" ('unquote chicken-begin-syntax)))))
- ('inputs
- ('quasiquote
- (("libgit2" ('unquote libgit2)))))
- ('propagated-inputs
- ('quasiquote
- (("chicken-datatype" ('unquote chicken-datatype)))))
+ ('native-inputs ('list 'chicken-test 'chicken-begin-syntax))
+ ('inputs ('list 'libgit2))
+ ('propagated-inputs ('list 'chicken-datatype))
('home-page "https://wiki.call-cc.org/egg/bar")
('synopsis "Example egg")
('description #f)
--
2.31.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49566
; Package
guix-patches
.
(Thu, 15 Jul 2021 01:41:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 49566 <at> debbugs.gnu.org (full text, mbox):
* guix/import/gem.scm (make-gem-sexp): Wrap inputs in 'list' instead of
'quasiquote'.
* tests/gem.scm ("gem->guix-package")
("gem-recursive-import"): Adjust accordingly.
---
guix/import/gem.scm | 8 ++------
tests/gem.scm | 15 ++++-----------
2 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index 418d716be6..0e5bb7e635 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018 Oleg Pykhalov <go.wigust <at> gmail.com>
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2020 Martin Becze <mjbecze <at> riseup.net>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -110,12 +111,7 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES."
,@(if (null? dependencies)
'()
`((propagated-inputs
- (,'quasiquote
- ,(map (lambda (name)
- `(,name
- (,'unquote
- ,(string->symbol name))))
- dependencies)))))
+ (list ,@(map string->symbol dependencies)))))
(synopsis ,synopsis)
(description ,description)
(home-page ,home-page)
diff --git a/tests/gem.scm b/tests/gem.scm
index 751bba656f..c8fe15398e 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 David Thompson <davet <at> gnu.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust <at> gmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -93,10 +94,7 @@
('base32
"1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
('build-system 'ruby-build-system)
- ('propagated-inputs
- ('quasiquote
- (("bundler" ('unquote 'bundler))
- ("ruby-bar" ('unquote 'ruby-bar)))))
+ ('propagated-inputs ('list 'bundler 'ruby-bar))
('synopsis "A cool gem")
('description "This package provides a cool gem")
('home-page "https://example.com")
@@ -132,9 +130,7 @@
('base32
"1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
('build-system 'ruby-build-system)
- ('propagated-inputs
- ('quasiquote
- (('"bundler" ('unquote 'bundler)))))
+ ('propagated-inputs ('list 'bundler))
('synopsis "Another cool gem")
('description "Another cool gem")
('home-page "https://example.com")
@@ -165,10 +161,7 @@
('base32
"1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
('build-system 'ruby-build-system)
- ('propagated-inputs
- ('quasiquote
- (("bundler" ('unquote 'bundler))
- ("ruby-bar" ('unquote 'ruby-bar)))))
+ ('propagated-inputs ('list 'bundler 'ruby-bar))
('synopsis "A cool gem")
('description "This package provides a cool gem")
('home-page "https://example.com")
--
2.31.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49566
; Package
guix-patches
.
(Thu, 15 Jul 2021 01:41:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 49566 <at> debbugs.gnu.org (full text, mbox):
* guix/import/hackage.scm (hackage-module->sexp)[dependencies]
[native-dependencies]: Make into a list of symbols.
[maybe-inputs]: Wrap INPUTS in 'list' instead of 'quasiquote'.
* tests/hackage.scm (match-ghc-foo)
(match-ghc-foo-6)
(match-ghc-foo-revision): Adjust accordingly.
---
guix/import/hackage.scm | 11 +++++------
tests/hackage.scm | 18 +++++-------------
2 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index f94a1e7087..7c6d9d0a22 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2019 Robert Vollmert <rob <at> vllmrt.net>
;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -265,14 +266,12 @@ the hash of the Cabal file."
hackage-dependencies))
(define dependencies
- (map (lambda (name)
- (list name (list 'unquote (string->symbol name))))
+ (map string->symbol
(map hackage-name->package-name
hackage-dependencies)))
(define native-dependencies
- (map (lambda (name)
- (list name (list 'unquote (string->symbol name))))
+ (map string->symbol
(map hackage-name->package-name
hackage-native-dependencies)))
@@ -282,8 +281,8 @@ the hash of the Cabal file."
'())
((inputs ...)
(list (list input-type
- (list 'quasiquote inputs))))))
-
+ `(list ,@inputs))))))
+
(define (maybe-arguments)
(match (append (if (not include-test-dependencies?)
'(#:tests? #f)
diff --git a/tests/hackage.scm b/tests/hackage.scm
index 66a13d9881..0ecef40b55 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2015 Federico Beffa <beffa <at> fbengineering.ch>
;;; Copyright © 2019 Robert Vollmert <rob <at> vllmrt.net>
;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -178,9 +179,7 @@ library
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-http" ('unquote 'ghc-http)))))
+ ('inputs ('list 'ghc-http))
('home-page "http://test.org")
('synopsis (? string?))
('description (? string?))
@@ -223,13 +222,8 @@ library
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-b" ('unquote 'ghc-b))
- ("ghc-http" ('unquote 'ghc-http)))))
- ('native-inputs
- ('quasiquote
- (("ghc-haskell-gi" ('unquote 'ghc-haskell-gi)))))
+ ('inputs ('list 'ghc-b 'ghc-http))
+ ('native-inputs ('list 'ghc-haskell-gi))
('home-page "http://test.org")
('synopsis (? string?))
('description (? string?))
@@ -353,9 +347,7 @@ executable cabal
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-http" ('unquote 'ghc-http)))))
+ ('inputs ('list 'ghc-http))
('arguments
('quasiquote
('#:cabal-revision
--
2.31.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49566
; Package
guix-patches
.
(Thu, 15 Jul 2021 01:41:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 49566 <at> debbugs.gnu.org (full text, mbox):
* guix/import/opam.scm (opam->guix-package): Wrap INPUTS and
NATIVE-INPUTS in 'list' instead of 'quasiquote'.
(dependency-list->inputs): Return a list of symbols.
* tests/opam.scm ("opam->guix-package"): Adjust accordingly.
---
guix/import/opam.scm | 11 +++++------
tests/opam.scm | 10 +++-------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index 0201376457..1ce8b7e94e 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018 Julien Lepiller <julien <at> lepiller.eu>
;;; Copyright © 2020 Martin Becze <mjbecze <at> riseup.net>
;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -269,10 +270,8 @@ path to the repository."
(map dependency->native-input depends)))
(define (dependency-list->inputs lst)
- (map
- (lambda (dependency)
- (list dependency (list 'unquote (string->symbol dependency))))
- (ocaml-names->guix-names lst)))
+ (map string->symbol
+ (ocaml-names->guix-names lst)))
(define* (opam-fetch name #:optional (repository (get-opam-repository)))
(and-let* ((repository repository)
@@ -325,10 +324,10 @@ or #f on failure."
'ocaml-build-system))
,@(if (null? inputs)
'()
- `((propagated-inputs ,(list 'quasiquote inputs))))
+ `((propagated-inputs (list ,@inputs))))
,@(if (null? native-inputs)
'()
- `((native-inputs ,(list 'quasiquote native-inputs))))
+ `((native-inputs (list ,@native-inputs))))
,@(if (equal? name (guix-name->opam-name (ocaml-name->guix-name name)))
'()
`((properties
diff --git a/tests/opam.scm b/tests/opam.scm
index f1e3b70cb0..e7f1ff9e39 100644
--- a/tests/opam.scm
+++ b/tests/opam.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Julien Lepiller <julien <at> lepiller.eu>
;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -101,13 +102,8 @@ url {
('base32
(? string? hash)))))
('build-system 'ocaml-build-system)
- ('propagated-inputs
- ('quasiquote
- (("ocaml-zarith" ('unquote 'ocaml-zarith)))))
- ('native-inputs
- ('quasiquote
- (("ocaml-alcotest" ('unquote 'ocaml-alcotest))
- ("ocamlbuild" ('unquote 'ocamlbuild)))))
+ ('propagated-inputs ('list 'ocaml-zarith))
+ ('native-inputs ('list 'ocaml-alcotest 'ocamlbuild))
('home-page "https://example.org/")
('synopsis "Some example package")
('description "This package is just an example.")
--
2.31.1
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Tue, 20 Jul 2021 21:35:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sarah Morgensen <iskarian <at> mgsn.dev>
:
bug acknowledged by developer.
(Tue, 20 Jul 2021 21:35:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 49566-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Applied the whole series.
There was another test needing adjustment (see below) so I added it to
the last patch.
Thank you!
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/tests/hackage.scm b/tests/hackage.scm
index dcf9902c97..073e35ad05 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -411,9 +411,7 @@ executable cabal
('base32
(? string? hash)))))
('build-system 'haskell-build-system)
- ('inputs
- ('quasiquote
- (("ghc-http" ('unquote 'ghc-http)))))
+ ('inputs ('list 'ghc-http))
('home-page "http://test.org")
('synopsis (? string?))
('description (? string?))
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 18 Aug 2021 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.