From owner-svn-src-head@freebsd.org Fri Sep 4 19:01:29 2020 Return-Path: Delivered-To: svn-src-head@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 A7A993CCAA8; Fri, 4 Sep 2020 19:01:29 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 4Bjn8S3nZDz4TQ3; Fri, 4 Sep 2020 19:01:28 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x42e.google.com with SMTP id c15so7873342wrs.11; Fri, 04 Sep 2020 12:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=h97cv+DfIJbjcuJrRJhEvReF/IdLrZvleWQWewth5JM=; b=YpbKE5UE/PTaxvixj45PUzeKwGPMejGix7wcuUQCw6qdWaE6WUOnj6KQSguIHT2MYQ VJTIU6YaFYtCCVv5lde5s2s5UJWXoC4pbE0/CjINr7iPNIGoGME1XmG+McEltfLOi5Vk 4Fc/3qCvyBK8T9OVrLCvSW5lwRE5vkjrxSGlZ2sIc8u9eTO/TdPwqUcq0nEeU1Q7UZzt MI4m0BJbJI7pQaMWDK9adQ18EmsxxTuEQdu7ZEu5ZG7ls0duSMbngnENubGvOfUEooP+ 8yHlm9HCjpYPeKFExPXix5va6drBMYXD4tG7WmZBiseNXf6QP72JwS/n9RTx7MZOHxx/ 2/sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=h97cv+DfIJbjcuJrRJhEvReF/IdLrZvleWQWewth5JM=; b=YJvwQt7aDZ9rndJ00i4GSPUYg/YU0b53rrWKmeNtBDfxox6B9KjkDKlAc+Oz01aHcM QRUw7GJQ8UF1949RkD0Hg/91h+QDO3ZUEtsQhQciq7qThvghGuy/kKk8Q6vvGRK0C68r T8k44wqn5bkcZUwjZ0Yiy3EJxjDcNmU3sTMvqCfJqVPxVklM7ydyXQx3kN+pHH9o7nMh yEcrmCdb3nNnVtKPZxCIdlTpU3b8i4cyKoEtEUnsNqZEfqc8HEN5Nszhy4Qeyd8mcKEo 61MtHPOLuZojTxvxd0C+baxEDFM+jaAtQz6lh14EzzomGxfvd07kpwDdsq9aCPzZE7OA ItqA== X-Gm-Message-State: AOAM533cVyj1wH1XULctnwCox890AM6hSylzQgR9gP6anJXGILooS0jj caVQXEDWYOiCRw7krgaUeRQ6yRQK5E49blIzlQ7+ojCpcco= X-Google-Smtp-Source: ABdhPJycocwRw5SjmvtpAuFmJPqbD5U30FoIH7nhPYhNk8ntyyCkB2+2dgZk4A041Cpr+aCODP5lIWOG42Z7qvJEMKg= X-Received: by 2002:a5d:4ccc:: with SMTP id c12mr8771132wrt.160.1599246086945; Fri, 04 Sep 2020 12:01:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6000:187:0:0:0:0 with HTTP; Fri, 4 Sep 2020 12:01:25 -0700 (PDT) In-Reply-To: <60ea593f-8258-e30d-b897-f162168b44d3@cs.duke.edu> References: <202009012119.081LJERb018106@repo.freebsd.org> <95844C00-D10A-456D-AD29-DF572043074F@fh-muenster.de> <20200902020507.GA38274@FreeBSD.org> <20200902180626.GA88595@FreeBSD.org> <6124a908-25a5-e023-16da-7963ba229b7f@FreeBSD.org> <08636D5E-AA07-4AE7-B5AC-656B08CF564B@fh-muenster.de> <20200903024226.GA54078@FreeBSD.org> <60ea593f-8258-e30d-b897-f162168b44d3@cs.duke.edu> From: Mateusz Guzik Date: Fri, 4 Sep 2020 21:01:25 +0200 Message-ID: Subject: Re: svn commit: r365071 - in head/sys: net net/altq net/route net80211 netgraph netgraph/atm netgraph/atm/ccatm netgraph/atm/sscfu netgraph/atm/sscop netgraph/atm/uni netgraph/bluetooth/common netgraph... To: Andrew Gallatin Cc: Alexey Dokuchaev , Michael Tuexen , Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Bjn8S3nZDz4TQ3 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=YpbKE5UE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::42e as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.53 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-0.97)[-0.969]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::42e:from]; NEURAL_HAM_SHORT(-0.57)[-0.566]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2020 19:01:29 -0000 On 9/4/20, Andrew Gallatin wrote: > On 2020-09-02 22:42, Alexey Dokuchaev wrote: > >>> I want to understand which rules have to be followed (and why). >> >> In general, FreeBSD code we write should follow style(9); it specifically >> mentions "do not add whitespace at the end of a line" and "... followed >> by >> one blank line" but doesn't go as far as explicitly forbidding multiple >> consecutive newlines. To me it's pretty obvious, and while others might >> have different sens esthe'tique, usually it is lack thereof (no offense) >> or mere ignorance. >> >> ./danfe >> >> P.S. Old-school tools like indent(1) or `uncrustify' were never widely >> popular, I guess, because they did not possess enough knowledge of the >> language to always produce correct results. Perhaps new era tools, like >> clang-format, could bring this to a whole new level. >> > > I do the upstream sync between the Netflix tree and > FreeBSD-current about every 3 weeks (unless glebius beats > me to the punch and does it first :). I anticipate that > this blank line sweep will cause lots of conflicts for us. > I understand this is progress, and I don't object, and I'm > not asking for a revert, but please understand that cleanups > like this do have hidden costs. I expect that other commercial > entities who contribute to FreeBSD will have the same issue, > and I also anticipate it will cause problems with MFCs > > Rather than doing more sweeps like this, is it possible to > come up with a clang-format rule that's 95% of style(9), do > just one more sweep of the tree to apply that rule, add that > rule as a pre-commit hook, and be done forever with style(9) > related changes? > For starters I completely agree with the need for tooling to prevent addition of more non-conformant code, but I'm leaving this for someone else. I don't intend to do any more sweeps (modulo perhaps vfs code). I would like to note that directories like contrib, zfs, netmap and others which have known upstream got intentionally skipped during to not mess with imports. Of course this does not necessary cover all merges. Merges regardless of the above (or going the other way) should not be very problematic though. No design changes are needed, let alone any testing on account of the above. Worst case this is just minor annoyance which can be cleaned up while watching The Sopranos with one eye. Note that ultimately there is a hidden cost to previous state as well. What perhaps is not clear from the commit message and wont be seen unless you scrutinize the diffs, some lines got changed from having tabs and/or spaces instead of just a newline. This kind of stuff is jumps at you every time if you have an editor configured to report it (you can find a vim snipped at the bottom of interested). That being said, I understand this generated work for some people but I don't think it consitutes a problem. Also I don't think a heads up would change anything here. If I was planning more invasive work I would definitely try to coordinate. Also note the changeset does not interfere with git blame (unless you want to look at empty lines). Here is vim snipped I stole from someone several years back: highlight ExtraWhitespace ctermbg=red guibg=red autocmd BufWinEnter *.{c,pl,pm} match ExtraWhitespace /^\s* \|\s\+$/ autocmd InsertEnter *.{c,pl,pm} match ExtraWhitespace /^\s* \|\s\+\%#\@