@civodul I don't quite get why these need to be REPL commands instead of normal functions. đ¤
Top-level
@civodul I don't quite get why these need to be REPL commands instead of normal functions. đ¤ 4 comments
@civodul The problem is that this makes hard to use these in scripts. I ran into exactly this issue when I was writing my MirageOS importer (which I promise I'm gonna try upstreaming during the holidays đ
). I needed to build a package that just ran mirage configure and use the dune config file from it to get the dependency list and call the opam importer, which then generated the code. @civodul Maybe this is a too far reaching problem, but: if the issue is that the string serializations of packages are not nice to read, why not make Guile serialize things nicely by default? @csepp This is meant as a handy interface to inspect packages. Doing the same in a script is ~10 lines of code: But itâs not so useful: in a script, youâd rather call âpackage-argumentsâ and preserve gexps as is instead of lowering them, or youâd lower the whole package. |
@csepp The answer is twofold: (1) providing concise ways to express things packagers may want to do, and (2) presenting data in a human-friendly way (lowering gexps and pretty-printing the result).
One can still do â,pp (package-arguments grep)â but thatâs less convenient.
See https://issues.guix.gnu.org/67489 for a discussion.