Subject: Re: [bug#70065] [PATCH 4/6] gnu: chez-scheme: Update to 10.0.0.

From: Skyler Ferris <[email-masked]>
Date: Sat, 30 Mar 2024 14:39:52 +0000

On 3/28/24 22:18, Philip McGrath wrote:
> -(define* (chez-scheme-for-system #:optional
> -                                 (system (or (%current-target-system)
> -                                             (%current-system))))
> -  "Return 'chez-scheme' if it fully supports SYSTEM, including support for
> -bootstrapping and native threads.  Otherwise, return
> -'chez-scheme-for-racket'."
> -  (if (and=> (chez-upstream-features-for-system system)
> -             (lambda (features)
> -               (every (cut memq <> features)
> -                      '(threads
> -                        ;; We can cross-compile for platforms without
> -                        ;; bootstrap bootfiles, but we can't self-host
> -                        ;; on them short of adding more binary seeds.
> -                        bootstrap-bootfiles))))
> -      chez-scheme
> -      chez-scheme-for-racket))
> +(define-deprecated (chez-scheme-for-system #:optional system) chez-scheme
> +  "Returns 'chez-scheme'."
> +  chez-scheme)
As mentioned in the reply to the cover letter, it looks like this broke 
loko-scheme from gnu/pcakages/loko.scm.

In particular, I get a "wrong type to apply" error in its use of 
"chez-scheme-for-system". I ran into this problem when running the 
following command:

```
./pre-inst-env guix refresh --list-depedent zuo -e '(@ (gnu packages 
racket) racket-vm-cs)' racket chez-scheme chez-scheme-for-racket
```

For this reason, I was also unable to verify that all dependents 
build... presumably, the CI will run into the same error when this 
patch's turn comes up. I did check the following packages based on the 
output of the refresh without this patch applied, and they all build 
with all patches in this series applied:

```
./pre-inst-env guix build chez-socket chez-nanopass chez-fmt 
chez-scmutils chez-irregex emacs-geiser-chez emacs-geiser-racket
```

So I think loko-scheme is the only impacted dependent. Pending 
cross-builds from the CI.

As before, my experience with autotools is limited so my review of the 
build changes should be taken with a grain of salt. It looks like some 
of the patched code is fixing bugs rather than adapting for guix so they 
should be upstreamed, but I assume Philip is already on top of that.