all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Profiles/manifests-related command line interface enhancements
Date: Wed, 6 Nov 2019 13:09:22 +0100	[thread overview]
Message-ID: <CAJ3okZ2kUvOEbxOKqy_msk_C40uObEM-m1EqL_PAn80-vy6yyg@mail.gmail.com> (raw)
In-Reply-To: <m18soucnrf.fsf@eduroam-prg-sg-1-47-66.net.univ-paris-diderot.fr>

Hi Konrad,

On Tue, 5 Nov 2019 at 17:05, Konrad Hinsen <konrad.hinsen@fastmail.net> wrote:

> > I am not sure to see which feature is missing.
>
> My main point is that the future evolution of functionality (and user
> interfaces) in this space should take into account usage scenarii,
> rather than adding features in an ad-hoc fashion.

I agree.

To me, scenarii is how we combine the features.

Speaking about your example of "à la Docker" usage, except the
manifest composition, we could already write an usage scenario, I
guess.


> I can of course share a manifest file by putting it in a public
> repository. But that isn't necessarily the best way.

From my opinion, it is not the problem of Guix. Guix should not force
a practise, as good it should be. The way the users share manifests is
the problem of users, not the Guix's one, IMHO.


> Take the typical example from Docker tutorials: bundling a Web server
> with some Web application and a database. It's easy to make a manifest
> file for collecting the required packages. But it would make more sense
> to me to have a module in a Guix channel that defines a parametrizable
> super-package for the Web application that has no source code of its own
> but various inputs and perhaps configuration files. Users can then
> install several Web apps bundled in this fashion, sharing the Web
> server. This kind of composition is not possible (currently) with
> manifest files.

I do not understand very well what "guix deploy" is, but it is not
what it is doing?

(except the manifest composition that we agree both is missing; Pierre
mentioned us ;-))

From my opinion, Docker tutorials seems really easy because 1.
everything is centralized and 2. they cheat (it is hard to replay a
random tuto couple of months later; from my experience.)


> > From my point of view, ephemeral (environment) vs persistent (profile)
> > depends on use-case but at the end the only concern is: how to
> > populate them? And the only answer should be: declarative (manifest);
> > the ad-hoc (package -i) should not be the usual way but only a
> > quick&dirt test.
>
> I agree. So maybe each profile should have an associated manifest file,
> with "guix install" merely adding to it and the updating the profile.

A kind of plumbing manifest already exists. See <your-profile>/manifest.
But it is not compliant with the "--manifest" option.

Let consider the scenario:

  guix package --manifest manif.scm -p foo #1
  guix pull #2
  guix package -i pkg -p foo #3


Initially, I was thinking [1] that it should be nice to create again
the exact same profile than at the end of the step #3 using
foo/manifest. For example, sending to colleagues the file foo/manifest
and they just run:

  guix package --manifest foo-manifest.scm -p bar

So packages comes from 2 different commits: one from the Guix state at
step #1 or provided by manif.scm, another one from the Guix updated
state of step #2.

But reading thread elsewhere about manifest and so on, yours and
Pierre's arguments convinced me that it is the wrong way. Other said,
it will become a big mess with too much inferiors (because it does not
force the user to use the manifests).

Instead, after testing (or whatever) at the step #3, the user should
write the correct manifest corresponding to this step #3, say
other.scm. Then sending manif.scm and other.scm to colleagues and they
run:

   guix package -m manif.scm -m other.scm -p baz

And the profiles foo and baz contain the exact same binaries (hope so :-))


What is missing is an easy way to track the Guix commit state. If the
user runs the step #1 and the file manif.scm does not provide any
commit, then they needs to write down the Guix commit. And it is not
straightforward if they forgot and already run the step #2. However,
this information is currently tracked by Guix in the file
foo/manifest.


From what I understand, "guix time-machine" is the answer to this kind
of scenario. Right?


[1] https://lists.gnu.org/archive/html/guix-devel/2019-09/msg00228.html


> But then it would make sense for guix to manage manifest files in git
> repositories by default, to encourage good habits.

I agree. The same way than channel does.


> >> This third dimension also
> >> raises the question of where the information (profiles, manifests, ...)
> >> are stored and managed (version control?),
> >
> > Profiles are managed by Guix, isn't it?
>
> Sure, but how exactly? Right now, a profile is a directory anywhere in
> the file system that Guix knows about. Recent discussions have proposed
> alternatives, such as keeping all of a user's profile in some directory
> defined by convention and referring to them by name. What's the better
> way to use as a default? I don't know, but I think we should discuss it
> rather than adding new sub-commands with different behavior and thus
> adding to the mess.

I agree about "adding to the mess". :-)

Personally, I do not like the "directory defined by convention and
referring to them by name" approach. The "package manager" Conda does
that and after some years using it (before switching to Guix \o/),
this approach appears to be also a mess. I never remembered the name
of the profile so I was always doing "conda list -e" oups! wrong
command the other one "conda info -e" to list all the "environment"
names and then source the one I want.

I prefer the Guix way and I store the profile (symbolic link) in the
project directory. This way, I always remember the name, I can quickly
create another one with a cryptic name -- naming is hard :-) -- and
weeks later I remember that it is attached to this project.

I understand the use-case described in the Pierre's blog post but this
use-case is mainly not mine and I am happy with the "scattered"
approach. :-)


About the subcommand mess, what should help IMHO should be to be able
to easily create "alias" and/or new subcommands distributed with
channels. I did not know before reading this bug report [2].


[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37399



All the best,
simon

  reply	other threads:[~2019-11-06 12:09 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23 16:37 Profiles/manifests-related command line interface enhancements Pierre Neidhardt
2019-10-24  9:00 ` Mark H Weaver
2019-10-24  9:32   ` Pierre Neidhardt
2019-10-24 16:28     ` Pierre Neidhardt
2019-10-24 16:42     ` Danny Milosavljevic
2019-10-24 18:16       ` Pierre Neidhardt
2019-10-24 19:23         ` Mark H Weaver
2019-10-24 20:04           ` Pierre Neidhardt
2019-10-24 21:35             ` Mark H Weaver
2019-10-25  9:29               ` Pierre Neidhardt
2019-10-31 11:38                 ` Pierre Neidhardt
2019-11-03 14:18 ` Ludovic Courtès
2019-11-04 10:39   ` Pierre Neidhardt
2019-11-04 11:06     ` zimoun
2019-11-05  6:26     ` Konrad Hinsen
2019-11-05  8:35       ` Hartmut Goebel
2019-11-05  9:03         ` Konrad Hinsen
2019-11-05  9:09           ` Hartmut Goebel
2019-11-05  9:22             ` Pierre Neidhardt
2019-11-05 15:36       ` zimoun
2019-11-05 16:05         ` Konrad Hinsen
2019-11-06 12:09           ` zimoun [this message]
2019-11-07 13:07             ` Konrad Hinsen
2019-11-06 17:07           ` Ludovic Courtès
2019-11-06 22:21             ` Bengt Richter
2019-11-07 13:52             ` Konrad Hinsen
2019-11-06 16:35       ` Ludovic Courtès
2019-11-07  7:46         ` Konrad Hinsen
2019-11-07  9:04           ` Pierre Neidhardt
2019-11-07 11:14             ` Konrad Hinsen
2019-11-07 11:36               ` Pierre Neidhardt
2019-11-09 17:59               ` Ludovic Courtès
2019-11-10  9:36                 ` Konrad Hinsen
2019-11-11 15:56                   ` A better XML, config is code (was Re: Profiles/manifests-related command line...) Giovanni Biscuolo
2019-11-13 15:28                     ` Konrad Hinsen
2019-11-12  8:55                   ` Profiles/manifests-related command line interface enhancements Andy Wingo
2019-11-12 20:07                     ` Konrad Hinsen
2019-11-13 20:58                     ` Bengt Richter
2019-11-16 22:02                   ` Ludovic Courtès
2019-11-17 10:44                     ` Konrad Hinsen
2019-11-18 14:25                       ` zimoun
2019-11-19 10:24                         ` Konrad Hinsen
2019-11-23 17:10                       ` Ludovic Courtès
2019-11-25 11:06                         ` Konrad Hinsen
2019-11-26  9:51                           ` On DSLs Ludovic Courtès
2019-12-02 19:05                             ` zimoun
2019-12-02 19:11                               ` Julien Lepiller
2019-12-03 10:19                                 ` Konrad Hinsen
2019-12-03 14:12                                   ` Ricardo Wurmus
2019-12-03 15:46                                     ` zimoun
2019-12-04  6:33                                     ` Bengt Richter
2019-12-10 16:26                                 ` Ludovic Courtès
2019-12-08  8:48                               ` Konrad Hinsen
2019-12-03 10:26                             ` Konrad Hinsen
2019-12-03 12:00                               ` zimoun
2019-11-11 14:13           ` Profiles/manifests-related command line interface enhancements Hartmut Goebel
2019-11-16 22:27           ` Ludovic Courtès
2019-11-17 11:30             ` Konrad Hinsen
2019-11-18 14:40               ` zimoun
2019-12-22 19:40               ` Andreas Enge
2019-12-22 20:39                 ` Pjotr Prins
2019-11-18 14:15             ` zimoun
2019-11-26  9:36               ` Ludovic Courtès
2019-11-06 16:42     ` Ludovic Courtès
2019-11-07 12:57       ` zimoun
2019-11-17 10:35         ` Package inputs in manifests Ludovic Courtès
2019-11-17 23:11           ` Bengt Richter
2019-11-18 17:14             ` zimoun
2019-11-23 14:05             ` Ludovic Courtès
2019-11-24  5:49               ` Bengt Richter
2019-11-24  7:17                 ` Timothy Sample
2019-11-25  3:42                   ` Bengt Richter
2019-11-18 16:18           ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ3okZ2kUvOEbxOKqy_msk_C40uObEM-m1EqL_PAn80-vy6yyg@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=konrad.hinsen@fastmail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.