emacs-libgit tests are broken

DoneSubmitted by Liliana Marie Prikler.
Details
7 participants
  • Zhu Zihao
  • Taiju HIGASHI
  • Kyle Meyer
  • Liliana Marie Prikler
  • Liliana Marie Prikler
  • Maxim Cournoyer
  • Maxime Devos
Owner
unassigned
Severity
normal
Merged with
L
L
Liliana Marie Prikler wrote on 15 May 13:19 +0200
(address . bug-guix@gnu.org)
5a334f2254b27822d54eaac7479a121203df891b.camel@gmail.com
With the update to Emacs 28, emacs-libgit (a requirement for emacs-
magit) fails to build with the following test error:

Test project /tmp/guix-build-emacs-libgit-20200515-1.0ef8b13.drv-
0/build
Start 1: libegit2_annotated-commit
1/29 Test #1: libegit2_annotated-commit ........ Passed 0.38 sec
Start 2: libegit2_blame
2/29 Test #2: libegit2_blame ................... Passed 0.39 sec
Start 3: libegit2_blob
3/29 Test #3: libegit2_blob ....................***Failed 0.43 sec
Running 4 tests (2022-05-15 07:25:56+0000, selector ‘t’)
Test blob-binary backtrace:
signal(wrong-type-argument (utf-8-string-p "\177ELF\2\1\1\0\0\0\0\0\
apply(signal (wrong-type-argument (utf-8-string-p "\177ELF\2\1\1\0\0
(setq value-42 (apply fn-40 args-41))
(unwind-protect (setq value-42 (apply fn-40 args-41)) (setq form-des
(if (unwind-protect (setq value-42 (apply fn-40 args-41)) (setq form
(let (form-description-44) (if (unwind-protect (setq value-42 (apply
(let ((value-42 'ert-form-evaluation-aborted-43)) (let (form-descrip
(let* ((fn-40 #'string=) (args-41 (condition-case err (let ((signal-
(let* ((repo (libgit-repository-open path)) (blob (libgit-revparse-s
(let ((default-directory path)) (init) (commit-change "filename" str
(progn (make-directory path 'parents) (let ((default-directory path)
(unwind-protect (progn (make-directory path 'parents) (let ((default
(let ((path "/tmp/guix-build-emacs-libgit-20200515-1.0ef8b13.dr...")
(let* ((str (unibyte-string 127 69 76 70 2 1 1 0 0 0 0 0 0 0 0 0 3 0
(let ((lexical-binding nil)) (let* ((str (unibyte-string 127 69 76 7
(lambda nil (let ((lexical-binding nil)) (let* ((str (unibyte-string
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name blob-binary :documentation nil :body
ert-run-or-rerun-test(#s(ert--stats :selector t :tests [#s(ert-test
ert-run-tests(t #f(compiled-function (event-type &rest event-args) #
ert-run-tests-batch(nil)
ert-run-tests-batch-and-exit()
command-line-1(("-L" "/tmp/guix-build-emacs-libgit-20200515-1.0ef8b1
command-line()
normal-top-level()
Test blob-binary condition:
(wrong-type-argument utf-8-string-p
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\7\0\0\0\0\0\0@\0\0\
0\0\0\0\0\270\33\0\0\0\0\0\0\0\0\0\0@\08\0\11\0@\0\35\0\34\0\6\0\0\0\5\
0\0\0@\0\0\0\0\0\0\0")
FAILED 1/4 blob-binary (0.041795 sec)
passed 2/4 blob-create-fromdisk (0.023014 sec)
passed 3/4 blob-create-fromstring (0.022546 sec)
passed 4/4 blob-text (0.044085 sec)

Ran 4 tests, 3 results as expected, 1 unexpected (2022-05-15
07:25:56+0000, 0.301178 sec)

1 unexpected results:
FAILED blob-binary
[...]

I have no idea what causes it or where utf-8-string-p even comes from,
but the implementation of string= appears to have changed. When
running the build locally another test also appears flaky due to weird
time stamp conversions.

Cheers
M
M
Maxim Cournoyer wrote on 16 May 04:30 +0200
control message for bug #55435
(address . control@debbugs.gnu.org)
87v8u6ky3u.fsf@gmail.com
merge 55435 55427
quit
Z
Z
Zhu Zihao wrote on 16 May 12:01 +0200
Re: emacs-libgit tests are broken
(address . 55427@debbugs.gnu.org)
86pmkdsskh.fsf@163.com
Issue submitted to upstream with my guess and explanation.


This issue is not trivial and there's no way to workaround it IMO.
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYoIhXhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/kfkwEA+I1UxB47FEz9W9OkJmIJUyBUOdoy
ILas4brDZ/g7MeUA/1Mz0h+sMdt5023DhBdGB9QSt0bwIJesetH5thKiO/QJ
=nBT0
-----END PGP SIGNATURE-----

T
T
Taiju HIGASHI wrote on 16 May 12:28 +0200
(address . 55427@debbugs.gnu.org)
877d6l4vrg.fsf@taiju.info
Hi,

I was also watching for this issue.
It seems that the libegit2 repository has just reported this issue.


- taiju
T
T
Taiju HIGASHI wrote on 16 May 12:40 +0200
(address . 55427@debbugs.gnu.org)
87wnel3glh.fsf@taiju.info
Sorry, the timing of my post was wrong.

To Zihao:
Thanks for reporting the issue.
L
L
Liliana Marie Prikler wrote on 17 May 08:59 +0200
(address . control@debbugs.gnu.org)
31b49f6975e049f2fdb0e00495189446605a6f60.camel@ist.tugraz.at
merge 55462 55427
thanks
L
L
Liliana Marie Prikler wrote on 17 May 09:00 +0200
(address . control@debbugs.gnu.org)
18724fd395503307064b3194b7a2cfb6b122e112.camel@ist.tugraz.at
merge 55469 55427
thanks
M
M
Maxime Devos wrote on 17 May 11:26 +0200
(address . control@debbugs.gnu.org)
ebcc7a85649d9ee103fff2cef1e686d5fd356f1e.camel@telenet.be
merge 55427 55435 55462 55469
thanks

(duplicate)
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYoNqOhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ux/AQDgIH1ai1WDcAChuSwyij4irkEx
65OBp+qPCvliMjhKSAD/f6UhlzfzUhj6+6f8qbGT5FaIp6FNTE3b0bwDZVgn/go=
=XOak
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 17 May 13:41 +0200
(address . control@debbugs.gnu.org)
440d518590ea8514a86319ef35c8b165ce3ea490.camel@ist.tugraz.at
merge 55479 55427
thanks

Whoever solves this issue can close 5 bugs at once :)
Z
Z
Zhu Zihao wrote on 17 May 17:14 +0200
(address . 55427@debbugs.gnu.org)
861qwsrxyc.fsf@163.com
Due to the inactive status of upstream. I'm planning to remove the
emacs-libgit input of emacs-magit.

magit will still work with the git executable if there's no
emacs-libgit.

Any thoughts?


Zhu Zihao <all_but_last@163.com> writes:

Toggle quote (8 lines)
> [[PGP Signed Part:Undecided]]
> Issue submitted to upstream with my guess and explanation.
>
> https://github.com/magit/libegit2/issues/121
>
> This issue is not trivial and there's no way to workaround it IMO.


--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYoO8WxUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/nJVgD+Ofd0zK6epEkMXNy7Gfa8b2P6+BGl
+bL1gRcg8o+2b5UBAONtL6r8YQ1IwdN2vrhajBdr2HPVMjsnPPI1w7GDDd0E
=p63J
-----END PGP SIGNATURE-----

K
K
Kyle Meyer wrote on 18 May 01:10 +0200
Re: bug#55427: emacs-libgit tests are broken
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55427@debbugs.gnu.org)
87v8u37o34.fsf@kyleam.com
Zhu Zihao writes:

Toggle quote (8 lines)
> Due to the inactive status of upstream. I'm planning to remove the
> emacs-libgit input of emacs-magit.
>
> magit will still work with the git executable if there's no
> emacs-libgit.
>
> Any thoughts?

Good idea. There's no real downside to disabling libgit2 support
because magit-libgit.el does very little at this point.
L
L
Liliana Marie Prikler wrote on 18 May 08:14 +0200
Re: emacs-libgit tests are broken
8913b7de248eb03b468c3ca3fb85f5f749884169.camel@ist.tugraz.at
Am Dienstag, dem 17.05.2022 um 23:14 +0800 schrieb Zhu Zihao:
Toggle quote (2 lines)
> Due to the inactive status of upstream. I'm planning to remove the
> emacs-libgit input of emacs-magit.
I don't think we need measures quite as drastic as this. A hotfix for
emacs-libgit was pushed to master, which causes builds to succeed again
(see e.g. [1]). Since we're talking about free software here, it would
be more constructive to work on a proper patch – if upstream won't take
it, one can always fork it.

Toggle quote (4 lines)
> magit will still work with the git executable if there's no
> emacs-libgit.
>
> Any thoughts?
I don't see any benefits in this approach, do you?

M
M
Maxime Devos wrote on 18 May 12:02 +0200
Re: bug#55427: emacs-libgit tests are broken
e40dff8508356ebefb13527467cbd338217e9d41.camel@telenet.be
Zhu Zihao schreef op di 17-05-2022 om 23:14 [+0800]:
Toggle quote (5 lines)
> magit will still work with the git executable if there's no
> emacs-libgit.
>
> Any thoughts?

Due to issues with TRAMP, magit currently cannot always find the git
executable, while AFAICT there are no problems with emacs-libgit.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYoTEShccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7poKAQCOYcMFz3pvPdalWUcYPFFRkhgd
DVpeNKtmUqgAVCb8LAEAkipvPXrVASM78DFysINxSCqqXs6uet+Y9dd8do1mmAc=
=hsUF
-----END PGP SIGNATURE-----


Z
Z
Zhu Zihao wrote on 18 May 15:13 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 55427@debbugs.gnu.org)
86v8u3ou8q.fsf@163.com
magit doesn't use libgit for remote directory.

Maybe there're other reasons that make your magit work on remote file :P.


Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (16 lines)
> [[PGP Signed Part:Undecided]]
> Zhu Zihao schreef op di 17-05-2022 om 23:14 [+0800]:
>> magit will still work with the git executable if there's no
>> emacs-libgit.
>>
>> Any thoughts?
>
> Due to issues with TRAMP, magit currently cannot always find the git
> executable, while AFAICT there are no problems with emacs-libgit.
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]


--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYoTx5RUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/mClgD8D2HHFDMY6ZluaAcDR8jAJTisqeu1
XrlvSoiALRBW1w8BAJeN7Zd56kpCBb36mPAR/K3ijKrAFi/vnHp6SQZ4K5UJ
=CnG+
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 18 May 15:24 +0200
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55427@debbugs.gnu.org)
d8ba751775f3751500f8d9b856a90e3ab15b3057.camel@telenet.be
Zhu Zihao schreef op wo 18-05-2022 om 21:13 [+0800]:
Toggle quote (7 lines)
> magit doesn't use libgit for remote directory.
>
> Maybe there're other reasons that make your magit work on remote file
> :P.
>
> https://github.com/magit/magit/blob/master/lisp/magit-git.el#L93

My concern is about not breaking the local use case.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYoTzkxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sqaAQDDqWUbmRXw3PdwSwiypHzuda9M
Q13A08YrgMCyzkHjRQEAj4aMyeQggkKGRLk/xbxDqa3YWRyXW/c1NW+dNANDzQc=
=SxTx
-----END PGP SIGNATURE-----


Z
Z
Zhu Zihao wrote on 18 May 15:17 +0200
Re: emacs-libgit tests are broken
(name . Liliana Marie Prikler)(address . liliana.prikler@ist.tugraz.at)(address . 55427@debbugs.gnu.org)
86wnejm0qw.fsf@163.com
Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> writes:

Toggle quote (8 lines)
>> magit will still work with the git executable if there's no
>> emacs-libgit.
>>
>> Any thoughts?
> I don't see any benefits in this approach, do you?
>
> [1] http://ci.guix.gnu.org/build/859957/details

I don't see any benefits on libgit implementation.
The only method supported by libgit backend is `magit-bare-repo-p`[1],
magit use git executable to do 99.9% works.

The libgit backend should be a separated package. There's
it. Its quaility is poor because it's currently in POC status and the
development status has been put on hold indefinitely.[2]


--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYoTztxUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/kVYQD/XKTj8hnyKYGRKTGJ5AYbMPSMmaBz
6+qtzLyeyl2Y9GgA/A/l93FnAimhvK5AfjFYkvgumfEvgHFzVvs8cWkAu4YJ
=wgws
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 18 May 15:30 +0200
Re: bug#55427: emacs-libgit tests are broken
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 55427@debbugs.gnu.org)
83d70d8a4e37041560b8e695960d9722b6ca45d4.camel@telenet.be
Maxime Devos schreef op wo 18-05-2022 om 15:24 [+0200]:
Toggle quote (11 lines)
> Zhu Zihao schreef op wo 18-05-2022 om 21:13 [+0800]:
> > magit doesn't use libgit for remote directory.
> >
> > Maybe there're other reasons that make your magit work on remote
> file
> > :P.
> >
> > https://github.com/magit/magit/blob/master/lisp/magit-git.el#L93
>
> My concern is about not breaking the local use case.

Maybe this can be fixed by patching "magit-git-executable" in Guix
with an absolute path -- that procedure is only used on the local host,
so that shouldn't cause any problems with TRAMP. Will send a mail to
30434.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYoT08BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oTMAP9ikhJjtjo+GQpHltNFpOYnO1P+
Muoa6TXphtUhNfulpwD/XqgdSJEG4mvXTcTyEVltMWgJb9uubsjGzncMvysxsQA=
=QmHr
-----END PGP SIGNATURE-----


Z
Z
Zhu Zihao wrote on 18 May 17:34 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 55427@debbugs.gnu.org)
86leuylunl.fsf@163.com
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (2 lines)
>> My concern is about not breaking the local use case.


Magit use git executable for 99.9% work. Guix user should install git
(or we patch the git absolute path for it) for almost all functionality.

libgit doesn't save you from missing git executable.

--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

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

iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYoUSjhUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQZjl/hPdmk/nZ3AD/TUFyrfGjqir9MSLTo6ww5qYkrYNZ
8MmB/rbb+9KET6MBAL6gBJO5TXwcsprKofppmTFBU8PUMwJKdJuGk58O7iwM
=Rgte
-----END PGP SIGNATURE-----

K
K
Kyle Meyer wrote on 19 May 00:44 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)
87mtfe795p.fsf@kyleam.com
Maxime Devos writes:

Toggle quote (5 lines)
> Maybe this can be fixed by patching "magit-git-executable" in Guix
> with an absolute path -- that procedure is only used on the local host,
> so that shouldn't cause any problems with TRAMP. Will send a mail to
> 30434.

Right, using an absolute path for magit-git-executable is _now_ fine.
Magit started using separate executables for the local and remote
operations in 1423c54d (magit-remote-git-executable: New option,
2021-07-20), part of the 3.2.0 release. bug#30434 was active back in
2018.
?
Your comment

This issue is archived.

To comment on this conversation send email to 55427@debbugs.gnu.org