From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: bug#38529: Make --ad-hoc the default for guix environment proposed deprecation mechanism Date: Fri, 13 Dec 2019 17:32:33 +0100 Message-ID: References: <87eexeu8mo.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59897) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifnsF-00012V-7T for bug-guix@gnu.org; Fri, 13 Dec 2019 11:33:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifnsE-0006vh-4V for bug-guix@gnu.org; Fri, 13 Dec 2019 11:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifnsD-0006vQ-Vm for bug-guix@gnu.org; Fri, 13 Dec 2019 11:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ifnsD-0003ZU-TU for bug-guix@gnu.org; Fri, 13 Dec 2019 11:33:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: =?UTF-8?Q?G=C3=A1bor?= Boskovits Cc: Guix-devel , 38529@debbugs.gnu.org Hi G=C3=A1bor, Sorry to be slow. :-) On Fri, 13 Dec 2019 at 17:28, G=C3=A1bor Boskovits wr= ote: > 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. > > This would minimze friction, as there will be a few scripts falling under= 4. > This would also allow mirgating such scripts one by one. be defining > GUIX_ENVIRONMENT_DEPRECATED to 1 in some startup file, and using > GUIX_ENVIRONMENT_DEPRECATED=3D0 guix environment ... in scripts that are > fixed to use the new syntax. > > > What do you think? I am perfectly aligned! :-) It is exactly what I have tried to describe. Sorry again for being slow. Thank you. Do you plan to implement it? Do I give a try? All the best, simon