Subject: [bug#55248] [PATCH 0/7] gnu: Update Racket to 8.5 and Chez Scheme to 9.5.8.

From: Philip McGrath <[email-masked]>
Date: Tue, 3 May 2022 14:31:43 -0400

Hi,

This patch series contains Racket 8.5 and upstream Chez Scheme 9.5.8:
both were re released since last week.

For upstream Chez Scheme, armhf-linux has been deleted from
`supported-systems` with a comment saying it's broken since before I
started contributing to Guix. I haven't changed that, since I don't have
access to an ARM system at the moment, and it doesn't have thread
support upstream anyway, but I think it should be fixed by this point,
if it hadn't been already. Could someone check?

Two recent developments in the Racket world are notable from a packaging
perspective:

 1. After branching for this release, on HEAD Racket has adopted Zuo[1],
    a tiny Raket-like language for build scripting. The Zuo interpreter
    is a single C file that can be compiled as simply as `cc zuo.c`, and
    libraries written in Zuo implement a DSL like `make` or (more so)
    Shake[2] for build steps and tracking dependencies. Autoconf is
    still there, and `make` can still be used in all of the ways it
    could before (modulo bugs), but the makefiles actually just delegate
    to Zuo.[3]

    In theory, this shouldn't require any changes, but Guix is enough of
    a stress test that it's exposed some rough edges: many have already
    been fixed upstream, but a few will require changes to the Guix
    packaging---but I think all the changes make things nicer, anyway. I
    have a branch up at [4] based on Racket HEAD if anyone's interested:
    the only remaining Zuo-related issue is with the Chez Scheme test
    suite.

    Overall, I for one already find the Zuo build scripts much more
    comprehensible and hackable than the old makefiles. To pick just one
    example of the former complexity, there was a build script
    implementing a makefile-to-makefile compiler to support variable
    propagation for non-GNU `make`s. Zuo (and Racket's use of it) is
    also much more robust in dependency tracking. Formerly, you were
    often better off throwing away your build directory and starting
    again. I think this is an exciting step for anyone who builds Racket
    from source regularly, and Zuo might be interesting for other
    projects, too.

 2. Racket's version of Chez Scheme has long had a “portable bytecode”
    backend as an alternative to native-code compilation. Up to this
    point it has primarily been a bootstrapping shortcut that didn't
    require distributing binaries for every platform. With this release,
    though, the implementation has improved: it now works even on
    platforms for which there isn't a native-code backend available ---
    for Guix, that includes powerpc64le-linux, riscv64-linux,
    mips64el-linux, and i586-gnu --- and it performs well enough on
    those platforms to make Racket CS viable instead of Racket BC (which
    didn't have JIT support for those platforms, anyway). For Guix, this
    also means that `(chez-scheme-for-system)` should be able to return
    a working Chez Scheme package for every system.

    Unfortunately, there are some issues with (at least) the `configure`
    scripts in the release such that building Racket for those systems
    doesn't quite work yet: see discussion at [5]. I'll be following up
    on that, and I might backport the fixes if they end up being small
    enough, but certainly it should work by Racket 8.6, scheduled for
    July.

    In the mean time, just knowing that this functionality is on its way
    helped with figuring out how much could be thrown out to simplify
    the follow-up to <https://issues.guix.gnu.org/54292> at the end of
    this patch series.

 -Philip

[1]: https://docs.racket-lang.org/zuo/index.html
[2]: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/03/hadrian.pdf
[3]: https://docs.racket-lang.org/racket-build-guide/zuo.html
[4]: https://gitlab.com/philip1/guix-patches/-/tree/zuo
[5]: https://racket.discourse.group/t/chez-for-architectures-without-native-backends/950

Philip McGrath (7):
  gnu: racket: Update to 8.5.
  gnu: racket: Fix out-of-source build.
  gnu: chez-scheme: Update to 9.5.8.
  gnu: chez-scheme: Refactor documentation phases.
  gnu: chez-scheme: Refactor configure phase and fix '--threads'.
  gnu: stex: Get machine type dynamically.
  gnu: chez-scheme-for-system: Adjust support logic.

 gnu/local.mk                                  |   2 -
 gnu/packages/chez.scm                         | 416 +++++++++-------
 .../racket-enable-scheme-backport.patch       | 465 ------------------
 ...acket-gui-tethered-launcher-backport.patch |  26 -
 gnu/packages/racket.scm                       | 106 ++--
 5 files changed, 292 insertions(+), 723 deletions(-)
 delete mode 100644 gnu/packages/patches/racket-enable-scheme-backport.patch
 delete mode 100644 gnu/packages/patches/racket-gui-tethered-launcher-backport.patch

base-commit: 654f878f0b9d2136affa3e3d32da1639e6942a54
-- 
2.32.0