GNU bug report logs - #40860
[PATCH] yarnpkg

Previous Next

Package: guix-patches;

Reported by: Kozo <Gitlabcanada <at> runbox.com>

Date: Sun, 26 Apr 2020 03:53:02 UTC

Severity: normal

Tags: patch

Done: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>

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 40860 in the body.
You can then email your comments to 40860 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40860; Package guix-patches. (Sun, 26 Apr 2020 03:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kozo <Gitlabcanada <at> runbox.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 26 Apr 2020 03:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kozo <Gitlabcanada <at> runbox.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] yarnpkg
Date: Sat, 25 Apr 2020 20:15:56 -0600
[Message part 1 (text/plain, inline)]
Hello,

This is my first submission. Please let me know how I can improve for
future packages.

I followed the steps in the manual and submitted a Software Heritage
request to pull the source code.

Thank you,
Kozo
[0001-yarnpkg.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#40860; Package guix-patches. (Sun, 26 Apr 2020 17:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 40860 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Kozo <Gitlabcanada <at> runbox.com>
Cc: 40860 <at> debbugs.gnu.org
Subject: Re: [bug#40860] [PATCH] yarnpkg
Date: Sun, 26 Apr 2020 18:42:51 +0100
[Message part 1 (text/plain, inline)]
Kozo <Gitlabcanada <at> runbox.com> writes:

> This is my first submission. Please let me know how I can improve for
> future packages.
>
> I followed the steps in the manual and submitted a Software Heritage
> request to pull the source code.

Hi Kozo,

Yarn would indeed be something that would be nice to have a package for.

While I guess that this might work, I think there are issues with the
source here and the lack of dependencies that make this unsuitable for
Guix.

> +(define-public yarn
> +  (package
> +   (name "yarn")
> +   (version yarn-version)
> +   (source (origin
> +    (method url-fetch/tarbomb)
> +    (uri (string-append "https://github.com/yarnpkg/yarn/releases/download/v"
> +     version "/yarn-v" version ".tar.gz"))
> +    (sha256
> +     (base32
> +      "0n7vhwjz3lyjnavcaw08cqa8gfampqsy5mm3f555cbqb26m1clxw"))))

The key thing here is source. For many reasons, the packages in Guix
represent software being built from some source material.

What's being downloaded here might look like source material, but I
doubt the ~153,409 line lib/cli.js file is really the preferred form for
editing the Yarn source code.

> +   (build-system trivial-build-system)
> +   (outputs '("out"))
> +   (inputs `(("node" ,node)))

Another sign that something is up is the mismatch between the inputs
here, and the dependencies in the upstream metadata [1]. Assuming the
package works, I'm guessing that there's a lot more than the source of
Yarn within the "source" of this package.

1: https://github.com/yarnpkg/yarn/blob/master/package.json

I'm hopeful that package Yarn will become possible sometime soon, but in
my mind the path forward is to get an importer working for npm, package
the many dependencies, then attempt to package yarn.

Unfortunately I don't think there's a bug that tracks this overall issue
well, although I did find a similar bug about yarn [2]

2: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33431

Does that make sense?

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40860; Package guix-patches. (Sun, 26 Apr 2020 18:17:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: Kozo <Gitlabcanada <at> runbox.com>
Cc: guix-patches <at> gnu.org
Subject: Re: [PATCH] yarnpkg
Date: Sun, 26 Apr 2020 20:16:25 +0200
[Message part 1 (text/plain, inline)]
On Sat, Apr 25, 2020 at 08:15:56PM -0600, Kozo wrote:
> Subject: [PATCH] yarnpkg
> 
> ---
>  yarn.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 yarn.scm

Please write commit logs in the ChangeLog format [0]. You can check the
commit history for examples.

> (define-module (yarn)

Please put the file in gnu/packages/. Also, add it to the list in
gnu/local.mk.

>   #:use-module (guix packages)
>   #:use-module (guix download)
>   #:use-module (guix build-system trivial)
>   #:use-module (guix licenses)
>   #:use-module (gnu packages node)
>   #:use-module (ice-9 pretty-print))

I can't see where (ice-9 pretty-print) is being used.

> (define yarn-version "1.22.4")

What is the purpose of this single-use variable?

> (define-public yarn
>   (package
>    (name "yarn")
>    (version yarn-version)
>    (source (origin
>     (method url-fetch/tarbomb)

The file has only a single directory, so why use /tarbomb?

>     (uri (string-append "https://github.com/yarnpkg/yarn/releases/download/v"
>      version "/yarn-v" version ".tar.gz"))

When looking through this download, it seems that the lib/cli.js file is
a preprocessed mess. Ideally, we would build the package from source.

>     (sha256
>      (base32
>       "0n7vhwjz3lyjnavcaw08cqa8gfampqsy5mm3f555cbqb26m1clxw"))))
>    (build-system trivial-build-system)
>    (outputs '("out"))
>    (inputs `(("node" ,node)))
>    (arguments
>     `(#:modules ((guix build utils))
>       #:builder (begin
>   (use-modules (guix build utils))
>                   (let* ((out (assoc-ref %outputs "out"))
>    (bin (string-append  out "/bin"))
>    (lib (string-append  out "/lib"))

The indentation is quite confusing here, I'd suggest running
./etc/format-code.el on your file.

>    (synopsis "Dependency management tool for JavaScript")
>    (description "Fast, reliable, and secure dependency management tool
> for JavaScript.  Acts as a drop-in replacement for NodeJS's npm.")

I think there are a lot of buzzwords in this description: "fast,
reliable and secure" is not an objective property. Is there something
more neutral that could be said about the package?

Thanks,
Jakub Kądziołka

[0]: https://www.gnu.org/prep/standards/html_node/Change-Logs.html#Change-Logs
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40860; Package guix-patches. (Mon, 27 Apr 2020 14:50:03 GMT) Full text and rfc822 format available.

Message #14 received at 40860 <at> debbugs.gnu.org (full text, mbox):

From: Kozo <Gitlabcanada <at> runbox.com>
To: 40860 <at> debbugs.gnu.org
Subject: [PATCH] Yarnpkg
Date: Mon, 27 Apr 2020 08:10:28 -0600
Thank you for the feedback, Christopher and Jakub.

After going over what you said, this package is beyond my current
experience. It would make sense to start getting all the dependencies
in one at a time and return to this one later.

Please go ahead and close this request as I work on the building
blocks.

Thanks,
Kozo





Reply sent to Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>:
You have taken responsibility. (Mon, 27 Apr 2020 18:29:01 GMT) Full text and rfc822 format available.

Notification sent to Kozo <Gitlabcanada <at> runbox.com>:
bug acknowledged by developer. (Mon, 27 Apr 2020 18:29:01 GMT) Full text and rfc822 format available.

Message #19 received at 40860-done <at> debbugs.gnu.org (full text, mbox):

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: Kozo <Gitlabcanada <at> runbox.com>
Cc: 40860-done <at> debbugs.gnu.org
Subject: Re: [bug#40860] [PATCH] Yarnpkg
Date: Mon, 27 Apr 2020 20:28:35 +0200
[Message part 1 (text/plain, inline)]
On Mon, 27 Apr 2020 08:10:28 -0600
Kozo <Gitlabcanada <at> runbox.com> wrote:

> Thank you for the feedback, Christopher and Jakub.
> 
> After going over what you said, this package is beyond my current
> experience. It would make sense to start getting all the dependencies
> in one at a time and return to this one later.
> 
> Please go ahead and close this request as I work on the building
> blocks.

Hi Kozo,

you can close issues by appending "-done" to the bug-number as I did.

node/npm is terribly hard because of its "dependency hell". 

Jelle Licht worked on an npm-importer. AFAIK it is not yet part of
Guix. Here is a reference on it I found:

https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00814.html

Björn

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40860; Package guix-patches. (Mon, 04 May 2020 19:45:03 GMT) Full text and rfc822 format available.

Message #22 received at 40860 <at> debbugs.gnu.org (full text, mbox):

From: Kozo via web <issues.guix.gnu.org <at> elephly.net>
To: 40860 <at> debbugs.gnu.org
Date: Mon,  4 May 2020 21:28:54 +0200
Greetings,

Thank you for your feedback. This package is too complex for my current experience level.

The current plan of action will be to start getting all the dependencies added in and then come back to this overall package.

Please close this request and we'll re-visit it in the future.

Thank you,
Kozo





Information forwarded to guix-patches <at> gnu.org:
bug#40860; Package guix-patches. (Tue, 05 May 2020 07:09:01 GMT) Full text and rfc822 format available.

Message #25 received at 40860-done <at> debbugs.gnu.org (full text, mbox):

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: Kozo via web <issues.guix.gnu.org <at> elephly.net>
Cc: 40860-done <at> debbugs.gnu.org
Subject: Re: [bug#40860] (no subject)
Date: Tue, 5 May 2020 09:08:16 +0200
[Message part 1 (text/plain, inline)]
On Mon,  4 May 2020 21:28:54 +0200
Kozo via web <issues.guix.gnu.org <at> elephly.net> wrote:

> Greetings,
> 
> Thank you for your feedback. This package is too complex for my
> current experience level.
> 
> The current plan of action will be to start getting all the
> dependencies added in and then come back to this overall package.
> 
> Please close this request and we'll re-visit it in the future.

Closed with adding "-done" to the bug-number.

Thanks for giving it a try and see you around with smaller packages
first.

Björn
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Jun 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 76 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.