unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 52152@debbugs.gnu.org
Subject: bug#52152: Haskell Hackage importer can create dependency cycles
Date: Sun, 28 Nov 2021 02:50:12 +0000	[thread overview]
Message-ID: <PJLtWYsg3w55CVPxc5TisRIwMJwKINms6geUUEl4CSd0gUKVIE0JoQKIWKAWfOA0GdCOdOGIrZStFXC--m5k339PJsIvi9X8XxJrU6HK-Ag=@protonmail.com> (raw)

Hello,

While working on importing a bunch of Haskell packages, I came across a cycle created by the importer (twice actually, but forgot the other one). Perhaps this is from the metadata from Hackage, as it doesn't create the cycle when importing from Stackage. Here are the outputs:

guix import hackage tuple -r

Starting download of /tmp/guix-file.emhMwD
From https://hackage.haskell.org/package/tuple/tuple-0.3.0.2.tar.gz...
 …0.2.tar.gz  19KiB                   5.5MiB/s 00:00 [##################] 100.0%

Starting download of /tmp/guix-file.uzGEcb
From https://hackage.haskell.org/package/OneTuple/OneTuple-0.3.1.tar.gz...
 ….3.1.tar.gz  5KiB                   3.1MiB/s 00:00 [##################] 100.0%
(define-public ghc-onetuple
  (package
    (name "ghc-onetuple")
    (version "0.3.1")
    (source
      (origin
        (method url-fetch)
        (uri (string-append
               "https://hackage.haskell.org/package/OneTuple/OneTuple-"
               version
               ".tar.gz"))
        (sha256
          (base32 "1vry21z449ph9k61l5zm7mfmdwkwszxqdlawlhvwrd1gsn13d1cq"))))
    (build-system haskell-build-system)
    (inputs (list ghc-hashable ghc-base-orphans))
    (native-inputs (list ghc-onetuple ghc-onetuple))
    (arguments
      `(#:cabal-revision
        ("2" "0gk0656igxl0km9kgh8v7b5vq74kla59ka9hvpzq57njr6bc0j58")))
    (home-page "http://hackage.haskell.org/package/OneTuple")
    (synopsis "Singleton Tuple")
    (description
      "This package is a compatibility package for a singleton data type . > data Solo a = Solo a . Note: it's not a @newtype@ . @Solo@ is available in @base-4.16@ (GHC-9.2).")
    (license license:bsd-3)))

(define-public ghc-tuple
  (package
    (name "ghc-tuple")
    (version "0.3.0.2")
    (source
      (origin
        (method url-fetch)
        (uri (string-append
               "https://hackage.haskell.org/package/tuple/tuple-"
               version
               ".tar.gz"))
        (sha256
          (base32 "094nx29aahyrvbcn7yca9zs2a5rxz1is7510w1q43rpvza7hdjrg"))))
    (build-system haskell-build-system)
    (inputs (list ghc-onetuple))
    (home-page "http://hackage.haskell.org/package/tuple")
    (synopsis "Various functions on tuples")
    (description
      "Various useful functions on tuples, overloaded on tuple size.")
    (license license:bsd-3)))

The above has the cycle (twice!) in ghc-onetuple. Doing the same import from Stackage is more sane:

guix import stackage tuple -r

Starting download of /tmp/guix-file.EvZM8X
From https://hackage.haskell.org/package/tuple/tuple-0.3.0.2.tar.gz...
 …0.2.tar.gz  19KiB                   4.7MiB/s 00:00 [##################] 100.0%

Starting download of /tmp/guix-file.zMsjqd
From https://hackage.haskell.org/package/OneTuple/OneTuple-0.2.2.1.tar.gz...
 …2.2.1.tar.gz  3KiB                  3.2MiB/s 00:00 [##################] 100.0%
(define-public ghc-onetuple
  (package
    (name "ghc-onetuple")
    (version "0.2.2.1")
    (source
      (origin
        (method url-fetch)
        (uri (string-append
               "https://hackage.haskell.org/package/OneTuple/OneTuple-"
               version
               ".tar.gz"))
        (sha256
          (base32 "15ls6kkf953288q7rsc49bvw467ll4nq28hvsgbaazdn7hf75ixc"))))
    (build-system haskell-build-system)
    (arguments
      `(#:cabal-revision
        ("1" "03mygfz7lv6h0i30bq2grvmahbg9j7a36mc0wls2nr81dv9p19s7")))
    (home-page "http://hackage.haskell.org/package/OneTuple")
    (synopsis "Singleton Tuple")
    (description
      "This package provides a singleton tuple data type . > data OneTuple a = OneTuple a . Note: it's not a @newtype@")
    (license license:bsd-3)))

(define-public ghc-tuple
  (package
    (name "ghc-tuple")
    (version "0.3.0.2")
    (source
      (origin
        (method url-fetch)
        (uri (string-append
               "https://hackage.haskell.org/package/tuple/tuple-"
               version
               ".tar.gz"))
        (sha256
          (base32 "094nx29aahyrvbcn7yca9zs2a5rxz1is7510w1q43rpvza7hdjrg"))))
    (build-system haskell-build-system)
    (inputs (list ghc-onetuple))
    (home-page "http://hackage.haskell.org/package/tuple")
    (synopsis "Various functions on tuples")
    (description
      "Various useful functions on tuples, overloaded on tuple size.")
    (license license:bsd-3)))

John




             reply	other threads:[~2021-11-28  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28  2:50 John Kehayias via Bug reports for GNU Guix [this message]
2022-03-08 10:04 ` bug#52152: Haskell Hackage importer can create dependency cycles zimoun
2022-04-07  7:45   ` zimoun
2022-04-07  8:10     ` Philip Munksgaard
2022-06-07  7:31 ` Lars-Dominik Braun

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='PJLtWYsg3w55CVPxc5TisRIwMJwKINms6geUUEl4CSd0gUKVIE0JoQKIWKAWfOA0GdCOdOGIrZStFXC--m5k339PJsIvi9X8XxJrU6HK-Ag=@protonmail.com' \
    --to=bug-guix@gnu.org \
    --cc=52152@debbugs.gnu.org \
    --cc=john.kehayias@protonmail.com \
    /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.
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).