[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#38408] [PATCH v4 1/6] gnu: added new function, find-packages-by-nam
From: |
Ludovic Courtès |
Subject: |
[bug#38408] [PATCH v4 1/6] gnu: added new function, find-packages-by-name*/direct |
Date: |
Thu, 19 Dec 2019 23:00:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello!
I’m not a Crate expert so I’m only commenting on non-Crate-specific
bits.
Martin Becze <address@hidden> skribis:
> * gnu/packages.scm (find-packages-by-naem*/direct)
[...]
> +(define* (fold-packages* proc init
> + #:optional
> + (modules (all-modules (%package-module-path)
> + #:warn
> + warn-about-load-error))
> + #:key (select? (negate hidden-package?)))
> + "Call (PROC PACKAGE RESULT) for each available package defined in one of
> +MODULES that matches SELECT?, using INIT as the initial value of RESULT. It
> +is guaranteed to never traverse the same package twice."
> + (fold-module-public-variables* (lambda (module symbol var result)
> + (let ((object (variable-ref var)))
> + (if (and (package? object) (select?
> object))
> + (proc module symbol object result)
I’m wary of exposing variable names, especially in such a central API.
> +(define find-packages-by-name*/direct ;bypass the cache
Providing an explicit cache bypassing method also sounds worrying to me:
the cache is supposed to be transparent and semantics-preserving.
More generally, I think adding new features to an importer shouldn’t
require modifications in this area, as a matter of separating concerns.
WDYT?
Thanks,
Ludo’.
- [bug#38408] [PATCH v4 0/6] Semantic version aware recusive importer for crates, Martin Becze, 2019/12/10
- [bug#38408] [PATCH v4 4/6] added "#:skip-build? #t" to the output of (make-crate-sexp). Most the the packages imported will be libaries and won't need to build. The top level package will build them though., Martin Becze, 2019/12/10
- [bug#38408] [PATCH v4 5/6] guix: crate: Depublicated dependencies, Martin Becze, 2019/12/10
- [bug#38408] [PATCH v4 3/6] Rewrote some of guix/import/crate.scm to use recursive-import-semver and updated script and test., Martin Becze, 2019/12/10
- [bug#38408] [PATCH v4 2/6] gnu: added new procedure, recusive-import-semver, Martin Becze, 2019/12/10
- [bug#38408] [PATCH v4 6/6] guix: import: recursive-import-semver: allow the range of a package to be specified when begining import., Martin Becze, 2019/12/10