[PATCH]: gnu: emacs-magit: Drop the libgit backend.

  • Done
  • quality assurance status badge
Details
4 participants
  • Zhu Zihao
  • Liliana Marie Prikler
  • Liliana Marie Prikler
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Zhu Zihao
Severity
normal
Z
Z
Zhu Zihao wrote on 19 May 2022 07:08
(address . guix-patches@gnu.org)
868rqykt19.fsf@163.com
Also see the discussions in https://issues.guix.gnu.org/55427
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYoXRAhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/nblwD/SQ7307SKoMsurHNhiqAK/Z4ObKdi
vgJvPgfBZ+afLvwBAMemijTFpt2ssbE7KjVFAOWNnAyd4X3u8/nqbtjM+10G
=Hby8
-----END PGP SIGNATURE-----

--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
Z
Z
Zhu Zihao wrote on 19 May 2022 07:13
Re: bug#55517: Acknowledgement ([PATCH]: gnu: emacs-magit: Drop the libgit backend.)
(address . 55517@debbugs.gnu.org)
86sfp6je99.fsf@163.com
Fix the typo in commit message
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYoXSEhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/myigEA2WeKmyYoPqh6wQ35sL4g3dBEN71H
rxPJISTUYNOQ/hQA/iFSwLub62Lb6jaZlieYFUhN8OtnnMOzZ4lq3h33HnkA
=/ccW
-----END PGP SIGNATURE-----

--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
L
L
Liliana Marie Prikler wrote on 19 May 2022 08:01
b1f349c00d9f698350ef7de79e2a71599b85f54a.camel@ist.tugraz.at
For easier reading I suggest doing

Am Donnerstag, dem 19.05.2022 um 13:13 +0800 schrieb Zhu Zihao:
Toggle quote (2 lines)
> * gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]: Use G-
> expressions.
this in an extra commit and
Toggle quote (5 lines)
> <emacs>: Remove this argument.
> <exclude>: Exclude the magit-libgit.el and magit-libgit-pkg.el.
> <phases>: In phase 'patch-exec-paths', use search-input-file for perl
> executable.
> [inputs]: Remove emacs-libgit.
this either before or after it. Also don't forget the "#:" in the
arguments.

Cheers
Z
Z
Zhu Zihao wrote on 20 May 2022 05:52
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)(address . 55517@debbugs.gnu.org)
86leuw507n.fsf@163.com

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYocQrBUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/lvpAEAq9xOazY7oteVizCXnK2jEnrWB+26
RP9XEFckVpXVOPIA/34CHdNUO3OrpzeQ53ub8Bje+mkrdjyZczh9SNrZlD4N
=CTG0
-----END PGP SIGNATURE-----

From 983a23d9ae1fde345e9ad92f49dbb30e73cc8498 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 20 May 2022 11:51:02 +0800
Subject: [PATCH 2/2] gnu: emacs-magit: Drop the libgit backend.

Drop the libgit backend for following reasons:

1. The libgit backend of Magitis very incomplete. There's almost no benefits,
but extra maintenance efforts.

2. The libgit backend of Magit can be considered as an extra package. And it's
still in Proof-Of-Concept status so its quaility doesn't satisfy the
requirement of Guix package.

* gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]
<emacs>: Remove this argument.
<exclude>: Exclude the magit-libgit.el and magit-libgit-pkg.el.

[inputs]: Remove emacs-libgit.
---
gnu/packages/emacs-xyz.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8198638c13..d3ca00475e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -870,9 +870,11 @@ (define-public emacs-magit
(build-system emacs-build-system)
(arguments
(list
- #:emacs emacs-no-x
#:tests? #t
#:test-command #~(list "make" "test")
+ #:exclude #~(cons* "magit-libgit.el"
+ "magit-libgit-pkg.el"
+ %default-exclude)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'build-info-manual
@@ -920,7 +922,7 @@ (define-public emacs-magit
(inputs
(list git perl))
(propagated-inputs
- (list emacs-dash emacs-libgit emacs-transient emacs-with-editor))
+ (list emacs-dash emacs-transient emacs-with-editor))
(home-page "https://magit.vc/")
(synopsis "Emacs interface for the Git version control system")
(description
--
2.36.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
L
L
Liliana Marie Prikler wrote on 20 May 2022 08:04
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55517@debbugs.gnu.org)
07286c2df8ffb434e353bdde7bf8d427e9d7d9b2.camel@ist.tugraz.at
Am Freitag, dem 20.05.2022 um 11:52 +0800 schrieb Zhu Zihao:
Toggle quote (4 lines)
> - `(#:emacs ,emacs-no-x ;module support is required

> + (list
> + #:emacs emacs-no-x
You do drop that argument in the second commit, but I think we ought to
still keep the comment in this one. Do add a space between ';' and
"module", though.

Toggle quote (10 lines)
> gnu: emacs-magit: Drop the libgit backend.
>
> Drop the libgit backend for following reasons:
>
> 1. The libgit backend of Magitis very incomplete. There's almost no
> benefits, but extra maintenance efforts.
>
> 2. The libgit backend of Magit can be considered as an extra package.
> And it's still in Proof-Of-Concept status so its quaility doesn't
> satisfy the requirement of Guix package.
I'd rather write this as follows:

Toggle quote (6 lines)
> gnu: emacs-magit: Drop the libgit backend.
>
> The libgit backend currently provides next to no features, but
> demands extra maintenance overhead. It is in fact not a usable
> backend; thus let's not use it.

The "extra package" thing is imho not so correct from observing the
Makefile (even if there's an extra -pkg.el), so let's wait until
upstream makes that clearer.

Other than that LGTM.
M
M
Maxim Cournoyer wrote on 21 May 2022 04:13
Re: bug#55517: [PATCH]: gnu: emacs-magit: Drop the libgit backend.
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55517@debbugs.gnu.org)
87tu9jbpkj.fsf_-_@gmail.com
Hi Zhu,

Zhu Zihao <all_but_last@163.com> writes:

Toggle quote (12 lines)
> Fix the typo in commit message
>
>>From 8a2de5764a67bea1cbf789c8d6ce0ab0878ec40b Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Thu, 19 May 2022 13:01:46 +0800
> Subject: [PATCH] gnu: emacs-magit: Drop the libgit backend.
>
> Drop the libgit backend for following reasons:
>
> 1. The libgit backend of Magitis very incomplete. There's almost no benefits,
> but extra maintenance efforts.

Could you elaborate about "almost no benefits"? Even if it's a small
benefit, if it makes it faster, I'd still keep it since Magit is at
times excruciatingly slow.

Toggle quote (4 lines)
> 2. The libgit backend of Magit can be considered as an extra package. And it's
> still in Proof-Of-Concept status so its quaility doesn't satisfy the
> requirement of Guix package.

There's not really any "quality requirements" for Guix package; we
package stable releases when they're available; the rest is up to us
Guix users.

Do you happen to have a link to some exchange where Magit authors would
recommend against using the libgit library at this point in time to
speed up Magit? Otherwise, I'm not convinced.

Thanks,

Maxim
Z
Z
Zhu Zihao wrote on 21 May 2022 05:45
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 55517@debbugs.gnu.org)
865ylzy1pr.fsf@163.com
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (20 lines)
> Hi Zhu,
>
> Zhu Zihao <all_but_last@163.com> writes:
>
>> Fix the typo in commit message
>>
>>>From 8a2de5764a67bea1cbf789c8d6ce0ab0878ec40b Mon Sep 17 00:00:00 2001
>> From: Zhu Zihao <all_but_last@163.com>
>> Date: Thu, 19 May 2022 13:01:46 +0800
>> Subject: [PATCH] gnu: emacs-magit: Drop the libgit backend.
>>
>> Drop the libgit backend for following reasons:
>>
>> 1. The libgit backend of Magitis very incomplete. There's almost no benefits,
>> but extra maintenance efforts.
>
> Could you elaborate about "almost no benefits"? Even if it's a small
> benefit, if it makes it faster, I'd still keep it since Magit is at
> times excruciatingly slow.

It's slow? AFAIK magit user always complain that magit on Windows system
is slow. The process creation on *nix is much cheaper than Windows, so
Magit is not slow on *nix.

I've elaborated the reason in

The libgit backend of Magit is almost nothing, only one function is
implemented. `magit-bare-repo-p` will be used in magit-toplevel which is
called frequently in the magit source code. But this function is cached.

You can still say it's faster, but it's fair to say the libgit backend
doesn't worth the maintenance effort due to the inactive status of
upstream.

Toggle quote (8 lines)
>> 2. The libgit backend of Magit can be considered as an extra package. And it's
>> still in Proof-Of-Concept status so its quaility doesn't satisfy the
>> requirement of Guix package.
>
> There's not really any "quality requirements" for Guix package; we
> package stable releases when they're available; the rest is up to us
> Guix users.

If you really wants to keep the libgit backend. I'd suggest to make it a
dedicated package. If emacs-libgit is broken (again), magit is still usable.

Toggle quote (4 lines)
> Do you happen to have a link to some exchange where Magit authors would
> recommend against using the libgit library at this point in time to
> speed up Magit? Otherwise, I'm not convinced.

No, I've said above. The libgit backend is very very very imcomplete.

Toggle quote (6 lines)
>
> Thanks,
>
> Maxim


--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYohj0BUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/l1dwEA7Lx3vw5Qe6deTnxgi4+9s/laiwVF
zcCuENu6uLilTfYBAOsENZP5vOTBfMcOzD/vJ45XDtDWBYSwl2gRETebu2EM
=S2bE
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 22 May 2022 02:46
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55517@debbugs.gnu.org)
87tu9i9yy2.fsf@gmail.com
Hello,

Zhu Zihao <all_but_last@163.com> writes:

Toggle quote (26 lines)
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> Hi Zhu,
>>
>> Zhu Zihao <all_but_last@163.com> writes:
>>
>>> Fix the typo in commit message
>>>
>>>>From 8a2de5764a67bea1cbf789c8d6ce0ab0878ec40b Mon Sep 17 00:00:00 2001
>>> From: Zhu Zihao <all_but_last@163.com>
>>> Date: Thu, 19 May 2022 13:01:46 +0800
>>> Subject: [PATCH] gnu: emacs-magit: Drop the libgit backend.
>>>
>>> Drop the libgit backend for following reasons:
>>>
>>> 1. The libgit backend of Magitis very incomplete. There's almost no benefits,
>>> but extra maintenance efforts.
>>
>> Could you elaborate about "almost no benefits"? Even if it's a small
>> benefit, if it makes it faster, I'd still keep it since Magit is at
>> times excruciatingly slow.
>
> It's slow? AFAIK magit user always complain that magit on Windows system
> is slow. The process creation on *nix is much cheaper than Windows, so
> Magit is not slow on *nix.

I've never used it on Windows, but yes, when working with hundred of
commits it's quite slow; just refreshing the status buffer takes ages.

Toggle quote (7 lines)
> I've elaborated the reason in
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55427.
>
> The libgit backend of Magit is almost nothing, only one function is
> implemented. `magit-bare-repo-p` will be used in magit-toplevel which is
> called frequently in the magit source code. But this function is cached.

Thanks for that; I've looked at magit-libgit.el and it indeed doesn't
appear to provide much of anything yet. I guess we could drop the
dependency for now and revisit it in the future if/when development
picks up again on the magit/libgit integration.

Thanks,

Maxim
Z
Z
Zhu Zihao wrote on 22 May 2022 11:46
Re: bug#55517: Acknowledgement ([PATCH]: gnu: emacs-magit: Drop the libgit backend.)
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)(address . 55517@debbugs.gnu.org)
86o7zpaoih.fsf@163.com

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYooGZhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/lKXwEArTGTFgl4ZwH8NSLCtE6uOVul+9gG
NZ3CWhtQFFlLekkA/Aj/A9GJFvXT5m+ncvVDr87FUplp0YN8MIRSTZ3YNCQF
=C94O
-----END PGP SIGNATURE-----

From d2f9cc135e51cdde0623b5ffc453efa11f30a5eb Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 20 May 2022 11:51:02 +0800
Subject: [PATCH 2/2] gnu: emacs-magit: Drop the libgit backend.

The libgit backend currently provides next to no features, but
demands extra maintenance overhead. It is in fact not a usable
backend; thus let's not use it.

* gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]
<emacs>: Remove this argument.
<exclude>: Exclude the magit-libgit.el and magit-libgit-pkg.el.

[inputs]: Remove emacs-libgit.
---
gnu/packages/emacs-xyz.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8970b2d350..d3ca00475e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -870,9 +870,11 @@ (define-public emacs-magit
(build-system emacs-build-system)
(arguments
(list
- #:emacs emacs-no-x ;module support is required
#:tests? #t
#:test-command #~(list "make" "test")
+ #:exclude #~(cons* "magit-libgit.el"
+ "magit-libgit-pkg.el"
+ %default-exclude)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'build-info-manual
@@ -920,7 +922,7 @@ (define-public emacs-magit
(inputs
(list git perl))
(propagated-inputs
- (list emacs-dash emacs-libgit emacs-transient emacs-with-editor))
+ (list emacs-dash emacs-transient emacs-with-editor))
(home-page "https://magit.vc/")
(synopsis "Emacs interface for the Git version control system")
(description
--
2.36.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
L
L
Liliana Marie Prikler wrote on 23 May 2022 08:46
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55517@debbugs.gnu.org)
a694ed13ac31415c79f4d0d2906b7bbb93f147ee.camel@ist.tugraz.at
Am Sonntag, dem 22.05.2022 um 17:46 +0800 schrieb Zhu Zihao:

Toggle quote (6 lines)
> + (add-after 'set-magit-version 'patch-exec-paths
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((perl (search-input-file inputs "/bin/perl")))
> + (make-file-writable "magit-sequence.el")
> + (emacs-substitute-variables "magit-sequence.el"
> + ("magit-perl-executable" perl)))))
You do not need to let-bind perl here. Other than that LGTM.
Z
Z
Zhu Zihao wrote on 28 May 2022 04:11
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)(address . 55517@debbugs.gnu.org)
8635gu9zj5.fsf@163.com

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYpGE3hUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/kx9QD+Kg0Dun5hT+EGxLf/H60ClAbavWkY
U1nroWG5oQ7E3bcBAJFp5Uuntz9Jj0EtdMO8tGCPMGkqsZ6YN7us2BpazTsP
=JcKD
-----END PGP SIGNATURE-----

From 259d81469127306c4f345598f487122659a55c9c Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 28 May 2022 10:10:31 +0800
Subject: [PATCH 2/2] gnu: emacs-magit: Drop the libgit backend.

The libgit backend currently provides next to no features, but
demands extra maintenance overhead. It is in fact not a usable
backend; thus let's not use it.

* gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]
<emacs>: Remove this argument.
<exclude>: Exclude the magit-libgit.el and magit-libgit-pkg.el.

[inputs]: Remove emacs-libgit.
---
gnu/packages/emacs-xyz.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a9dc687af4..21359882ad 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -870,9 +870,11 @@ (define-public emacs-magit
(build-system emacs-build-system)
(arguments
(list
- #:emacs emacs-no-x ;module support is required
#:tests? #t
#:test-command #~(list "make" "test")
+ #:exclude #~(cons* "magit-libgit.el"
+ "magit-libgit-pkg.el"
+ %default-exclude)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'build-info-manual
@@ -920,7 +922,7 @@ (define-public emacs-magit
(inputs
(list git perl))
(propagated-inputs
- (list emacs-dash emacs-libgit emacs-transient emacs-with-editor))
+ (list emacs-dash emacs-transient emacs-with-editor))
(home-page "https://magit.vc/")
(synopsis "Emacs interface for the Git version control system")
(description
--
2.36.1
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
L
L
Liliana Marie Prikler wrote on 28 May 2022 08:56
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55517-done@debbugs.gnu.org)
c049cbc71f86940f33d3b2b78556700105805eec.camel@gmail.com
Pushed with some slight rewordings in the commit message.

Thanks
Closed
?