[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Idea: a meta language for (language) build systems - npm, Racket, Rust c
From: |
Pjotr Prins |
Subject: |
Idea: a meta language for (language) build systems - npm, Racket, Rust cargo |
Date: |
Sun, 30 May 2021 10:38:47 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
Maybe this is a crazy idea:
It appears to me that every language out there today is creating their
own build system. We know that creating build-system package support
for GNU Guix is complicated by:
1. Live updates over the internet
2. Circular dependencies
3. Tests requiring internet access
Now we never got to truely solving npm, for example. And despite
heroic efforts: Go, Rust, Racket are often in stages of disarray.
The irony is that, when we leverage GNU Guix infrastructure, the
software packages themselves can be really simple. All we need is a
source ball and a little metadata. From that GNU Guix can do the hard
stuff and handle the builds and dependencies. This is why our C build
system is so effective and simple packages translate well to GNU Guix.
My idea is this: rather than generating 'imports' from native build
packages for every target - which is kinda laborious in its way - we
could translate an existing Rust/Node/Racket package into an
intermediate simple package tar ball - call it a sexp-pack ;). This
repackaged sexp-pack can only reference other sexp-packs which gets
rid of (1). The sexp-pack generator can identify and help resolve
circular dependencies which solves (2). At this intermediate stage we
can also also patch sources which helps with (3). We would have a
sexp-pack for cargo and another for npm.
As sexp-packs are generated from source, the GNU Guix turn around and
packaging time can potentially be sped up. And once a hosted sexp-pack
exists it is stable.
It may be silly to create another layer (of indirection). But I think
that breaking up the packaging process this way will help us to
actually fix npm and cargo support in a reasonable time frame. Also it
works the other way, I would no longer need cargo or Racket packages
;)
Pj.
- Idea: a meta language for (language) build systems - npm, Racket, Rust cargo,
Pjotr Prins <=