* Command consistency: suggestion @ 2023-01-09 12:22 Paul Jewell via Development of GNU Guix and the GNU System distribution. 2023-01-09 15:47 ` Joshua Branson 2023-01-11 21:51 ` Simon Tournier 0 siblings, 2 replies; 5+ messages in thread From: Paul Jewell via Development of GNU Guix and the GNU System distribution. @ 2023-01-09 12:22 UTC (permalink / raw) To: guix-devel@gnu.org Good morning! It struck me this weekend that there is some difference in the command structure for the different guix sub commands. For example: guix package --list-generations and guix system list-generations guix package has everything as an flag, but guix system (and guix home) uses the concept of ACTION with options and arguments. Perhaps the latter is clearer, and guix package should also follow the same model? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Command consistency: suggestion 2023-01-09 12:22 Command consistency: suggestion Paul Jewell via Development of GNU Guix and the GNU System distribution. @ 2023-01-09 15:47 ` Joshua Branson 2023-01-11 21:51 ` Simon Tournier 1 sibling, 0 replies; 5+ messages in thread From: Joshua Branson @ 2023-01-09 15:47 UTC (permalink / raw) To: Paul Jewell via Development of GNU Guix and the GNU System distribution. Cc: Paul Jewell Paul Jewell via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org> writes: > Good morning! > > It struck me this weekend that there is some difference in the command structure > for the different guix sub commands. For example: > > guix package --list-generations > > and > > guix system list-generations > > guix package has everything as an flag, but guix system (and guix home) uses the > concept of ACTION with options and arguments. > > Perhaps the latter is clearer, and guix package should also follow the same > model? +1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Command consistency: suggestion 2023-01-09 12:22 Command consistency: suggestion Paul Jewell via Development of GNU Guix and the GNU System distribution. 2023-01-09 15:47 ` Joshua Branson @ 2023-01-11 21:51 ` Simon Tournier 2023-01-16 17:59 ` Paul Jewell via Development of GNU Guix and the GNU System distribution. 1 sibling, 1 reply; 5+ messages in thread From: Simon Tournier @ 2023-01-11 21:51 UTC (permalink / raw) To: Paul Jewell, guix-devel@gnu.org Hi, On Mon, 09 Jan 2023 at 12:22, Paul Jewell via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org> wrote: > guix package --list-generations > > and > > guix system list-generations > > guix package has everything as an flag, but guix system (and guix home) > uses the concept of ACTION with options and arguments. Well, “guix package“ also uses action and it is possible to combine them. For an example about the issue it leads, see bug#50473 [1]. 1: <http://issues.guix.gnu.org/issue/50473> > Perhaps the latter is clearer, and guix package should also follow the > same model? It is often discussed. :-) Well, ‘guix package’ uses SRFI-37 [2] and it is possible to combine some action; as --switch-generation and --delete-generations for instance. Aside note that one transaction can install and remove: guix package -i foo -r bar which would not be possible when using single action. The CLI of ‘guix package’ will not change, IMHO. The mitigation of what you are considering as an inconsistency is to have “alias“; guix search, guix, install, guix remove, etc. Last, we could imagine a Guix extension [3] and then (not checked :-)) maybe the user could opt in and install this extension for replacement. 2: <https://www.gnu.org/software/guile/manual/html_node/SRFI_002d37.html> 3: <https://10years.guix.gnu.org/video/guix-repl-to-infinity-and-beyond> Cheers, simon ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Command consistency: suggestion 2023-01-11 21:51 ` Simon Tournier @ 2023-01-16 17:59 ` Paul Jewell via Development of GNU Guix and the GNU System distribution. 2023-01-17 8:23 ` zimoun 0 siblings, 1 reply; 5+ messages in thread From: Paul Jewell via Development of GNU Guix and the GNU System distribution. @ 2023-01-16 17:59 UTC (permalink / raw) To: Simon Tournier, guix-devel@gnu.org Hi Simon, Thanks for the input - comments at the bottom: On 11/01/2023 22:51, Simon Tournier wrote: > > It is often discussed. :-) Well, ‘guix package’ uses SRFI-37 [2] and it > is possible to combine some action; as --switch-generation and > --delete-generations for instance. Aside note that one transaction can > install and remove: > > guix package -i foo -r bar > > which would not be possible when using single action. > > The CLI of ‘guix package’ will not change, IMHO. The mitigation of what > you are considering as an inconsistency is to have “alias“; guix search, > guix, install, guix remove, etc. > > Last, we could imagine a Guix extension [3] and then (not checked :-)) > maybe the user could opt in and install this extension for replacement. > > 2: <https://www.gnu.org/software/guile/manual/html_node/SRFI_002d37.html> > 3: <https://10years.guix.gnu.org/video/guix-repl-to-infinity-and-beyond> > > Cheers, > simon I hadn't considered (or even known about) the multiple commands possibility. Maybe for consistency then guix system should also work the same way as guix package - guix system --list-generations This is how I tripped over this problem initially, because of course this doesn't work! Doing it this way could also allow multiple actions in one line: guix system --switch-generation ... --delete-generation ... but I am reading into your comment that guix system does _not_ use SRFI-37, and therefore cannot combine actions. In other words, it would take more effort to implement this change? I suppose for those of you who have been in guix for several years, this is no issue, since you are familiar with all the different options. to me, as a relative newcomer, it didn't feel so smooth. If nothing changes I shall not be resorting to aliases, but simply making sure I know the correct syntax to achieve what I want! Best regards, Paul (who has finally got his Guix system laptop working as expected) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Command consistency: suggestion 2023-01-16 17:59 ` Paul Jewell via Development of GNU Guix and the GNU System distribution. @ 2023-01-17 8:23 ` zimoun 0 siblings, 0 replies; 5+ messages in thread From: zimoun @ 2023-01-17 8:23 UTC (permalink / raw) To: Paul Jewell, guix-devel@gnu.org Hi Paul, On Mon, 16 Jan 2023 at 18:59, Paul Jewell via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org> wrote: > guix system --switch-generation ... --delete-generation ... > > but I am reading into your comment that guix system does _not_ use > SRFI-37, and therefore cannot combine actions. In other words, it would > take more effort to implement this change? Yes, it would be possible to replace “guix system <thing>” by “guix system --<thing>”. However, it will not be happen. The CLI “guix system” and “guix package” will not change. Although they can be considered as inconsistent. The cost of such change is too high. Because it means update all the documentation around and let the time for people to upgrade their scripts, etc. For example, consider discussion in #38529 [1] and give a look to the lengthy thread [2]. The discussion was about a change for the CLI of “guix environment”. It ended with a new command line “guix shell” and a deprecation and removal plan over several years for “guix environment”. As I am trying to explain, the only viable solution is to implement a Guix extension with another CLI. The current one will not change, IMHO. 1: <http://issues.guix.gnu.org/msgid/CAE4v=phY+7CTKMf8Y3a9p4okfqtMGOWu9kd2Nu6oCJW8OsK3Lw@mail.gmail.com> 2: <https://yhetil.org/guix/CAE4v=phY+7CTKMf8Y3a9p4okfqtMGOWu9kd2Nu6oCJW8OsK3Lw@mail.gmail.com/#r> > I suppose for those of you who have been in guix for several years, this > is no issue, since you are familiar with all the different options. to > me, as a relative newcomer, it didn't feel so smooth. If nothing changes > I shall not be resorting to aliases, but simply making sure I know the > correct syntax to achieve what I want! Thanks for the feedback. I agree that the split of “guix package/pull” on one hand and “guix system/home/import” on the other hand can be confusing at first. Well, Guix is more than 10 years now and it is some historical choices. :-) Cheers, simon ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-17 8:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-01-09 12:22 Command consistency: suggestion Paul Jewell via Development of GNU Guix and the GNU System distribution. 2023-01-09 15:47 ` Joshua Branson 2023-01-11 21:51 ` Simon Tournier 2023-01-16 17:59 ` Paul Jewell via Development of GNU Guix and the GNU System distribution. 2023-01-17 8:23 ` zimoun
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).