unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Bengt Richter <bokr@bokr.com>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>, 38529@debbugs.gnu.org
Subject: bug#38529: Make --ad-hoc the default for guix environment proposed deprecation mechanism
Date: Tue, 17 Dec 2019 14:30:48 -0800	[thread overview]
Message-ID: <20191217223048.GA3741__42442.8127518453$1576621945$gmane$org@PhantoNv4ArchGx.localdomain> (raw)
In-Reply-To: <CAE4v=pjc5pWiaaB17tJnpO=O0=M5xrEWhyvWMLRaiLy5V19Y5Q@mail.gmail.com>

Hi Gábor, Konrad, et al

On +2019-12-17 10:14:12 +0100, Gábor Boskovits wrote:
> Hello Konrad,
> 
> Konrad Hinsen <konrad.hinsen@fastmail.net> ezt írta (időpont: 2019. dec.
> 17., Ke 7:52):
> 
> > On 16/12/2019 23:09, Ludovic Courtès wrote:
> > > So in a more algorithmic manner:
> > >> 1. if ad-hoc and inputs-of is present at the same invocation: fail
> > >> hard. (With an error like incompatible options present)
> > >> 2. if only ad-hoc is present, then print a deprecation warning (yes,
> > >> we could make this suspendable with an environment variable, like you
> > >> described)
> > >> 3. if only inputs-of present, then do the new behaviour.
> > >> 4. if neither ad-hoc nor inputs-of present then
> > >>    a. if GUIX_ENVIRONMENT_DEPRECATED is 1: do the current behaviour,
> > >>    b. if GUIX_ENVIRONMENT_DEPRECATED is undefined, or is not 1: do the
> > >> new behaviour.
> > > That sounds like a good plan to me.
> > >
> > > #4 is the trickiest, and I think it’d be good to give users a bit of
> > > time so they can start adjusting before deprecation is in effect.
> >
> > #4 is trickiest for another reason: there is no future-proof use of
> > "guix environment" that works right now and will continue to work. Nor
> > is there any way to see, when looking at a command line, whether it's
> > old-style or new-style, if neither --ad-hoc nor --inputs-of are present.
> > This means that all existing documentation (tutorials etc.) will become
> > misleading in the future. Worse, even documentation written today, in
> > full awareness of a coming change, can't do better than saying "watch
> > out, this will do something else in the future".
> >
> > The first rule of backwards-compatibility is: never change the meaning
> > of an existing valid command/API. Add new valid syntax, deprecate old
> > valid syntax, but don't change the meaning of something that was and
> > will be valid.
> >

I think it is important to consider context when talking about meaning.

1. the level and the interpreter of the command:
   The first level is usually the shell (typicallly bash) from logind,
   but there is systemd and/or shepherd before that, and there is bootloader
   and UEFI and before that also accepting and/or passing commands through
   to the kernel via the kernel command line (cf. cat /proc/cmdline ).

   The general pattern I mostly see for a given interpreter is
   
   verb -adverb* (-adjective-for: object-name)* sub-command? implicit-or-object-for-verb*

   Consider whether your new name reinforces a good convention or forks it.
   Consider whether proposed usage translates easily to a natural language explanation.
   Does guix have a cli design best practices doc, BTW?
   
   right now we are talking about the use case where
   verb=guix and subcommand=environment

2. project community conventions
   Specialized areas often have their own jargon and abbreviated refrences
   so an unfortunate choice of name can cause distracting disambiguation searches.

Before settling on a new name xxx, even for a sub-command, I would say at least
first do the following at the command line:
   which xxx
   xxx --version
   xxx --help
   info xxx
   man xxx
   apropos xxx
   
   #check for same prefix, case-insensitively,
   # e.g. env might be tempting, as seen in this thread :)
--8<---------------cut here---------------start------------->8---
   echo $PATH|tr : $'\n'|while read pdir;do (find "$pdir" -maxdepth 1 -iname "env*" 2>/dev/null);done
--8<---------------cut here---------------end--------------->8---
   # -name "*xxx*" may also be a good idea, but the prefix is most important
   # env* produces
   /usr/bin/env
   /usr/bin/envsubst

   guix search xxx
   guix package -A xxx
   wikipedia search on xxx, e.g.
       lynx -dump -force_html -nolist https://en.wikipedia.org/w/index.php?search=xxx |less

   You get the idea, I'm sure ;-)
   
> > How about a more drastic measure: deprecate "guix environment" and
> > introduce a new subcommand with the desired new behaviour?
> >
SGTM, with some caveats

Good, since calling different things by the same name is always going to be problematic.
Iffy, since calling the same thing by different names may reduce future naming options,
   and may muddy the peer-name namespace, so maybe consider using sub-commands or -adverb.

> That is also the other option I was thinking about. Do you have any good
> idea in mind as how to call it? Of course the classic guix environment2
> comes to my mind, but it does not look very appealing to me.
>

Me neither :)

> >
> > Cheers,
> >
> >    Konrad.
> >
> Best regard,
> g_bor
> 

HTH in some way :)

-- 
Regards,
Bengt Richter

  parent reply	other threads:[~2019-12-17 22:32 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-08 15:42 bug#38529: Make --pure the default for `guix environment'? Pierre Neidhardt
2019-12-08 21:03 ` zimoun
2019-12-09 18:46   ` Thompson, David
2019-12-09 20:17     ` Brett Gilio
2019-12-10 17:16     ` Ludovic Courtès
2019-12-30 17:27       ` raingloom
2020-11-03 17:38       ` Christopher Lemmer Webber
2020-11-03 18:35         ` zimoun
2020-11-06  9:03         ` Ludovic Courtès
2020-11-04  9:43       ` Taylan Kammer
2020-11-04 16:05         ` Christopher Lemmer Webber
2019-12-12 11:23   ` bug#38529: Make --ad-hoc the default for guix environment proposed deprecation mechanism Gábor Boskovits
     [not found]   ` <CAE4v=phY+7CTKMf8Y3a9p4okfqtMGOWu9kd2Nu6oCJW8OsK3Lw@mail.gmail.com>
2019-12-12 16:47     ` zimoun
     [not found]     ` <CAJ3okZ3+-yAfRpYDHz-jYONguOPWjff0iWZ_7NPEz6x5mbOO1w@mail.gmail.com>
2019-12-12 20:54       ` Gábor Boskovits
     [not found]       ` <CAE4v=piMnBhHWpbB60qMRnnDNwqkuddfNv7cEihr9+5-52k2OA@mail.gmail.com>
2019-12-13 12:02         ` zimoun
2019-12-13 16:27           ` Gábor Boskovits
2019-12-13 16:32             ` zimoun
2019-12-13 16:41               ` Gábor Boskovits
2019-12-16 22:09             ` Ludovic Courtès
     [not found]             ` <87k16vdise.fsf@gnu.org>
2019-12-17  6:49               ` Konrad Hinsen
     [not found]               ` <e992ac46-37b9-ba12-83cc-6694427acd31@fastmail.net>
2019-12-17  9:14                 ` Gábor Boskovits
     [not found]                 ` <CAE4v=pjc5pWiaaB17tJnpO=O0=M5xrEWhyvWMLRaiLy5V19Y5Q@mail.gmail.com>
2019-12-17 13:33                   ` Kyle Meyer
     [not found]                   ` <87pngncc0n.fsf@kyleam.com>
2019-12-17 14:22                     ` Brett Gilio
2019-12-17 22:30                   ` Bengt Richter [this message]
     [not found]                   ` <20191217223048.GA3741@PhantoNv4ArchGx.localdomain>
2019-12-17 23:21                     ` Bengt Richter
2019-12-17 17:07                 ` zimoun
     [not found]                 ` <CAJ3okZ0Fw=02cDwdn5GuiDCyUNOUY=YaGyrFyHE5qWsOQTLASQ@mail.gmail.com>
2019-12-18  9:43                   ` Konrad Hinsen
     [not found]                   ` <m1pngmrmst.fsf@khs-macbook.home>
2019-12-18 13:09                     ` zimoun
2019-12-18 20:55                     ` Arne Babenhauserheide
2019-12-19 11:30                       ` zimoun
2019-12-19 21:39                         ` Arne Babenhauserheide
2019-12-19 22:40                           ` zimoun
2019-12-20  1:37                             ` Arne Babenhauserheide
2019-12-20 11:40                               ` zimoun
2019-12-20 21:31                                 ` Ricardo Wurmus
2019-12-21  8:40                                   ` Gábor Boskovits
2019-12-21 16:51                                   ` Ludovic Courtès
2019-12-30  9:44                                     ` EuAndreh via Bug reports for GNU Guix
2019-12-30 10:34                                       ` Ludovic Courtès
2019-12-30 12:03                                         ` zimoun
2019-12-30 15:06                                           ` Ludovic Courtès
2019-12-30 17:55                                             ` zimoun
2019-12-30 21:10                                               ` Ricardo Wurmus
2019-12-30 21:32                                                 ` zimoun
2019-12-31 18:09                                                 ` Ludovic Courtès
2019-12-31 19:09                                                   ` Ricardo Wurmus
2020-01-01 19:23                                                     ` zimoun
2019-12-20 23:02                                 ` Arne Babenhauserheide
2019-12-21  0:04                                   ` zimoun
     [not found]                     ` <CAJ3okZ3zSS0Rbnu5eLhpYHPvSY1emaj=-estQcjRwiJ3=4RMMA@mail.gmail.com>
2019-12-20 11:24                       ` Konrad Hinsen
     [not found]                       ` <m1fthfz1db.fsf@ordinateur-de-catherine--konrad.home>
2019-12-20 12:03                         ` zimoun
2019-12-20 21:08                           ` Ricardo Wurmus
2019-12-23  9:28                             ` Danny Milosavljevic
2020-01-02  9:49                             ` Andy Wingo
2019-12-20 21:12                     ` Ricardo Wurmus
     [not found]                     ` <87v9qapuq6.fsf@elephly.net>
2019-12-21 15:18                       ` Konrad Hinsen
2019-12-19 16:31                 ` bug#38529: Deprecating ‘guix environment’? Ludovic Courtès
     [not found]                 ` <87k16snuoz.fsf_-_@gnu.org>
2019-12-19 22:48                   ` zimoun
2019-12-20 11:17                   ` Konrad Hinsen
     [not found]                   ` <m1immbz1ny.fsf@ordinateur-de-catherine--konrad.home>
2019-12-20 13:21                     ` zimoun
2019-12-08 22:43 ` bug#38529: Make --pure the default for `guix environment'? Leo Famulari
2019-12-09  5:23 ` Maxim Cournoyer
2022-08-19 14:28   ` Maxim Cournoyer
2019-12-09 17:37 ` Jesse Gibbons
2019-12-12 19:33   ` 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='20191217223048.GA3741__42442.8127518453$1576621945$gmane$org@PhantoNv4ArchGx.localdomain' \
    --to=bokr@bokr.com \
    --cc=38529@debbugs.gnu.org \
    --cc=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    /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 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).