From owner-dev-commits-src-all@freebsd.org Fri Jun 11 00:42:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5258965621B for ; Fri, 11 Jun 2021 00:42:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1MW31KFxz3G2r for ; Fri, 11 Jun 2021 00:42:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82d.google.com with SMTP id v6so1362587qta.9 for ; Thu, 10 Jun 2021 17:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QBC1BXzN+RnfeQZGQNAki7HsWfbSxbn4tIzsy8vo/b8=; b=EvOrbsFp+t1pXLUiOfSXg57ElGQPdvEfRBoL35zVsdE8fh3oz8f7Zleeq5E+5Z+g7y oMK8oVsEu+EJu9x1vilsTa6AsuLObGUt4j3X5+qRpevsj0aeJmUCVweI0tiLqRVL7sC+ a8angFaOu/zkFip4sofmSwmN31K61OtAqdZMgEjSoVh3L5/wEZvUWKKqeO+92mhxWMzx TvKQX36rk4SkXfeKG0PnugZrendNhplTahNJlaBdvf19D8OUbM2ZO//UYmb6YFpGowuF 1ql3dj8aPsDdhz5Dh01NB4xivbNa2ocfWlEpjndryHxmmjW9M6AC8yahxk0rhKIwf/Fk xZrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QBC1BXzN+RnfeQZGQNAki7HsWfbSxbn4tIzsy8vo/b8=; b=jfi5OUxjlDnxuhwnTttM5cwRDc6lbWdogLjqJrKWerZsAgvIFOsaXjkNXIjWSF+bzV rFkQKj063BnRleBupNefNDjjqj7VehIw2htnMtDd4GMg/mZxG5Mn2alcb9IY0ToK3CbH iNLTuGqe5ZshTp7/qCa14FpXk9crH6Uacs1+5CpgfWOAOnG3GmgIX13UYaOI4h05e8LQ ZVqS9b470Jtq65X8zB76JUMoYbRjglRkY/OOuanJ2fM/lVsUOAxfCexCJVZKTJUvf7oU xVrhCt1N4gM1FS4l97RZYOS7+51/KUiREjUBcGg49h8So2pkYe8LA18E+wwBgsBgTKcZ qRAg== X-Gm-Message-State: AOAM532sRbqO2Zyhvy0vw76paGCyBf3gG4395H+xaatVFTeeaTo/l1Vs l+Mb1mLAtfZRmHz5DkFeYE2R5RyXzgkSW1nBBsJYytbXl6x2Qhxj X-Google-Smtp-Source: ABdhPJz/uR2svhYXLldhLJfIXzOsE4e5sap/U9oIuEKp2g2rZaQK4QUQ4mYxmBY/kY4sIgP+stzgoWaYd1Phv1pikE8= X-Received: by 2002:ac8:6906:: with SMTP id e6mr1562144qtr.73.1623372141862; Thu, 10 Jun 2021 17:42:21 -0700 (PDT) MIME-Version: 1.0 References: <202106101948.15AJmlgS021046@gndrsh.dnsmgr.net> In-Reply-To: <202106101948.15AJmlgS021046@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 10 Jun 2021 18:42:11 -0600 Message-ID: Subject: Re: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4G1MW31KFxz3G2r X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 00:42:23 -0000 On Thu, Jun 10, 2021 at 1:48 PM Rodney W. Grimes wrote: > > On Thu, Jun 10, 2021 at 5:46 AM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > > > > > > commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > > Author: Warner Losh > > > > AuthorDate: 2021-06-10 00:10:12 +0000 > > > > Commit: Warner Losh > > > > CommitDate: 2021-06-10 00:10:52 +0000 > > > > > > > > mk: WITH_FOO=no now generates a warning > > > > > > First off thank you, this may stop some head scratching! > > > > > > But what about WITHOUT_foo=no the symetrical mistake? > > > I see bdrewey raised this in the review, but it was dismissed > > > using the argument that some languages, spanish specifically, > > > allow double negatives. This is computers engineering, > > > and in that field of science double negatives are clearly > > > defined and understood, so using an argument of a language > > > that simply does not apply to the field, IMHO, is an arguement > > > of low standing. > > > > > > > It's not the same, and I'm not solving that error because the mapping > > is ambiguous. I've seen a lot more instances of people using > > WITHOUT_FOO=no unironically because it makes sense to the > > person doing it. I disagree it's not a language issue, because > > language is involved here: how do we assign semantic meaning > > is unclear and I have no desire to get involved in what I clearly > > view as a quagmire. > > > > > > > Also I do not believe == is a case insensitive operation > > > so this code fails for NO, No, and nO(sic). > > > > > > > Also true. Again, this isn't perfect. I have no desire to make it > > perfect, because the list isn't finite. > > > > If you'd like to own this issue, feel free, but it's not something I > > wish to pursue further. > > You touched it, you own it. > % ./configure --without-fred=no configure: error: invalid package name: fred=no I accomplished what I set out to accomplish. We've never, ever, fixed all the bugs / issues pointed out by reviewers in this project for adjacent issues or code. Otherwise, I'd still only about half way through bde's feedback... Warner > > Warner > > > > > > > Regards, > > > Rod > > > > > > > > Many people are used to gnu configure's behavior of changing > > > > --with-foo=no to --without-foo. At the same time, several folks > have > > > > WITH_FOO=no in their config files to enable this ironic form of > the > > > > option because of an old meme from IRC, a mailing list or the > forums > > > (I > > > > forget which). Add a warning to allow to alert people w/o > breaking > > > POLA. > > > > > > > > Reviewed by: allanjude, bdrewery, manu > > > > MFC After: 2 weeks > > > > Sponsored by: Netflix > > > > Differential Revision: https://reviews.freebsd.org/D30684 > > > > --- > > > > share/mk/bsd.mkopt.mk | 6 ++++++ > > > > 1 file changed, 6 insertions(+) > > > > > > > > diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk > > > > index 5a9cf1b2f1be..98d23dd46c2a 100644 > > > > --- a/share/mk/bsd.mkopt.mk > > > > +++ b/share/mk/bsd.mkopt.mk > > > > @@ -36,6 +36,9 @@ > > > > # > > > > .for var in ${__DEFAULT_YES_OPTIONS} > > > > .if !defined(MK_${var}) > > > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > > > +.endif > > > > .if defined(WITHOUT_${var}) # WITHOUT always wins > > > > MK_${var}:= no > > > > .else > > > > @@ -54,6 +57,9 @@ MK_${var}:= yes > > > > # > > > > .for var in ${__DEFAULT_NO_OPTIONS} > > > > .if !defined(MK_${var}) > > > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > > > +.endif > > > > .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT > always > > > wins > > > > MK_${var}:= yes > > > > .else > > > > > > > > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > > > > > -- > Rod Grimes > rgrimes@freebsd.org >