all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.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: Fri, 13 Dec 2019 13:02:27 +0100	[thread overview]
Message-ID: <CAJ3okZ3gJDdDKWERLANp+7ueSirEZ7hH=YKa3nhCAzCzAz1TGg@mail.gmail.com> (raw)
In-Reply-To: <CAE4v=piMnBhHWpbB60qMRnnDNwqkuddfNv7cEihr9+5-52k2OA@mail.gmail.com>

Hi Gábor,


On Thu, 12 Dec 2019 at 21:54, Gábor Boskovits <boskovits@gmail.com> wrote:

> zimoun <zimon.toutoune@gmail.com> ezt írta (időpont: 2019. dec. 12., Csü 17:47):

>> Maybe I miss a point. Is the aim to conserve the "--ad-hoc" option
>> with a different effect? Or why do we want to conserve this option
>> name?
>> It appears to me simpler to give another name, for example
>> "--inputs-of". And it is more meaningful.
>
> Sorry for the confusion. Ad-hoc should be retained with the same effect, so that we do not break existing scripts.
> Renamin the option would be ok. It even makes sense to me.

What I propose is:

  - keep the option "--ad-hoc" with the current behavior; so same effect
  - add a new option "--inputs-of" with the new behavior; name more meaningful
  - and two env variables; to not break existing scripts


>> First, when "--ad-hoc" is used then it reports a warning: deprecated
>> option and falls in the current behavior.
>> When "--inputs-of" is used then it falls in the new behavior.
>> Therefore, no needs of the ugly "--ignore-deprecated-ad-hoc".
>
> That could be done. The problem is caused by uses of guix environment that does not use any of these options. Those mean different things after the change.

The transition to such use-case was described below with the
introduction of 2 env variables. :-)


>>  # Alice
>>  $ guix environment foo --ad-hoc bar
>>  Warning: deprecated... explanations...
>>                instead use:
>>                 guix environment bar --inputs-of foo
>>
>>  # Bob
>>  $ guix environment bar --inputs-of foo
>>
>>
>> Second, the previous "guix environment foo" (dependencies of foo) is
>> inconsistent with the new "guix environment bar" (only the package
>> bar). Therefore, let introduce the GUIX_ENVIRONMENT_DEPRECATED
>> variable to distinguish both, as you said.
>
> Ok.

It is the easy part. ;-)


Now the hard part: avoid to break existing scripts.

>>  # Alice
>>  $ guix environment foo
>>  Warning: previous behavior requires GUIX_ENVIRONMENT_DEPRECATED=1
>>                turn off the warning: GUIX_ENVIRONMENT_NOWARNING=1
>>
>> And Alice has now a new shell with the package foo. If she wants the
>> dependencies, she has two options:
>>
>> $ GUIX_ENVIRONMENT=1 guix environment foo
>> or
>> $ guix environment --inputs-of foo
>>
>>
>>  # Bob
>>  $ guix environment bar
>>  Warning: previous behavior requires GUIX_ENVIRONMENT
>>
>> And if Bob is annoyed by the warnings each time, he globally turns off
>> with the variable GUIX_ENVIRONMENT_NOWARNING=1.
>>
>>
>> Couple of months later -- after the period adoption -- we remove the
>> variables GUIX_ENVIRONMENT_NOWARNING and GUIX_ENVIRONMENT_DEPRECATED;
>> still keeping the warning with the "--ad-hoc" option. And then, after
>> we can remove the "--ad-hoc" option if required.


> We could recommend simply to use something like:
> GUIX_ENVIRONMENT_DEPRECATED=0 guix environment ...
> Instead in existing scripts that are fixed to use the new syntax. This indeed looks like a better solution, and it is less of a maintenance burden. Good idea.

My point is: the new variable GUIX_ENVIRONMENT_DEPRECATED should only
be used by the scripts that call "guix environment pkg" without the
options "--ad-hoc" or "--inputs-of". And I think that it represents
really few scripts in real life. :-)


> Summarizing:
> Introduce the environment variable.
> For fixed scripts recommend unsetting the environment variable.

I am not to get your plan. :-)


Cheers,
simon

  reply	other threads:[~2019-12-13 12:03 UTC|newest]

Thread overview: 87+ 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   ` Make --ad-hoc the default for guix environment proposed deprecation mechanism Gábor Boskovits
2019-12-12 16:47     ` bug#38529: " zimoun
2019-12-12 20:54       ` Gábor Boskovits
2019-12-13 12:02         ` zimoun [this message]
2019-12-13 16:27           ` Gábor Boskovits
2019-12-13 16:32             ` zimoun
2019-12-13 16:41               ` Gábor Boskovits
2019-12-14 18:11               ` Hartmut Goebel
2019-12-16 22:09             ` Ludovic Courtès
2019-12-17  6:49               ` Konrad Hinsen
2019-12-17  9:14                 ` Gábor Boskovits
2019-12-17 13:33                   ` Kyle Meyer
2019-12-17 13:33                   ` Kyle Meyer
2019-12-17 14:22                     ` Brett Gilio
2019-12-17 14:22                     ` Brett Gilio
2019-12-17 22:30                   ` Bengt Richter
2019-12-17 23:21                     ` Bengt Richter
2019-12-17 23:21                     ` Bengt Richter
2019-12-17 22:30                   ` Bengt Richter
2019-12-17  9:14                 ` Gábor Boskovits
2019-12-17 17:07                 ` zimoun
2019-12-18  9:43                   ` Konrad Hinsen
2019-12-18  9:43                   ` Konrad Hinsen
2019-12-18 13:09                     ` zimoun
2019-12-18 13:09                     ` zimoun
2019-12-20 11:24                       ` Konrad Hinsen
2019-12-20 12:03                         ` zimoun
2019-12-20 21:08                           ` Ricardo Wurmus
2019-12-23  9:28                             ` Danny Milosavljevic
2019-12-23  9:28                             ` Danny Milosavljevic
2020-01-02  9:49                             ` Andy Wingo
2019-12-20 11:24                       ` Konrad Hinsen
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
2019-12-20 21:12                     ` Ricardo Wurmus
2019-12-20 21:12                     ` Ricardo Wurmus
2019-12-21 15:18                       ` Konrad Hinsen
2019-12-21 15:18                       ` Konrad Hinsen
2019-12-17 17:07                 ` zimoun
2019-12-19 16:31                 ` bug#38529: Deprecating ‘guix environment’? Ludovic Courtès
2019-12-19 16:31                 ` Ludovic Courtès
2019-12-19 22:48                   ` zimoun
2019-12-19 22:48                   ` bug#38529: " zimoun
2019-12-20 11:17                   ` Konrad Hinsen
2019-12-20 11:17                   ` Konrad Hinsen
2019-12-20 13:21                     ` zimoun
2019-12-20 13:21                     ` bug#38529: " zimoun
2019-12-17  6:49               ` bug#38529: Make --ad-hoc the default for guix environment proposed deprecation mechanism Konrad Hinsen
2019-12-16 22:09             ` Ludovic Courtès
2019-12-12 20:54       ` Gábor Boskovits
2019-12-12 16:47     ` zimoun
2019-12-12 11:23   ` Gábor Boskovits
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

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

  git send-email \
    --in-reply-to='CAJ3okZ3gJDdDKWERLANp+7ueSirEZ7hH=YKa3nhCAzCzAz1TGg@mail.gmail.com' \
    --to=zimon.toutoune@gmail.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 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.