From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: bug#38529: Make --ad-hoc the default for guix environment proposed deprecation mechanism Date: Tue, 17 Dec 2019 18:07:45 +0100 Message-ID: References: <87eexeu8mo.fsf@ambrevar.xyz> <87k16vdise.fsf@gnu.org> 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]:33885) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihGKG-0002Fo-G2 for guix-devel@gnu.org; Tue, 17 Dec 2019 12:08:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihGKE-0001NM-Gv for guix-devel@gnu.org; Tue, 17 Dec 2019 12:08:00 -0500 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:38240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihGKE-0001ND-Cm for guix-devel@gnu.org; Tue, 17 Dec 2019 12:07:58 -0500 Received: by mail-qk1-x72e.google.com with SMTP id k6so6520388qki.5 for ; Tue, 17 Dec 2019 09:07:58 -0800 (PST) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Konrad Hinsen Cc: Guix Devel , 38529@debbugs.gnu.org Hi Konrad, On Tue, 17 Dec 2019 at 07:52, Konrad Hinsen wr= ote: > > On 16/12/2019 23:09, Ludovic Court=C3=A8s 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=E2=80=99d be good to give users a b= it 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". I do not understand what is the issue for the time-traveling if it is documented. Maybe I miss a point. It is not: "watch out, this will do something else in the future" but "watch out, this was doing something else in the past and the change happened the in ". First, I am not convinced that there is not so much scripts that will be broken. And second, I am not convinced neither that these very scripts need time-traveling. > 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 agree on the rule. But it is mitigated but the number of users and the popularity of the tool.= ;-) > How about a more drastic measure: deprecate "guix environment" and > introduce a new subcommand with the desired new behaviour? Yes, it is probably the most adequate to do. But it is sad to loose the good name "guix environment"... and we know that naming is hard. ;-) What about "guix shell"? All the best, simon