[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51838] [PATCH v8 00/41] guix: node-build-system: Support compiling
From: |
Liliana Marie Prikler |
Subject: |
[bug#51838] [PATCH v8 00/41] guix: node-build-system: Support compiling add-ons with node-gyp. |
Date: |
Sat, 08 Jan 2022 00:06:17 +0100 |
User-agent: |
Evolution 3.42.1 |
Hi,
Am Freitag, dem 07.01.2022 um 16:07 -0500 schrieb Philip McGrath:
> My base position is that regexps should not be mandatory or default.
> It was very convenient to be able to just copy--paste package names
> from "package.json" into '#:absent-dependencies' (or whatever). I can
> imagine it being useful for tooling, too, to be able to find just
> from the package definition the dependencies which are being deleted,
> rather than having to either download the origins or try to
> reconstruct names from regexps.
I don't think tooling should be too big of an issue, since you could
teach your tool to support regexp. I.e. instead of checking whether a
newly added package has the name, you check whether it fits the
pattern. That might generate false positive in some cases, perhaps
even many, but we can (and should) refine regexps that are too generic.
> Alternatively, I would also be ok with [...] a slight variant on it
> in which the user would write:
>
> `("foo" "bar" ,(make-regexp "baz"))
>
> Since this (either variant) would not change the interpretation of
> strings in the list of dependencies to delete, it could also be added
> later without breaking compatibility.
That's true, but the main reason to add it from my perspective is that
we don't need to change how regexps are interpreted from the rest of
Guix to make basic strings match fully. For the fun of it, we could
also extend this to procedures of a single value so that one can
finally supply (const #t) :D
> I also think full string matches are better, regardless of any of the
> above. Here's an implementation that avoids unneeded copies and
> string comparison:
>
> (define (regexp-match-exact? rx str)
> (define m (regexp-exec rx str))
> (and m
> (= (match:start m) 0)
> (= (match:end m) (string-length str))))
I can't say this is more beautiful than
(equal? (and=> (regexp-exec rx str) match:substring) str), but there's
only that many ways of making a partial match a full one and Guile core
has none of them...
[bug#51838] [PATCH v8 00/41] guix: node-build-system: Support compiling add-ons with node-gyp., Philip McGrath, 2022/01/07
- [bug#51838] [PATCH v8 00/41] guix: node-build-system: Support compiling add-ons with node-gyp., Liliana Marie Prikler, 2022/01/07
- [bug#51838] [PATCH v8 00/41] guix: node-build-system: Support compiling add-ons with node-gyp., Philip McGrath, 2022/01/07
- [bug#51838] [PATCH v9 00/41] guix: node-build-system: Support compiling add-ons with node-gyp., Philip McGrath, 2022/01/08
- [bug#51838] [PATCH v9 01/41] guix: node-build-system: Add delete-lockfiles phase., Philip McGrath, 2022/01/08
- [bug#51838] [PATCH v9 02/41] guix: node-build-system: Add implicit libuv input., Philip McGrath, 2022/01/08
- [bug#51838] [PATCH v9 03/41] guix: node-build-system: Add JSON utilities., Philip McGrath, 2022/01/08
- [bug#51838] [PATCH v9 13/41] gnu: node-semver: Use 'delete-dependencies'., Philip McGrath, 2022/01/08
- [bug#51838] [PATCH v9 05/41] guix: node-build-system: Add 'delete-dependencies' helper function., Philip McGrath, 2022/01/08
- [bug#51838] [PATCH v9 06/41] gnu: node-semver-bootstrap: Use 'delete-dependencies'., Philip McGrath, 2022/01/08