[PATCH 0/1] Add node-global-gradle-clean

  • Done
  • quality assurance status badge
Details
5 participants
  • Dhruvin Gandhi
  • Jelle Licht
  • Julien Lepiller
  • Maxime Devos
  • zimoun
Owner
unassigned
Submitted by
Dhruvin Gandhi
Severity
normal
D
D
Dhruvin Gandhi wrote on 19 Mar 2021 20:21
(address . guix-patches@gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20210319192144.17799-1-contact@dhruvin.dev
I've recently started using Guix System and it has been my daily driver for a
month now. Surprisingly, guix already has every package I need. I decided to
ask my friends about packages they'll need before they can start using Guix.

I will try to submit patches of those packages in coming months. I am new to
guix, and am new to contributing code via patches. Let me know if you have any
corrections/suggestions.


Dhruvin Gandhi (1):
Add node-global-gradle-clean

gnu/packages/node-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

--
2.31.0
M
M
Maxime Devos wrote on 20 Mar 2021 09:51
6ac44e1dc193a3d78351aed9a80e1c651e809ab5.camel@telenet.be
On Sat, 2021-03-20 at 00:51 +0530, Dhruvin Gandhi via Guix-patches via wrote:
Toggle quote (8 lines)
> I've recently started using Guix System and it has been my daily driver for a
> month now. Surprisingly, guix already has every package I need. I decided to
> ask my friends about packages they'll need before they can start using Guix.
>
> I will try to submit patches of those packages in coming months. I am new to
> guix, and am new to contributing code via patches. Let me know if you have any
> corrections/suggestions.

See ‘16.4 Packaging Guidelines’ and ‘16.6 Submitting Patches’ in the manual.

Toggle quote (6 lines)
> Dhruvin Gandhi (1):
> Add node-global-gradle-clean
>
> gnu/packages/node-xyz.scm | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)

There's an uniform style for commit messages. Example for
when adding new packages:

(start snip)
commit 7382b1027a319e505be6cfcadf1f5bd761dadccc
Author: Ricardo Wurmus <rekado@elephly.net>
Date: Thu Feb 4 23:20:05 2021 +0100

gnu: Add r-shinyjqui.
* gnu/packages/cran.scm (r-shinyjqui): New variable.

commit 5ae09d7979a0696d862b9555314eab199f7ce576
Author: Ricardo Wurmus <rekado@elephly.net>
Date: Thu Feb 4 22:41:35 2021 +0100

gnu: Add r-spelling.
* gnu/packages/cran.scm (r-spelling): New variable.
(end snip)

(More examples in the git history)

When defining a new package, usually a copyright line should
be added at the top of the file.

I prefer referring to the commit directly instead of by tag, as
the commit is required for SWH fallback if the repo disappears.

Is there any particular reason tests are disabled? Maybe add
a comment "; No test suite." if that's the case.

I'm not a fan of starting package descriptions with "This package is ...",
even though plenty of plenty of packages in gnu/package/node-xyz.scm have
such a description. A description from gnu/packages/guile-xyz.scm I like:

"Guile-DSV is a GNU Guile module for working with the
delimiter-separated values (DSV) data format. Guile-DSV supports the
Unix-style DSV format and RFC 4180 format."

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYFW3nRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7siVAP4wF9MCySxbUVov1wjxps6avUqu
wbz9BCDDLk6jfu4hrgEAlbYv30gh2RQ7augbM1RwXhXXu6dy5+NWa2iYj8EKjAI=
=03uX
-----END PGP SIGNATURE-----


J
J
Julien Lepiller wrote on 20 Mar 2021 11:58
A8F6017C-2514-4E94-B00C-1975EA790432@lepiller.eu
Le 20 mars 2021 04:51:41 GMT-04:00, Maxime Devos <maximedevos@telenet.be> a écrit :
Toggle quote (18 lines)
>On Sat, 2021-03-20 at 00:51 +0530, Dhruvin Gandhi via Guix-patches via
>wrote:
>> I've recently started using Guix System and it has been my daily
>driver for a
>> month now. Surprisingly, guix already has every package I need. I
>decided to
>> ask my friends about packages they'll need before they can start
>using Guix.
>>
>> I will try to submit patches of those packages in coming months. I am
>new to
>> guix, and am new to contributing code via patches. Let me know if you
>have any
>> corrections/suggestions.
>
>I prefer referring to the commit directly instead of by tag, as
>the commit is required for SWH fallback if the repo disappears.

Sorry to contradict, but using a tag is much more readable and works well with Software Heritage. At least, the linter seems to work in that case. Have I missed something?



Dhruvin, could you submit a new patch with Maxime's suggestions? If you have troubles with Rome items don't worry, since It's your first patch, we can change a few things for you before pushing :)

Also, could you run (from the guix checkout):

./pre-inst-env guix lint node-global-gradle-clean

And fix any error it reports?

Thanks a lot!
D
D
Dhruvin Gandhi wrote on 21 Mar 2021 09:32
1927774916.43640.1616315554137@office.mailbox.org
Toggle quote (2 lines)
> See ‘16.4 Packaging Guidelines’ and ‘16.6 Submitting Patches’ in the manual.

Yes, I will go through the guidelines first before submitting
next version of the patch with suggested changes.

Toggle quote (4 lines)
> There's an uniform style for commit messages. Example for
> when adding new packages:
> ...

I saw commit messages. I initially thought the committers added
them, as I did not know how the patches are applied. But now that
you have mentioned this, it makes sense, I will use that format
for commit messages.

Toggle quote (3 lines)
> When defining a new package, usually a copyright line should
> be added at the top of the file.

Will do that.

Toggle quote (3 lines)
> I prefer referring to the commit directly instead of by tag, as
> the commit is required for SWH fallback if the repo disappears.

Okay.

Toggle quote (3 lines)
> Is there any particular reason tests are disabled? Maybe add
> a comment "; No test suite." if that's the case.

Yes, there are no tests (as of 1.0.1). I will mention that.

Toggle quote (8 lines)
> I'm not a fan of starting package descriptions with "This package is ...",
> even though plenty of plenty of packages in gnu/package/node-xyz.scm have
> such a description. A description from gnu/packages/guile-xyz.scm I like:
>
> "Guile-DSV is a GNU Guile module for working with the
> delimiter-separated values (DSV) data format. Guile-DSV supports the
> Unix-style DSV format and RFC 4180 format."

I borrowed synopsis and description from the global-gradle-clean package
author, and changed them a bit to match existing packages in the node-xyz
module. I agree that they can be more descriptive, and concise. I'll
update them as well.

I have a question. The package may be used by only a few users. I hope that
is okay with guix. Is there a rule defined somewhere, stating what gets in
this guix channel and what should not?

PS: When I submitted this patch, it created another bug 47270. I read about
what a patch series is and read about how to submit them to guix afterwards.
47270 may be closed in favor of 47269. I will follow the way specified in
guidelines.

Thanks Maxime for your suggestions.

Regards,
Dhruvin Gandhi
D
D
Dhruvin Gandhi wrote on 21 Mar 2021 09:48
302910345.43719.1616316527124@office.mailbox.org
Toggle quote (2 lines)
> Dhruvin, could you submit a new patch with Maxime's suggestions?

Yes, I will do that.

Toggle quote (2 lines)
> If you have troubles with Rome items don't worry, since It's your first patch, we can change a few things for you before pushing :)

I don't know what Rome items are.

Toggle quote (8 lines)
> Also, could you run (from the guix checkout):
>
> ./pre-inst-env guix lint node-global-gradle-clean
>
> And fix any error it reports?
>
> Thanks a lot!

I built the package for 3 rounds to check if there's something wrong.
I ran guix lint node-global-gradle-clean before submitting the patch.
It showed no warnings/corrections. I will do the same before submitting
subsequent versions of this patch. Thanks for mentioning this :)

Regards,
Dhruvin Gandhi
J
J
Julien Lepiller wrote on 21 Mar 2021 10:33
A9675931-6DC6-4CB3-A5D0-332F3B0DFE5B@lepiller.eu
Le 21 mars 2021 04:48:47 GMT-04:00, Dhruvin Gandhi <contact@dhruvin.dev> a écrit :
Toggle quote (9 lines)
>> Dhruvin, could you submit a new patch with Maxime's suggestions?
>
>Yes, I will do that.
>
>> If you have troubles with Rome items don't worry, since It's your
>first patch, we can change a few things for you before pushing :)
>
>I don't know what Rome items are.

They are "some items" after my French autocorrect kicks in… sorry for the confusion!

Toggle quote (14 lines)
>
>> Also, could you run (from the guix checkout):
>>
>> ./pre-inst-env guix lint node-global-gradle-clean
>>
>> And fix any error it reports?
>>
>> Thanks a lot!
>
>I built the package for 3 rounds to check if there's something wrong.
>I ran guix lint node-global-gradle-clean before submitting the patch.
>It showed no warnings/corrections. I will do the same before submitting
>subsequent versions of this patch. Thanks for mentioning this :)

Great, thanks!

Toggle quote (3 lines)
>
>Regards,
>Dhruvin Gandhi
Z
Z
zimoun wrote on 21 Mar 2021 10:51
86k0q0vnq2.fsf@gmail.com
Hi,

On Sat, 20 Mar 2021 at 06:58, Julien Lepiller <julien@lepiller.eu> wrote:
Toggle quote (9 lines)
> Le 20 mars 2021 04:51:41 GMT-04:00, Maxime Devos <maximedevos@telenet.be> a écrit :

>>I prefer referring to the commit directly instead of by tag, as
>>the commit is required for SWH fallback if the repo disappears.
>
> Sorry to contradict, but using a tag is much more readable and works
> well with Software Heritage. At least, the linter seems to work in
> that case. Have I missed something?

Git tags should work with SWH, for both saving and falling back. Well,
Git tags should not be an issue for SWH. If they are, it is an issue.

I agree they are more readable and the current Guix packaging practise.
On the other hand, they can lead to in-place replacement, whereas
commits cannot. But it is not an issue about SWH, only caused by
upstream bad practise.


Cheers,
simon
D
D
Dhruvin Gandhi wrote on 22 Mar 2021 13:59
[PATCH 0/1] gnu: Add node-global-gradle-clean
(address . 47269@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20210322125916.21038-1-contact@dhruvin.dev
* Updated the copyright, specified the reason for disabling tests, and
tried updating the description following Maxime's advice.
* Kept the commit reference to git tag, following zimoun's and
Julien's suggestion.
* Asked the author of the upstream repo to not force push git-tags,
and they agreed.
* Built package for 3 rounds.
* Ran the linter.

Dhruvin Gandhi (1):
gnu: Add node-global-gradle-clean.

gnu/packages/node-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

--
2.31.0
D
D
Dhruvin Gandhi wrote on 22 Mar 2021 13:59
[PATCH 1/1] gnu: Add node-global-gradle-clean.
(address . 47269@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20210322125916.21038-2-contact@dhruvin.dev
* gnu/packages/node-xyz.scm (node-global-gradle-clean): New variable.
---
gnu/packages/node-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index b1d6d4ce59..98f91e07f7 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2021 Dhruvin Gandhi <contact@dhruvin.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,6 +99,30 @@ multiple node.js files, while providing useful information about output and exit
codes.")
(license license:expat)))
+(define-public node-global-gradle-clean
+ (package
+ (name "node-global-gradle-clean")
+ (version "1.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/VarunBarad/global-gradle-clean")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1fhm4jimnf7bl5drgwg39mjh8x4rns15hl0fz3bnxi9ikc6dm02y"))))
+ (build-system node-build-system)
+ (arguments '(#:tests? #f)) ; No tests.
+ (home-page "https://github.com/VarunBarad/global-gradle-clean")
+ (synopsis "Global Gradle Clean")
+ (description
+ "Global Gradle Clean is a Node.js package used to clean all gradle
+projects under a given directory. It uses the gradle wrapper to execute the
+clean task of each project.")
+ (license license:expat)))
+
(define-public node-long-stack-traces
(package
(name "node-long-stack-traces")
--
2.31.0
J
J
Jelle Licht wrote on 29 May 2023 16:24
Re: bug#47270: [PATCH 1/1] Add node-global-gradle-clean
(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
87o7m3mczp.fsf@fsfe.org
Pushed to master as cf78f5b54975679df97c3015a541114d8278f417 with some
stylistic changes, with a modest delay. Thanks again!

- Jelle
Closed
?