guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51838] [PATCH v5 07/45] guix: node-build-system: Add #:absent-depen


From: Liliana Marie Prikler
Subject: [bug#51838] [PATCH v5 07/45] guix: node-build-system: Add #:absent-dependencies argument.
Date: Fri, 17 Dec 2021 20:40:09 +0100
User-agent: Evolution 3.42.1

Hi Timothy,

Am Freitag, dem 17.12.2021 um 10:46 -0500 schrieb Timothy Sample:
> Hi Liliana,
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> 
> > I might be sounding like a broken record here, but again for the
> > sake of being able to add or remove inputs on the user side without
> > duplicated efforts, I'd use something else in lieu of absent-
> > dependencies.  For the time being, I think a switch between "fail"
> > and "warn about missing dependencies" ought to be enough.  In the
> > future, we might want to make it so that packages can specify which
> > dependencies they absolutely require and which they don't (or if
> > possible infer that from dependencies).  WDYT?
> 
> The way I see it is that we are basically copying the
> “--disable-X”/“--without-Y” features of a GNU configure script.  With
> the GNU build system, if one of our packages specifies “--without-
> zlib”
> for whatever reason, and you as a user want to modify the package to
> use zlib, you would have to
> 
>   1. remove the “--without-zlib” configure flag; and
>   2. add the zlib package to the package’s inputs.
> 
> That’s a “duplicated effort”, right?
> 
> Similarly, for a Node package (with a pretend Node zlib package), you
> would have to
> 
>   1. remove “zlib” from absent dependencies; and
>   2. add the “node-zlib” package to the package’s inputs.
> 
> That seems okay to me, but I’m worried I’ve missed what you’re trying
> to communicate.
For the GNU build system (and likewise meson-build-system), the default
behaviour if you haven't specified anything as per upstream conventions
is typically to error if the package is required and omit it if it's
not.  The default behaviour of node-build-system (and likewise cargo
and most other build systems that come with the advertisement of "we
know package managers better than people who actually produce useful
package managers) is "Oh my god, you don't have an exact copy of the
machine that built this stuff locally, I am going to barf huge walls of
noise at you".  Therefore, we can't meaningfully compare those build
systems in terms of strategies.

On a slightly related note, I recently had the pleasure of working on a
patch for a package that fails python-build-systems new sanity-check
phase.  If we really want some static verification for node-build-
system, I think we should take that as an approach rather than hard-
coding (absent) dependencies literally everywhere.  Although in writing
that I must concede that Python is still too sane to be a Web standard.

I'm sorry I can't explain my reasoning in a nicer manner.  Your point
would be totally valid if node-build-system did act like the GNU build
system or meson in that dependency resolution is DWIM by default, but
sadly we can't have nice things with "modern" programming languages and
their build systems.

TL;DR: "--without-zlib" is usually implied in packages based on the GNU
build system unless zlib really is a hard requirement of the package. 
The same can't be said for node-anything.

Cheers 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]