Subject: Re: [bug#55606] [PATCH 2/2] gnu: Add hare.

From: Antero Mejr <[email-masked]>
Date: Sun, 26 Jun 2022 10:39:17 -0400

Maxime Devos <[email-masked]> writes:

> TBC: what is this package packaging?
>
>   * the compiler
>   * some wrapper around the compiler
>   * the standard library and the compiler
>   * both
>
> If it packages the compiler, this is not fine.  Guix is a package
> manager and distribution, the point of which is to automatically sort
> out dependencies.  Leaving it up to the user to sort out the
> dependencies then partially defeats the point.

My current understanding is:
The "hare" package is the standard library and a "build driver", which
orchestrates the program "harec" to compile hare programs into QBE IR,
and then hare calls qbe and binutils to compile the program to a
binary.

I think they refer to a "build driver" as "a program that calls other
programs to do a build". Kind of like Rust's cargo build system,
but without full package management.

However, in the future the plan is for hare to be a self-hosted
compiler and build system, dropping the harec dependency (will still
need it, but just for bootstrapping). Not sure if they will replace qbe
as well.

Our options are:
1. Provide the build driver "hare" standalone, then a "hare-toolchain"
package that propagates hare, harec, qbe, and binutils. This is how it
was done by ) on Guix'R'Us.
2. Add qbe and harec to propagated-inputs of hare. This is what the
earlier patch did.
3. Add qbe and harec to inputs, and patch the source code to direct
the build driver to the Guix paths.