Should asdf-build-system/sbcl use load-system instead of compile-system?

  • Done
  • quality assurance status badge
Details
3 participants
  • Guillaume Le Vaillant
  • Liliana Marie Prikler
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 1 Jul 2022 12:16
(address . bug-guix@gnu.org)(address . glv@posteo.net)
87edz5jfxm.fsf@ambrevar.xyz
While trying to package


I hit a strange issue in which it would fail to compile, while calling
`asdf:load-system' locally worked.

Then I realized that our asdf-build-system/sbcl uses
`asdf:compile-system' instead of `asdf:load-system'.

From the ASDF doc:

Toggle snippet (7 lines)
This will make sure all the files in the system are compiled, but not
necessarily load any of them in the current image; on most systems, it
will _not_ load all compiled files in the current image. This function
exists for symmetry with 'load-system' but is not recommended unless you
are writing build scripts and know what you're doing.

So should we really use it?

By the way this _may_ be related to the issue we've got with loading the
tests of some packages, like sbcl-jonathan:

Toggle snippet (4 lines)
;; Tests fail with: Component JONATHAN-ASD::JONATHAN-TEST not found,
;; required by #<SYSTEM "jonathan">. Why?

Recipe to reproduce:

- cd Cleavir
- guix shell sbcl sbcl-acclimation sbcl-concrete-syntax-tree sbcl-closer-mop -- sbcl
- (asdf:initialize-source-registry `(:source-registry (:tree ,(uiop:getcwd)) :inherit-configuration))
- (asdf:compile-system :cleavir-abstract-interpreter)

Toggle snippet (22 lines)
debugger invoked on a SB-PCL:CLASS-NOT-FOUND-ERROR in thread
#<THREAD "main thread" RUNNING {100B598173}>:
There is no class named CLEAVIR-ABSTRACT-INTERPRETER:STRATEGY.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [TRY-RECOMPILING ] Recompile control and try loading it again
1: [RETRY ] Retry
loading FASL for #<CL-SOURCE-FILE "cleavir-abstract-interpreter" "control">.
2: [ACCEPT ] Continue, treating
loading FASL for #<CL-SOURCE-FILE "cleavir-abstract-interpreter" "control">
as having been successful.
3: Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
5: Retry ASDF operation.
6: Retry ASDF operation after resetting the
configuration.
7: [ABORT ] Exit debugger, returning to top level.

And then

- (asdf:load-system :cleavir-abstract-interpreter)

works like a charm!

Thoughts?

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

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmK+yZUSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/I3QH/A0cPGfqAbnZBiYtwx8KJ5wStVSlodQZ
rep9sWLtWpLe8+EO/RTQoz2tkV43hKf0zB7Xo8OWO5dagsFG4Q/3UD2k/Duj1NLT
Tvp9GG/6BqBunTzHqNlAp5V+XXoFWU/hWli1XpxrMqS2ITtcn2NR4vary0pFGLHf
pLP8UkS/5LNMGXEjFMuctxRguDFV08tH+nj630GuSj9Tc0CrMvfJV+vHGbOSQyQ1
eYkpJq5IzKYwwL1x+DFLe/yGW5vejESbhDqucFzPr/tIK7UF81GtcDaD61MWBbNX
2sW+mSPIFoYT4yMJ89N+t8nrEzb8oBOz8DLuN5Snhz3GMlkfw+D6PZE=
=SecM
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 1 Jul 2022 13:13
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 56334@debbugs.gnu.org)
87o7y9yss4.fsf@kitej
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (29 lines)
> While trying to package
>
> https://github.com/s-expressionists/Cleavir
>
> I hit a strange issue in which it would fail to compile, while calling
> `asdf:load-system' locally worked.
>
> Then I realized that our asdf-build-system/sbcl uses
> `asdf:compile-system' instead of `asdf:load-system'.
>
> From the ASDF doc:
>
> This will make sure all the files in the system are compiled, but not
> necessarily load any of them in the current image; on most systems, it
> will _not_ load all compiled files in the current image. This function
> exists for symmetry with 'load-system' but is not recommended unless you
> are writing build scripts and know what you're doing.
>
>
> So should we really use it?
>
> By the way this _may_ be related to the issue we've got with loading the
> tests of some packages, like sbcl-jonathan:
>
> ;; Tests fail with: Component JONATHAN-ASD::JONATHAN-TEST not found,
> ;; required by #<SYSTEM "jonathan">. Why?
>
> [...]

Hi,

The cl-gamepad package has a similar issue (and a custom build phase
using load-system instead of compile-system as a workaround).

If the doc of ASDF indicates that load-system is the preferred way to
compile systems, we should probably do that, and remove current
workarounds and check if everything is still working.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYr7ayw8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j85gwD8DCcYTON9Xz6HHIJzg7JhBKpfEdkHJfmVWcgp
cP/8aCgA/A8adxjVcoJBJSJ8LCSF8bNvmv9wG0/ZZW3XSUlYl3Na
=f1GX
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 1 Jul 2022 13:45
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
87tu81vyxe.fsf@ambrevar.xyz
Do you have time to try it out?
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmK+3m0SHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/1iUH/jF0ORW9blN0zNehm2WWNNy2sEl9YwTq
UXyBGUb5A/w4cXNjnZj4NKoFh7PaVzse7+r4FgHcL42wll7BqREHdx0ZdPjyI0va
990gjUZZHBn3LvL22G22NemkFoEs3lqX7n3H1r+pIb83tjGOU5eGsV1YpRLxkXbC
2SEGxMGoWob7DZi/6IzgjXWTISDKSqxUiGhT+35diln0jtrhW6scvzOlV5NlF+a3
k6adT4ZfzUpLX6A5KnLD+G0H5jltF2IeQSXAKK/jkWV15ZZdFwVU2TkM1+GmdDRZ
kYmQ0HHDDTa4nK4X44RNAZKdukihgXh5phaGnY24lFE9iObLY/LCVts=
=17B2
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 1 Jul 2022 14:22
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 56334@debbugs.gnu.org)
87k08xypu9.fsf@kitej
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (2 lines)
> Do you have time to try it out?

Not right now, as I'm about to take a vacation.

The main change is a one-liner in the 'compile-systems' function in
"guix/build/lisp-utils.scm"; that would be quick.
However recompiling all the Lisp packages and finding which of them
could be simplified thanks to the change would take more time...

So, if you have the time, go for it.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYr7prg8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+iRAD/a9mmOND6PGsR4/DNXQvL1jR4a9J3VRe+I48C
yiXqb1wA/R00iLrPQ/4QIMb8oQiII4CIuB7AaoUmjgLzKI15Ucls
=YOS8
-----END PGP SIGNATURE-----

L
L
Liliana Marie Prikler wrote on 1 Jul 2022 16:30
(address . glv@posteo.net)
c65487060149d53a70d13cdfb50332b68ac440a6.camel@ist.tugraz.at
Am Freitag, dem 01.07.2022 um 12:16 +0200 schrieb Pierre Neidhardt:
Toggle quote (14 lines)
> [...]
>
> From the ASDF doc:
>
> --8<---------------cut here---------------start------------->8---
> This will make sure all the files in the system are compiled, but not
> necessarily load any of them in the current image; on most systems,
> it will _not_ load all compiled files in the current image.  This
> function exists for symmetry with 'load-system' but is not
> recommended *unless you are writing build scripts* and know what
> you're doing.
> --8<---------------cut here---------------end--------------->8---
>
> So should we really use it?
In this case, I'd argue that we *are* the build script and that
packagers know what they're doing when they override build in case that
asdf:compile-system fails. Unless I'm wrong, we're not actually
interested in loading all compiled files into the current image, are
we?

Cheers
P
P
Pierre Neidhardt wrote on 1 Jul 2022 16:43
(address . glv@posteo.net)
87r134x59q.fsf@ambrevar.xyz
Hi Liliana,

It's tempting to think that Guix packages are good candidates for "build
scripts", but in the face of it, it may very well be that ASDF authors
had something completely different in mind.

In any case, asdf:compile-system seems to be underused to the point that
barely anyone beside Guix packagers ever experience it.

Cheers!
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmK/CBESHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/70wH/3IeboIPzW0vdycyTQeKAi/ecbSsOe6N
v3Gt2+4cSflnOP57TsH8MmRfJPQytVuXg6mpOfrLjbQOpBVLrAAEaTsKm1EmjeZq
aVkWhMypNoZ8+VNri0Vfgy1PNf4f7DxuLzQ+RIEpvKbFqBpUlA4rLAGH9K+8xKbF
9vKgEyEqs+4VmL3UA/Gx3g5B8OMDk8hQfTEEkY2isnLmqVbvWuWfFieyeEKto7ZP
0W1399/WhY66txb5H0qVashVs0325jYa65Vjb8DXIrPNcVYwdtwNYaIDFgoZoXnd
MOGxlcdaubJbqaSrmIHrTSsMMykXBGwH+bOn7j+/oxMreK1HRqfJ2wA=
=rUjb
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 1 Jul 2022 16:46
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
87o7y8x544.fsf@ambrevar.xyz
Hi Guillaume,

I gave it a go and your suggestion indeed cuts it for cleavir and
cl-gamepad.

It did not fix it for the tests though.

I did some more testing, and this is what I found out on one of the
failing systems (cl-reexport): from a --pure sbcl repl, if I load the
.asd files manually then run test-system, I can reproduce the issue.

However, if I run

Toggle snippet (6 lines)
(asdf:initialize-source-registry
`(:source-registry (:tree ,(uiop:getcwd))
:inherit-configuration))
(asdf:test-system :cl-reexport)

then it works!

In other words, I believe that `asdf:load-asd' is yet another under-used
ASDF function, and we should probably go with the officially recommended
way, namely adding the source folder to the ASDF registry.

Thoughts?

I'll try it out then send a patch.

Cheers!
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmK/CNsSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/pNsH/AmNpDwOYzhYcl74U6DJJieJeHSVbXQD
sswQlVO7MtldapOqbC1jovsvAN3fSiF6hWM7b11bwtJC49fKZq1zX1G9I57q3Mnv
YSyzmto9ERf32eAR18z2tvccmUMx9rJhcHc9isCFXrxFff7KPB6DdpS8pUPXpXT6
+gGTXcVhssztZOOC+SecH7n3c/Do0zUtAGbYeJvF1fGMMock9XcFqNhlDwA18yPk
fWHOEuTu/I8BlD5odomGA0PR6MV+uECKEzTLofzPY4hPUX9ux/Ku/r6sfbSPLnNE
Kt/LYeHyxx+8XuRdwILGdphQIV8Fv5RKLh8Ly3AQ0zGnpMAWRUlG6lk=
=BgXf
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 1 Jul 2022 18:40
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 56334@debbugs.gnu.org)
87fsjkzsl4.fsf@kitej
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (30 lines)
> Hi Guillaume,
>
> I gave it a go and your suggestion indeed cuts it for cleavir and
> cl-gamepad.
>
> It did not fix it for the tests though.
>
> I did some more testing, and this is what I found out on one of the
> failing systems (cl-reexport): from a --pure sbcl repl, if I load the
> .asd files manually then run test-system, I can reproduce the issue.
>
> However, if I run
>
> (asdf:initialize-source-registry
> `(:source-registry (:tree ,(uiop:getcwd))
> :inherit-configuration))
> (asdf:test-system :cl-reexport)
>
> then it works!
>
> In other words, I believe that `asdf:load-asd' is yet another under-used
> ASDF function, and we should probably go with the officially recommended
> way, namely adding the source folder to the ASDF registry.
>
> Thoughts?
>
> I'll try it out then send a patch.
>
> Cheers!

I think using the 'initialize-source-registry' technique instead of
'load-asd' would also make the '#:asd-files' and '#:test-asd-file'
arguments of the build system unnecessary, so they could be removed.
P
P
Pierre Neidhardt wrote on 1 Jul 2022 19:07
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
87fsjkwylz.fsf@ambrevar.xyz
Exactly, I already wrote the patch that did! :)

Will send soon, need to do some more testing.
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmK/KcgSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/8IIH/iBWNMYTQ7bkhahHGoHCY30QSMdycn9K
MxYH0KRMPLSTBSxbAZcaEdpYURYTyxqwLrDeeJPYRsqgfJi+++I2ckMEXJb9VCTo
Vke6cBYx5eTkgWPpAK9j0/on2UxwiYTKf0rSvYhxtq7p71Mk3LKbAgpyUn97h3zp
A2TxgiVSbuzPfLNYfWF0eC2qUukua/wpf578lo7mEWwWuKA4HYQXf5ZpOU1zYib8
UCjnaEqmSAX1ZGQlozv9NHYIHdCJq8SOeor8uq/qoqKQQ1N6RfigJmuqQJxS6Etg
kmM+Vxd4ae/753zv+hoh90kM+WDUGMjkzsYod1LDjIX9oYbFpiQle/s=
=uexg
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 2 Jul 2022 12:17
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
875ykfkedc.fsf@ambrevar.xyz
Robert Goldman from ASDF found out why the "COMPONENT not found" issue happens:


So either we fix most of the Prove-depending libraries, or we just do
what's expected from every one, that is, add the directory to the ASDF
registries.

The latter is much easier of course...
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmLAGz8SHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/HJYIAKeew3qq/Nv9HIu32hZxbwDRNXuAI81r
S1nj13S76+qV4FiJSciQ0JX9yutqf2dtiXuZk9exNrzcuySiWpCtqROzOmtGxb+D
h4yj6rzrph42zGn/DkjEivwPkTHhgFLqZhh8Vw8JvOCttmgRiZJ+AtRbicThqvv7
MKfAwDkrF0IbyoskeX0oicX4hcJac7xR9jkpoYGh4CuJ6xHkyJIli03ZXPAo6Ta1
Jym3fU3Yn4PusKZ3ZONhTsrdxFGj/JSxsLYvYZjNGsejeFk2eHWhwTetJbLrz0T2
3WLClDvPkbDmCuJ/rJ+Ky+1cfTztbF3MdzH4j5HHC2xElclXRMXXjws=
=SMpt
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 3 Jul 2022 12:19
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 56334@debbugs.gnu.org)
87tu7ypk5s.fsf@kitej
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (10 lines)
> Robert Goldman from ASDF found out why the "COMPONENT not found" issue happens:
>
> https://gitlab.common-lisp.net/asdf/asdf/-/issues/119#note_9808
>
> So either we fix most of the Prove-depending libraries, or we just do
> what's expected from every one, that is, add the directory to the ASDF
> registries.
>
> The latter is much easier of course...

As adding the build directory to ASDF's registry is easier and also
simplifies asdf-build-system, would should do that. And we could still
open issues upstream for libraries that are starting their test suites
in a wrong way.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYsFurw8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+zGQD+NiigCw05fFad42t8lMoQS25tKkEr4AGKdUEz
/8yuzxoA/0H6AN61R4q0qmxVK4LzOEsEuJB6OFLrNc6iqVI69GBC
=rcI8
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 4 Jul 2022 17:18
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
87tu7woqis.fsf@ambrevar.xyz
I found a blocker: Some StumpWM contribs like sbcl-stumpwm kbd-layout
make calls at the top level which expect a running session of StumpWM,
and thus asd:load-system will fail on them, while asdf:compile-system
used to work.

Suggestion: add an option to our build system to choose between
asdf:load-system and asdf:compile-system. We default to
asdf:load-system and use asdf:compile-system in stumpwm-contrib.

Thoughts?
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmLDBLsSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/EHQH+gKcQShbtEUkxMWqC8zRnP6TVPhmUUQr
TM58zHOV93V+DyxKiM07DB8a9B8l69jGXBqVbKpO4B5ElJ2WFjGwre71WSxR9ef0
UGPHVj/NY3434sU65Lg2ZfBmUShuk2feYa2hmbb54omtNgoaW2qkNSYP2P4oEJZ9
3tnQOm+p7T4S4tLk+Nei9hvx1+oNJ9FjOd3PZLiAu2QEzg6UR1w99oLLDUALIRdP
Q2VzCfb8dhRSBGunvItG0toVpzMlCIRTS7+Ks13+C9OXC0G6IlUeZe82qfv6SlyR
DpgWhJD95sko7m6j/qcvsivJ32HdLfAggU+uyhyS5+OJHllSNMvdK7Q=
=69ZX
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 4 Jul 2022 21:57
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
875ykc3b2h.fsf@ambrevar.xyz
Find the first draft attached. Do not merge, we need to figure out what
to do with sbcl-stumpwm-kbd-layouts.
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmLDRjYSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/MJMH/2Zyf5+6xD7beuVkLFIM3tZgLxbjMtc7
l+TVqFDIoD3RESsT21tntLr/pWfdg0trZrMZtpxrdNJvOP+OCXP8M37wdpfvgYpE
LmF7VNMTxxVR4cU+xZGSsVQ7ZwJZjvUY9rD+lfB0mdgP916mudkJYnxhBf+MIh4P
x0kHfYhtwJCNyTzOIoDGIaF9/OpAEZXVBi5btb2LXHzJM8pCFerpGkA0yMdTFZK4
9j+rRfjX5nO5/dqaVcFNBk157Uc36Ua3OjkC07ZRWVO80gDm4pUoSFUT6SgA57FS
tiNdBasWSLhxTQER26XHBpcioRGIVwWRjeEvxEIbEulmN6TDA3p4/Og=
=iOEH
-----END PGP SIGNATURE-----

This fixes 2 flaws in the asdf-build-system:

1. Use asdf:load-system instead of asdf:compile-system. The latter is not
recommended by the manual and fails with at least 2 systems.

2. Add the build directory to the ASDF registry so that .asd files are
automatically found. This has a double benefit:
- It dramatically simplifies package definition writing.
- It fixes a bug which used to cause the check phase to fail.

All commits after the first two adapt the Common Lisp package definitions to
the new build system and in particular fix many check phases.
From fd4eb6c4d5fce8d3c1ef205b541ddf76ed0c478a Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Fri, 1 Jul 2022 16:37:44 +0200
Subject: [PATCH 01/18] guix: build: Switch from asdf:compile-system to
asdf:load-system.

* guix/build/lisp-utils.scm (compile-systems): Switch from asdf:compile-system
to asdf:load-system.

According to the ASDF manual:

This will make sure all the files in the system are compiled, but not
necessarily load any of them in the current image; on most systems, it
will _not_ load all compiled files in the current image. This function
exists for symmetry with 'load-system' but is not recommended unless you
are writing build scripts and know what you're doing.
---
guix/build/lisp-utils.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/build/lisp-utils.scm b/guix/build/lisp-utils.scm
index 17d2637f87..bd6b21d5a6 100644
--- a/guix/build/lisp-utils.scm
+++ b/guix/build/lisp-utils.scm
@@ -116,7 +116,7 @@ (define (compile-systems systems asd-files)
`(asdf:load-asd (truename ,asd-file)))
asd-files)
,@(map (lambda (system)
- `(asdf:compile-system ,system))
+ `(asdf:load-system ,system))
systems))))
(define (test-system system asd-files test-asd-file)
--
2.32.0
From 22de0cac8481df8b9645e08420f54bb2beabe1ed Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Fri, 1 Jul 2022 18:20:18 +0200
Subject: [PATCH 03/18] gnu: sbcl-cl-gamepad: Remove asdf:compile-system
workaround.

* gnu/packages/lisp-xyz.scm (sbcl-cl-gamepad)[arguments]: Remove 'build phase
patch now that asdf-build-system/sbcl builds using asdf:load-system which
fixes the bug.
---
gnu/packages/lisp-xyz.scm | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 3d6ce68fb8..3b13d1739e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -17878,35 +17878,7 @@ (define-public sbcl-cl-gamepad
(substitute* "evdev-cffi.lisp"
(("libevdev.so" all)
(string-append (assoc-ref inputs "libevdev")
- "/lib/" all)))))
- ;; Here we use a custom build phase to work around a compilation bug.
- ;; Using 'asdf:compile-system' fails, but using 'asdf:load-system'
- ;; succeeds (and also compiles the system).
- ;; See https://github.com/Shirakumo/cl-gamepad/issues/8
- (replace 'build
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (source-path (string-append out
- "/share/common-lisp/"
- (%lisp-type)))
- (translations `((,source-path
- :**/ :*.*.*)
- (,(string-append out
- "/lib/common-lisp/"
- (%lisp-type))
- :**/ :*.*.*))))
- (setenv "ASDF_OUTPUT_TRANSLATIONS"
- (format #f "~S" `(:output-translations
- ,translations
- :inherit-configuration)))
- (setenv "HOME" (assoc-ref outputs "out"))
- (with-directory-excursion (string-append source-path
- "/cl-gamepad")
- (invoke (%lisp-type)
- "--eval" "(require :asdf)"
- "--eval" "(asdf:load-asd (truename \"cl-gamepad.asd\"))"
- "--eval" "(asdf:load-system :cl-gamepad)"
- "--eval" "(quit)"))))))))
+ "/lib/" all))))))))
(inputs
`(("cffi" ,sbcl-cffi)
("documentation-utils" ,sbcl-documentation-utils)
--
2.32.0
From 3f69d656a84a42f6ed593936057d96874ee81e58 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 19:02:28 +0200
Subject: [PATCH 05/18] gnu: quri: Remove obsolete test workaround.

* gnu/packages/lisp-xyz.scm (quri)[arguments]: Remove.
---
gnu/packages/lisp-xyz.scm | 6 ------
1 file changed, 6 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 00fae19ab9..255716f2e3 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -4441,12 +4441,6 @@ (define-public sbcl-quri
(sha256
(base32 "0zpwjhs2zz9832wsjs00kbkjjl4bcs96krlnq9y75gi4f34fxj1x"))))
(build-system asdf-build-system/sbcl)
- (arguments
- ;; Test system must be loaded before, otherwise tests fail with:
- ;; Component QURI-ASD::QURI-TEST not found, required by #<SYSTEM
- ;; "quri">.
- '(#:asd-systems '("quri-test"
- "quri")))
(native-inputs (list sbcl-prove))
(inputs (list sbcl-babel sbcl-split-sequence sbcl-cl-utilities
sbcl-alexandria))
--
2.32.0
From 399cae8e71a33b99eacdfe28a1ad0f714e9ff358 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 19:03:48 +0200
Subject: [PATCH 06/18] gnu: sbcl-cl-reexport: Remove obsolete test workaround.

* gnu/packages/lisp-xyz.scm (sbcl-cl-reexport)[arguments]: Remove.
---
gnu/packages/lisp-xyz.scm | 5 -----
1 file changed, 5 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 255716f2e3..fc93aa47f8 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -5960,11 +5960,6 @@ (define-public sbcl-cl-reexport
(list sbcl-alexandria))
(native-inputs
(list sbcl-prove))
- (arguments
- ;; FIXME: Test fails with the following, why?
- ;; Component "cl-reexport-test" not found, required by
- ;; #<SYSTEM "cl-reexport-test">
- `(#:tests? #f))
(synopsis "Reexport external symbols in other Common Lisp packages")
(description
"Cl-reexport makes a package reexport symbols which are external
--
2.32.0
From 4e048b16ede8dd65dec67ae562806b8c17270736 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 19:11:31 +0200
Subject: [PATCH 07/18] gnu: Add legion.

* gnu/packages/lisp-xyz.scm (cl-legion, ecl-legion, sbcl-legion): New variables.
---
gnu/packages/lisp-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index fc93aa47f8..a483c10828 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -4697,6 +4697,41 @@ (define-public cl-fast-io
(define-public ecl-fast-io
(sbcl-package->ecl-package sbcl-fast-io))
+(define-public sbcl-legion
+ (let ((commit "599cca19f0e34246814621f7fe90322221c2e263")
+ (revision "1"))
+ (package
+ (name "sbcl-legion")
+ (version (git-version "0.1.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fukamachi/legion/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0583pw0mf8bd4dj42w2xrlzcwfkl8q28n1bh8dpxxfg93crx4si6"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ (list sbcl-prove sbcl-local-time))
+ (inputs
+ (list
+ sbcl-bordeaux-threads
+ sbcl-cl-speedy-queue
+ sbcl-vom))
+ (home-page "https://github.com/fukamachi/legion")
+ (synopsis "Simple multithreading worker mechanism for Common Lisp")
+ (description
+ "This library provides a simple multithreading worker mechanism.")
+ (license license:bsd-3))))
+
+(define-public cl-legion
+ (sbcl-package->cl-source-package sbcl-legion))
+
+(define-public ecl-legion
+ (sbcl-package->ecl-package sbcl-legion))
+
(define-public sbcl-jonathan
(let ((commit "1f448b4f7ac8265e56e1c02b32ce383e65316300")
(revision "1"))
--
2.32.0
From c616fe249857d20ed9e7af2995837e072f9aa5cc Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 19:13:40 +0200
Subject: [PATCH 08/18] gnu: sbcl-jonathan: Fix tests.

* gnu/packages/lisp-xyz.scm (sbcl-jonathan)[native-inputs]: Add missing
sbcl-legion input.
[arguments]: Enable tests.
---
gnu/packages/lisp-xyz.scm | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index a483c10828..5042b8814f 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -4748,12 +4748,8 @@ (define-public sbcl-jonathan
(sha256
(base32 "14x4iwz3mbag5jzzzr4sb6ai0m9r4q4kyypbq32jmsk2dx1hi807"))))
(build-system asdf-build-system/sbcl)
- (arguments
- ;; Tests fail with: Component JONATHAN-ASD::JONATHAN-TEST not found,
- ;; required by #<SYSTEM "jonathan">. Why?
- `(#:tests? #f))
(native-inputs
- (list sbcl-prove))
+ (list sbcl-prove sbcl-legion))
(inputs
(list sbcl-cl-syntax sbcl-fast-io sbcl-proc-parse sbcl-cl-ppcre))
(home-page "https://rudolph-miller.github.io/jonathan/overview.html")
--
2.32.0
From e7c9ed5e5849750dce88a50eea4ad35f8433ab42 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 19:21:53 +0200
Subject: [PATCH 09/18] gnu: sbcl-cl-irc: Fix tests.

* gnu/packages/lisp-xyz.scm (sbcl-cl-irc)[arguments]: Specify test system.
---
gnu/packages/lisp-xyz.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 5042b8814f..ebf61c2c5c 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -359,7 +359,6 @@ (define-public sbcl-cl-irc
(base32 "1b3nqbb4pj377lxl47rfgrs82pidadnrc65l48bk553c2f59b52w"))))
(build-system asdf-build-system/sbcl)
(native-inputs
- ;; Tests only.
(list sbcl-rt))
(inputs
`(("cl+ssl" ,sbcl-cl+ssl)
@@ -367,8 +366,7 @@ (define-public sbcl-cl-irc
("split-sequence" ,sbcl-split-sequence)
("usocket" ,sbcl-usocket)))
(arguments
- ;; Some inexisting "c" system is found by guix otherwise.
- `(#:asd-systems '("cl-irc")))
+ `(#:asd-test-systems '("cl-irc-test")))
(synopsis "IRC client library for Common Lisp")
(description "@code{cl-irc} is a Common Lisp IRC client library that
features (partial) DCC, CTCP and all relevant commands from the IRC
--
2.32.0
From 71c8687604bb37cf46f1bc43677c39ecaea3befb Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 19:58:10 +0200
Subject: [PATCH 10/18] gnu: sbcl-spatial-trees: Build spatial-trees.nss and
fix tests.

* gnu/packages/lisp-xyz.scm (sbcl-spatial-trees)[arguments]: Do it.
[inputs] Add sbcl-alexandria, sbcl-optima, sbcl-iterate.
---
gnu/packages/lisp-xyz.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index ebf61c2c5c..157564dcfe 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -985,7 +985,11 @@ (define-public sbcl-spatial-trees
"11rhc6h501dwcik2igkszz7b9n515cr99m5pjh4r2qfwgiri6ysa"))))
(build-system asdf-build-system/sbcl)
(arguments
- '(#:tests? #f)) ; spatial-trees.test requires spatial-trees.nns
+ ;; We cannot build "spatial-trees-viz" here because it depends on
+ ;; mcclim which depends on spatial-trees. FIXME: Break the circle.
+ '(#:asd-systems '("spatial-trees" "spatial-trees.nns")))
+ (inputs
+ (list sbcl-alexandria sbcl-optima sbcl-iterate))
(native-inputs
(list sbcl-fiveam))
(home-page "https://github.com/rpav/spatial-trees")
--
2.32.0
From d0694b81a260561afae95b675e1033871c8abdd9 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 20:13:02 +0200
Subject: [PATCH 11/18] gnu: sbcl-lisp-namespace: Enable tests.

* gnu/packages/lisp-xyz.scm (sbcl-lisp-namespace)[arguments]: Enable tests.
---
gnu/packages/lisp-xyz.scm | 3 ---
1 file changed, 3 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 157564dcfe..9785a29ab7 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -6136,9 +6136,6 @@ (define-public sbcl-lisp-namespace
`(("alexandria" ,sbcl-alexandria)))
(native-inputs
(list sbcl-fiveam))
- (arguments
- `(;; XXX: Component LISP-NAMESPACE-ASD::LISP-NAMESPACE.TEST not found
- #:tests? #f))
(synopsis "LISP-N, or extensible namespaces in Common Lisp")
(description "Common Lisp already has major 2 namespaces, function
namespace and value namespace (or variable namespace), but there are actually
--
2.32.0
From 67874a3df882362bcb110c7e1bce578a09397f94 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 20:30:32 +0200
Subject: [PATCH 12/18] gnu: sbcl-cl-heap: Re-enable tests.

* gnu/packages/lisp-xyz.scm (sbcl-cl-heap)[arguments]: Specify the name
of the test system.
---
gnu/packages/lisp-xyz.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 9785a29ab7..985422ab13 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -7686,6 +7686,8 @@ (define-public sbcl-cl-heap
(build-system asdf-build-system/sbcl)
(native-inputs
(list sbcl-xlunit))
+ (arguments
+ '(#:asd-test-systems '("cl-heap-tests")))
(synopsis "Heap and priority queue data structures for Common Lisp")
(description
"CL-HEAP provides various implementations of heap data structures (a
--
2.32.0
From 2a6674306f1b5784664ac9bb6f40a22299c94135 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 20:46:24 +0200
Subject: [PATCH 13/18] gnu: sbcl-vas-string-metrics: Re-enable tests.

* gnu/packages/lisp-xyz.scm (sbcl-vas-string-metrics)[arguments]: Specify the name
of the test system and fix the .asd file to actually do something.
---
gnu/packages/lisp-xyz.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (25 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 985422ab13..953e5d3158 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -8658,6 +8658,18 @@ (define-public sbcl-vas-string-metrics
(sha256
(base32 "11fcnd03ybzz37rkg3z0wsb727yqgcd9gn70sccfb34l89ia279k"))))
(build-system asdf-build-system/sbcl)
+ (arguments
+ '(#:asd-test-systems '("test.vas-string-metrics")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-test-asd
+ (lambda _
+ (substitute* "test.vas-string-metrics.asd"
+ ((":depends-on")
+ (string-append
+ ":perform (test-op (op c) (symbol-call :vas-string-metrics :run-tests))"
+ "\n"
+ " :depends-on"))))))))
(home-page "https://github.com/vsedach/vas-string-metrics")
(synopsis "String distance algorithms for Common Lisp")
(description
--
2.32.0
From 3da4d4ce53ff539d194c0da464e75f507c3d730d Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 20:50:06 +0200
Subject: [PATCH 14/18] gnu: sbcl-hdf5-cffi: Enable tests.

* gnu/packages/lisp-xyz.scm (sbcl-hdf5-cffi)[arguments]: Do it.
---
gnu/packages/lisp-xyz.scm | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 953e5d3158..f4b9cae360 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9502,11 +9502,7 @@ (define-public sbcl-hdf5-cffi
(native-inputs
(list sbcl-fiveam))
(arguments
- `(;; Tests depend on hdf5-cffi.examples.asd in addition to hdf5-cffi.asd,
- ;; I don't know if there is a way to tell asdf-build-system to load
- ;; an additional system first, so tests are disabled.
- #:tests? #f
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
(lambda* (#:key inputs #:allow-other-keys)
--
2.32.0
From 28e8197a9e65dd9a2dac7d6ce25d3fd14ece8b11 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 21:09:52 +0200
Subject: [PATCH 15/18] gnu: Add mw-equiv.

* gnu/packages/lisp-xyz.scm (cl-mw-equiv, ecl-mw-equiv, sbcl-mw-equiv): New variables.
---
gnu/packages/lisp-xyz.scm | 52 +++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (65 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index f4b9cae360..6a2156f7cd 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -10836,6 +10836,58 @@ (define-public cl-clx-xembed
(define-public ecl-clx-xembed
(sbcl-package->ecl-package sbcl-clx-xembed))
+(define-public sbcl-mw-equiv
+ (let ((commit "3ae871458685b1ef7cd6a996ee22c8c5e738a03d")
+ (revision "1"))
+ (package
+ (name "sbcl-mw-equiv")
+ (version (git-version "0.1.2" revision commit))
+ (home-page "https://github.com/sharplispers/mw-equiv/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sharplispers/mw-equiv/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1fl90wp0jp7l90mps53fq0kzb28f10qfr739527h03xwqccyylad"))))
+ (build-system asdf-build-system/sbcl)
+ (synopsis "Extensible object equivalence protocol for Common Lisp")
+ (description "Common Lisp comes with quite some functions to compare
+objects for equality, yet none is applicable in every situation and in general
+this is hard, as equality of objects depends on the semantics of operations on
+them. As consequence, users find themselves regularly in a situation where
+they have to roll their own specialized equality test.
+
+This module provides one of many possible equivalence relations between
+standard Common Lisp objects. However, it can be extended for new objects
+through a simple CLOS protocol. The rules when two objects are considered
+equivalent distinguish between @emph{mutating} and @emph{frozen objects}. A
+frozen object is promised not to be mutated in the future in a way that
+operations on it can notice the difference.
+
+We have chosen to compare mutating objects only for identity (pointer
+equality), to avoid various problems. Equivalence for frozen objects on the
+other hand is established by recursing on the objects' constituent parts and
+checking their equivalence. Hence, two objects are equivalent under the
+@code{OBJECT=} relation, if they are either identical, or if they are frozen
+and structurally equivalent, i.e. their constituents are point-wise
+equivalent.
+
+Since many objects are potentially mutable, but are not necessarily mutated
+from a certain point in their life time on, it is possible to promise to the
+equivalence relation that they remain frozen for the rest of their life time,
+thus enabling coarser equivalence than the often too fine-grained pointer
+equality.")
+ (license license:bsd-2))))
+
+(define-public cl-mw-equiv
+ (sbcl-package->cl-source-package sbcl-mw-equiv))
+
+(define-public ecl-mw-equiv
+ (sbcl-package->ecl-package sbcl-mw-equiv))
+
(define-public sbcl-quantile-estimator
(package
(name "sbcl-quantile-estimator")
--
2.32.0
From e0a00f33226849beb4c436ccc74352fbb6b02e75 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 21:10:05 +0200
Subject: [PATCH 16/18] gnu: sbcl-quantile-estimator: Enable tests.

* gnu/packages/lisp-xyz.scm (sbcl-quantile-estimator)[arguments]: Do it.
[native-inputs]: Add sbcl-mw-equiv, sbcl-prove, sbcl-log4cl.
---
gnu/packages/lisp-xyz.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 6a2156f7cd..3f78cc2b9b 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -10904,11 +10904,11 @@ (define-public sbcl-quantile-estimator
"0rlswkf0siaabsvvch3dgxmg45fw5w8pd9b7ri2w7a298aya52z9"))))
(build-system asdf-build-system/sbcl)
(arguments
- '(#:asd-test-systems '("quantile-estimator.test")
- ;; TODO: Tests need https://github.com/sharplispers/mw-equiv.
- #:tests? #f))
+ '(#:asd-test-systems '("quantile-estimator.test")))
(inputs
- `(("alexandria" ,sbcl-alexandria)))
+ (list sbcl-alexandria))
+ (native-inputs
+ (list sbcl-mw-equiv sbcl-prove sbcl-log4cl))
(home-page "https://github.com/deadtrickster/quantile-estimator.cl")
(synopsis
"Effective computation of biased quantiles over data streams")
--
2.32.0
From 0cbf96a85f9f9595dcaf5b728ae4d237af24ea21 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 21:12:26 +0200
Subject: [PATCH 17/18] gnu: sbcl-cl-online-learning: Remove unnecessary
arguments.

* gnu/packages/lisp-xyz.scm (sbcl-cl-online-learning)[arguments]: Do it.

The updated build system is now able to find the system on its own.
---
gnu/packages/lisp-xyz.scm | 3 ---
1 file changed, 3 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 3f78cc2b9b..20c7c10ee2 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -11332,9 +11332,6 @@ (define-public sbcl-cl-online-learning
(inputs
`(("cl-libsvm-format" ,sbcl-cl-libsvm-format)
("cl-store" ,sbcl-cl-store)))
- (arguments
- `(#:asd-systems '("cl-online-learning-test"
- "cl-online-learning")))
(home-page "https://github.com/masatoi/cl-online-learning")
(synopsis "Online Machine Learning for Common Lisp")
(description
--
2.32.0
From e7c633fcadd723f86166bee6b05b098935bef1be Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <mail@ambrevar.xyz>
Date: Mon, 4 Jul 2022 21:46:56 +0200
Subject: [PATCH 18/18] gnu: sbcl-jzon: Enable tests.

* gnu/packages/lisp-xyz.scm (sbcl-jzon)[arguments]: Move test system
to #:asd-test-systems.
Add phase to fix test .asd to actually run the tests.
---
gnu/packages/lisp-xyz.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 20c7c10ee2..cf4f6ffde6 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -21183,7 +21183,19 @@ (define-public sbcl-jzon
(base32 "1048f6prz2lp859nxwcgghn6n38pc2pb580azzxpdhfcdi0034mj"))))
(build-system asdf-build-system/sbcl)
(arguments
- '(#:asd-systems '("com.inuoe.jzon" "com.inuoe.jzon-tests")))
+ '(#:asd-systems '("com.inuoe.jzon")
+ #:asd-test-systems '("com.inuoe.jzon-tests")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-test-asd
+ (lambda _
+ (substitute* "test/com.inuoe.jzon-tests.asd"
+ ((":depends-on")
+ (string-append
+ ":perform (test-op (op c) (symbol-call :fiveam :run!"
+ " (find-symbol \"JZON\" :com.inuoe.jzon-tests)))"
+ "\n"
+ " :depends-on"))))))))
(native-inputs
(list sbcl-alexandria
sbcl-fiveam
--
2.32.0
P
P
Pierre Neidhardt wrote on 5 Jul 2022 10:56
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
87edz0os32.fsf@ambrevar.xyz
While we are rebuilding the Lisp world, I suggest we remove Coreutils
from the SBCL closure since it's only needed on LispWorks and on
non-Linux:

Toggle snippet (17 lines)
(add-after 'install 'remove-coreutils-references
;; They are only useful on non-Linux, non-SBCL.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(share-dir (string-append out "/share/sbcl/")))
(substitute* (string-append share-dir "src/code/run-program.lisp")
(("\\(run-program \".*uname\"")
"(run-program \"uname\""))
(substitute* (string-append share-dir "contrib/asdf/asdf.lisp")
(("\\(\".*/usr/bin/env\"")
"(\"/usr/bin/env\""))
(substitute* (string-append share-dir "contrib/asdf/uiop.lisp")
(("\\(\".*/usr/bin/env\"")
"(\"/usr/bin/env\""))

#t)))
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmLD/NESHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/5fUIAImr260T3mc3j03S0i++uYP9MAnN+0tT
UE9y81Xy9Rtu/xGdtiILQFPGFS8tbje4GHhYL52E3tYNdCC0Ww1AlN5sM12nI1nQ
AAXZElyQdqmrxA+0pizFmXxAPxlh81qtPln/a9OQBSKwjPCQICC2+JTtd+8lRXWi
RE8mJHlk0Rdvn8vDNgQYhO3RsvM8JYgb4njjducbBmt58SbW3bHD6X1/eGY9nrQB
G7LgFZZOwauhFOzzy4Zg6oPJNS32SBfRfAeLXAQjK58dYkHP5xP9hVjmZf/Uc+Hl
l1+AvwAt/4Mh5I8ZTBs5PVjp4ZORg6/BjNd4Q736mrmQUOZgpAOaRqM=
=II63
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 17 Jul 2022 18:19
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334@debbugs.gnu.org)
875yjvsod1.fsf@ambrevar.xyz
I've pushed the SBCL closure size reduction.

I'll be the road for a while, unable to work on this patch, so if anyone
wants to work on it and merge, please go ahead :)

Left to do:

- Suggestion: add a keyword to choose between asdf:compile-system and
asdf:load-system (default should be asdf:load-system).
- Make sure sbcl-stumpwm-kbd-layouts usees asdf:compile-system.
- Rebuild the Lisp world to test.

Cheers!
Pierre
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmLUNqoSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/SfIH/2LU7dr1CqEEeiqYLnDUTBdahtzsADbH
ih0dSTtOluFbzWWokSEDKQI2fN2syuGnUk+DUSGvFm8Umuoq5ftQYpkHYQM8UuXa
AGysbzo5Ox9o67njp4dZ+SJP1ZLkZ2lb39KrUtZakjkb7J0e45yCImjscDAV6DWi
eRTiRMp+gmKjHCyk8jmXoC2pXIozp1ix+b5vShZHRwBBYRZgeMMY/fPqNZyC63Kz
rP43Lt5/MvfTy6EFTsemups5AybseQndmUsmP6PyRBYyLrqi3UUSj1y3QT39z5NC
Yqr/QhlIFtEqwGxmdwbqNvDBqf/clqa/s1rhBpCAH8hAML8DNrHBVW0=
=kzwI
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 3 Aug 2022 16:49
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 56334-done@debbugs.gnu.org)
875yj974v2.fsf@kitej
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (10 lines)
> I'll be the road for a while, unable to work on this patch, so if anyone
> wants to work on it and merge, please go ahead :)
>
> Left to do:
>
> - Suggestion: add a keyword to choose between asdf:compile-system and
> asdf:load-system (default should be asdf:load-system).
> - Make sure sbcl-stumpwm-kbd-layouts usees asdf:compile-system.
> - Rebuild the Lisp world to test.

I added a 'asd-operation' keyword parameter with a default value of
"load-system", and I used it in the package definition of
sbcl-stumpwm-kbd-layouts to use "compile-system" instead.

Patches pushed as 6b5ef03a2582ab23228478018fd356e17db1daea and
following.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYuqMog8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+4RgD/ZtlSwXSwWUWEP2pvEIy/5R5Zw3tktUNJOU+2
EJL7LOUBAI9CMSnPCy5JCUrC455KcxVly+iFMPHzO6gX4XQRaDUR
=xX79
-----END PGP SIGNATURE-----

Closed
P
P
Pierre Neidhardt wrote on 4 Aug 2022 16:01
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 56334-done@debbugs.gnu.org)
87v8r8ds5z.fsf@ambrevar.xyz
Excellent, thanks a lot! :)
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAmLr0SgSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/Tl0H/R//ha5JXUjQ14fab9CLe8wRDyjH00uB
CFPliPyUYvU3rrGADDbuqnZgV1kvhytx4+x9N11py7SZceTW3BBMABGZ9Py0uWsm
q2W+bQGE392vxPcdQ+fYXpjCc5QUFncLXAYpnsee8F1J0rqI2Ihnsld/HOvnGAta
9XquQBt5oO6I3i2o0r7ZIDmxz/IEYf5DQzSg6FQij45hmp8HHpDPeEzbKJYQYpyc
ntgmatdEdoYMIQ/RJR1Z4AqrEEuOkYhaymkcjuETffwHcMMM+tIcSQRtUEjsVKbO
URfaiTSi72CBBoONMEZylnUaJOYNbuR2rJJM6nmES9g6BCZc9vMocsM=
=Ug7p
-----END PGP SIGNATURE-----

Closed
?