unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: "Pjotr Prins" <pjotr.public12@thebird.nl>,
	"Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Idea: a meta language for (language) build systems - npm, Racket, Rust cargo
Date: Tue, 15 Jun 2021 00:04:59 +0200	[thread overview]
Message-ID: <35dd481ec1c8c2e8f1f65b74bcdbe1980da3b5b0.camel@student.tugraz.at> (raw)
In-Reply-To: <20210614142923.tp23ba6htoao4vfv@thebird.nl>

Am Montag, den 14.06.2021, 16:29 +0200 schrieb Pjotr Prins:
> On Tue, Jun 08, 2021 at 03:11:31PM +0200, Ludovic Courtès wrote:
> > (I’m late to the party…)
> 
> Never late :)
> 
> > > I found a cargo -> ninja converter. It is that kind of idea. Guix
> > > would use ninja with rustc instead of cargo. A stripped down
> > > cargo
> > > could potentially work too - but cargo is a complex beast.
> > 
> > In a way, aren’t importers addressing this use case?
> 
> Importers and build-systems, even guix.scm, don't really create a
> rapid and dynamic builder for developers to use when developing
> software. At the same time the builders, such as cargo, are heavy,
> bloated and misguided. And hard to embed in GNU Guix for multiple
> reasons. 
> 
> There is a missing link in my opinion. Though it is not a
> Guix problem (I agree).
This is really something that's true rather for cargo than for most
other builders, though.  gnu-build-system, meson-build-system etc. are
– in my opinion – appropriately sized and a hypothetical cargo-ninja-
build-system could just reuse most of meson-build-system but creating
the ninja files from cargo rather than meson (i.e. swapping the
configure phase).

As for "rapid development", `guix environment` provides the things you
need in an environment (heh), that is simple to set up.  The missing
link when that is already given is to set up the build system that
you'd use anyway.  I think most modern tools have a --generate-me-some-
generic-hello-world-template, whereas for the GNU Build System you
simply copy amhello.

> > In the end, they let everyone develop a package manager/build
> > system
> > that suits their needs, while still allowing us to have our cake.
> 
> If you strip out dependency management and cross-platform compiling
> there is not much left to do for cmake, autotools, cargo etc.
> Everything Guix is good at. Ninja resolves the build graph, you only
> need something to generate the build graph for source files. A
> mini-Guix of sorts for source files. Eelco, at the time, wrote Maak -
> a builder that would work on NixOS. He wrote it in Haskell, but it is
> similar thinking.
There never was that much to do for a build system.  All they're
supposed to do is to simplify a sequence of compiler and linker calls,
so that you can write `make all' instead of having to type out 500
invocations of GCC.  They were never meant to be package managers and
those who think they are will be doomed to reinvent the wheel over and
over again.  They instead provide an interface to package managers,
that interface being e.g. the locations in which they will generally
look for certain headers (though reasonable build systems and package
managers use pkg-config to solve this issue as well).

>   https://en.wikipedia.org/wiki/Maak
> 
> Ninja fits the bill - but it is something that needs to be generated.
> 
> Minimalism and simplicity is what I want. I hate it when software
> starts thinking for me ;). 
> 
>   https://github.com/rust-lang/cargo/issues/6584
> 
> We need to create another builder that replaces cargo - or maybe just
> simplifies cargo. I am not programming in Rust or Racket, right now,
> but when I do (again), I'll try to generate ninja files to define a
> build as a starting point in a simple way. One thing we can do with
> Guix is create a parallel build system. An alt-verse for builders ;)
How build systems proliferate
Situation: There are 14 competing build systems
Developer: 14?! Ridiculous! We need to develop one universal standard,
that covers everyone's use cases.
Developer with a ponytail: Yeah!
Soon: There are 15 competing build systems

Guix as a build system, with or without GWL, is fine as long as it's
just fun and games, but it comes with the serious downside of not being
compatible with any other distro out there.  Perhaps that works out for
those, who pray towards our lord and saviour Flatpak, but if you want
to be able to ship to traditional distros through normal channels, you
will need a reasonable build system like make or ninja and perhaps
something that generates you the nitty gritty stuff like Autotools,
Meson, etc.

What we need in order to make packages written in Rust less of a PITA
is more widespread usage of generic build systems like make or meson. 
We won't get there with cargo cult programming.  On a somewhat related
note, I find it amusing, that Rust folk dread the usage of Rust without
cargo, as if the Rust standard library on its own was somehow worthless
or something :P

Regards,
Leo



  reply	other threads:[~2021-06-14 22:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-30  8:38 Idea: a meta language for (language) build systems - npm, Racket, Rust cargo Pjotr Prins
2021-05-30 19:17 ` Konrad Hinsen
2021-05-31 17:47   ` Pjotr Prins
2021-06-01  5:50     ` Adriano Peluso
2021-06-01  6:24     ` Leo Prikler
2021-06-01  7:23       ` Pjotr Prins
2021-06-01  8:12         ` Leo Prikler
2021-06-01  8:59       ` Adriano Peluso
2021-06-01  9:11         ` Leo Prikler
2021-06-01 10:52           ` Adriano Peluso
2021-06-01 11:03             ` Leo Prikler
2021-06-01 11:28               ` Adriano Peluso
2021-06-01 15:22                 ` Leo Prikler
2021-06-01  7:56     ` Konrad Hinsen
2021-06-01 23:35       ` Joshua Branson
2021-06-08 13:11     ` Ludovic Courtès
2021-06-14 14:29       ` Pjotr Prins
2021-06-14 22:04         ` Leo Prikler [this message]
2021-06-15  8:48           ` Pjotr Prins
2021-06-15 10:08           ` Ricardo Wurmus
2021-06-20 15:46         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35dd481ec1c8c2e8f1f65b74bcdbe1980da3b5b0.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=pjotr.public12@thebird.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).