In recent Guix history, we're trying to fully deprecate and remove the
`(guix build json)` module in favor or the `guile-json` package.

Sadly I've found the use of `with-extensions` in Guix to not be as
convenient as the use of imported-modules. In particular, we need to
wrap every `modify-phases` with a call to `with-extensions` when
`#:modules` contains any package that contains `#:use-module (json)`,
despite there are a lot of use-cases where the package is not necessary
(for instance when the python build-side module is imported only for the
use of the `site-packages` procedure).

I see two possible directions :

1) The `#:autoload` way: Use autoloads instead of `#:use-module` in the
build-systems using `(json)` so that wrapping `with-extensions` is only
required when it's really used.

2) The `#:imported-modules` way: Add an additional keyword argument,
`#:extensions`, that would be re-injected to avoid the additional
`with-extensions` around the `modify-phases` gexp.

Some related discussions to make the combining of build-systems easier
are https://codeberg.org/guix/guix/issues/1378
and https://codeberg.org/guix/guix/pulls/361

WDYT ?

Merry Christmas end happy new year!

-- 
Best regards,
Nicolas Graves

Reply via email to