Subject: [bug#74900] [PATCH 1/2] Replace (guix build json) with (json) in node-build-system

From: Jelle Licht <[email-masked]>
Date: Fri, 24 Jan 2025 12:32:13 +0100

Hi folks,

Ludovic Courtès <[email-masked]> writes:

> Hi Daniel,
>
> Daniel Khodabakhsh <[email-masked]> skribis:
>
>> This change replaces the use of (guix build json) with (json) for the
>> node ecosystem.
>> Since guile-json is a dependency of Guix, and it's used elsewhere in
>> the project, it makes sense to use this instead of rolling our own
>> JSON implementation with (guix build json).

Thanks for getting the ball rolling! I love this! (and tried doing
exactly this many moons ago, but failed because ISTR guile-json not
being a required dependency of guix back then).

>>
>> (guix build json) also has a few issues:
>>  - write-json escapes forward slashes in strings for some reason ("/"
>> become "\/")
>>  - read-json produces a structure similar to an association list but
>> with '@' to indicate an object, making it not possible to use
>> association list procedures directly.
>>
>> This is one step to move away from (guix build json), there will be
>> other changes to remove the other uses of it.

Let's focus on the node-build-system as it's relatively uncommon for now
indeed.  We could involve the e.g. the python-team (and their branch)
for getting the pyproject-build-system moved over as well after moving
the node-build-system over.

> Thanks for working on this!  This is tedious but important work.
>
> Cc’ing Jelle, who knows Node packaging well.  Could you take a look,
> Jelle?

I've put this series on top of my list after the node-lts version bump
is merged.  Daniel, do you still see yourself working on this to get it
upstreamed in the near future? If not, that is also perfectly fine of
course :)

Thanks,
 Jelle