[{"id":18729,"web_url":"https://patchwork.libcamera.org/comment/18729/","msgid":"<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>","date":"2021-08-12T09:01:26","subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Kieran\n\nOn Thu, 12 Aug 2021 at 09:45, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> The .clang-format file uses CaseSensitive on Regex rules for Include Categories.\n> Without this, it would not be possible to distinguish between QT headers which\n> commence with a 'Q' verses system headers including <queue>.\n>\n> While we have more wider support for libcamera to run and build on older\n> platforms, it should be safe to assume that developers who need to run\n> checkstyle can update their clang-format to a modern version.\n\nDo you know the magic runes to do this? The Pi repositories are stuck\non version 9 currently, I believe.\n\nThanks!\nDavid\n\n>\n> clang-format-12 is supported in Ubuntu 20.04 in the updates category,\n> and in Debian sid. More recent versions of Ubuntu ship with\n> clang-format-12 or later by default, and other distributions may of\n> course vary further.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  .clang-format | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/.clang-format b/.clang-format\n> index ff60b928affc..df1421fe94a8 100644\n> --- a/.clang-format\n> +++ b/.clang-format\n> @@ -1,6 +1,6 @@\n>  # SPDX-License-Identifier: GPL-2.0-only\n>  #\n> -# clang-format configuration file. Intended for clang-format >= 7.\n> +# clang-format configuration file. Intended for clang-format >= 12.\n>  #\n>  # For more information, see:\n>  #\n> --\n> 2.30.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3002AC3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 09:01:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 91CBB68886;\n\tThu, 12 Aug 2021 11:01:38 +0200 (CEST)","from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 573F560261\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 11:01:37 +0200 (CEST)","by mail-wr1-x429.google.com with SMTP id r6so7228832wrt.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 02:01:37 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Yw3D2DoF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=0RrSyHB8qtKserH0v186m8U4Q0iM1JhXP9VdvsSyTUo=;\n\tb=Yw3D2DoFLAFg7GwlWHmH4RfonvlgZJ3WOaYh9UhxTLvB6j3iNrEJWbnxhWtkrqgf6l\n\tBJR77ft6xA0CoEIMWHybrhLA3PPJu7Bh9svJuAqoOORy22zHsNtDiH6KGSfHwWD8bfVT\n\t47qf5Zzr1u4GV5JdeNR3HHw3kajUs71cF/suvE6jiHUGX03JD76jGkQEURjoCV2/BVkS\n\tE5bTQ9VtQxgu2auK87YChyy1rqnilr2NCLRyqcdxO7Yjdb8WoM1ssvCxKc9SvOifAqhE\n\tQr2prU/5yh5Z4QCkKmDIdwMNhvFxXFMogneqC2+1gqCCK2gKkq0oSm539O8p5S/EcJ0C\n\teBlQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=0RrSyHB8qtKserH0v186m8U4Q0iM1JhXP9VdvsSyTUo=;\n\tb=mMEQQoZBtyvzV+k9jNzFzbSWJcS9tYI9QGIjPGf5SDVYRFgH48Dl5ipslNHXRUNb1k\n\txDLTQ6m1+Huv8yTEmw8gVm1VTl2VBZ3giOUxhVAe7b0GLedKuVF2bvAcKzFX1D6Uz1lb\n\tCDaXND27cYBhVkZLJKD3lZao97wczor8Cu/5HYhvAD2e7SMcGBZaJ1dtmUhdN86kR15N\n\tVvbt+h5TfRvNfFyVQTJi/AYCHQzCrs9ogfhxp7rwQJbk5nhL3kqjE/z2GXUjDE1RunGn\n\tPC2W8SQ18S2l29AaaaX+unX44akCmq6xUvmEye4mbzoq/e58iw2NpU1o4OBqP0sl+bJB\n\tAcUw==","X-Gm-Message-State":"AOAM533MOItfNe8NH6lcPLt8oHqEuTYjAvUDhQ0oy9jNonQhrlitnps4\n\tP63D3ofF5nyVHZmYM0r+bwfqAtUpt+stQrjzYhQXeQ==","X-Google-Smtp-Source":"ABdhPJzI4LuCHAA7Un96QSMEd/QZ92UeyA3nqeeOw8OLaV81USvZWIMjwpIMZ3uEHNnBgPGxHIF8NsOAEcZ3lFSv0yM=","X-Received":"by 2002:a5d:694f:: with SMTP id r15mr2786071wrw.86.1628758896950;\n\tThu, 12 Aug 2021 02:01:36 -0700 (PDT)","MIME-Version":"1.0","References":"<20210812084501.2883780-1-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210812084501.2883780-1-kieran.bingham@ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 12 Aug 2021 10:01:26 +0100","Message-ID":"<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18730,"web_url":"https://patchwork.libcamera.org/comment/18730/","msgid":"<20210812100724.GA2167@pyrite.rasen.tech>","date":"2021-08-12T10:07:24","subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi David,\n\nOn Thu, Aug 12, 2021 at 10:01:26AM +0100, David Plowman wrote:\n> Hi Kieran\n> \n> On Thu, 12 Aug 2021 at 09:45, Kieran Bingham\n> <kieran.bingham@ideasonboard.com> wrote:\n> >\n> > The .clang-format file uses CaseSensitive on Regex rules for Include Categories.\n> > Without this, it would not be possible to distinguish between QT headers which\n> > commence with a 'Q' verses system headers including <queue>.\n> >\n> > While we have more wider support for libcamera to run and build on older\n> > platforms, it should be safe to assume that developers who need to run\n> > checkstyle can update their clang-format to a modern version.\n> \n> Do you know the magic runes to do this? The Pi repositories are stuck\n> on version 9 currently, I believe.\n> \n\niirc the raspberry pi repos are compatible with regular debian repos? So\nyou add sid to the apt repos:\n\n/etc/apt/sources.list:\n+deb https://deb.debian.org/debian/ sid main\n+deb-src https://deb.debian.org/debian/ sid main\n\nAnd make sure that sid doesn't get used by default (I have it set to\nbullseye) (make sure it doesn't conflict with other preferences settings\nin /etc/apt/preferences.d/) (I think preferences.d is recommended but I\nlike all my preferences in one place):\n\n/etc/apt/preferences:\nPackage: *\nPin: release n=bullseye\nPin-Priority: 1100\n\nAnd then apt update, and apt install clang-format-12.\nupdate-alternatives doesn't seem to pick it up so you might have to\nrelink it manually.\n\nNot sure if this is best practice for raspberry pi though :/ I'm also\nnot sure if this works alongside buster as I'm on bullseye, but it\ndoesn't look like clang-format-12 has any conflicting dependencies with\nbullseye, so maybe it's fine on buster too.\n\n\nThis is why I'm pushing against this patch tbh... it's like saying \"it's\nokay because Ubuntu 22.04 has it\". But it is a good change... idk what's\nbest.\n\n\nPaul\n\n> \n> >\n> > clang-format-12 is supported in Ubuntu 20.04 in the updates category,\n> > and in Debian sid. More recent versions of Ubuntu ship with\n> > clang-format-12 or later by default, and other distributions may of\n> > course vary further.\n> >\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  .clang-format | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/.clang-format b/.clang-format\n> > index ff60b928affc..df1421fe94a8 100644\n> > --- a/.clang-format\n> > +++ b/.clang-format\n> > @@ -1,6 +1,6 @@\n> >  # SPDX-License-Identifier: GPL-2.0-only\n> >  #\n> > -# clang-format configuration file. Intended for clang-format >= 7.\n> > +# clang-format configuration file. Intended for clang-format >= 12.\n> >  #\n> >  # For more information, see:\n> >  #\n> > --\n> > 2.30.2\n> >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A2677C3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 10:07:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0FE8A6884F;\n\tThu, 12 Aug 2021 12:07:34 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AF13E60264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 12:07:32 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DCF1CEE;\n\tThu, 12 Aug 2021 12:07:30 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Q2w3EGY+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628762852;\n\tbh=lWh2OPu+33KoWiCjbTVwgN/FMam0TREvM72ftjr6NJM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Q2w3EGY+NqDPbKFWhbsTuLplZR8vFrrBTp1qgmDpbgTaHJEpgpqMngYZb+HVQoWr0\n\tBQAlK9o+lRwkju0Yc1MdWPt647/1s16TXEFdFSJqXWkkKY8CxSJslGc7h8+sKZjI1J\n\tU9FiIzNP6Xhmy96umyI1P3KIFVd7oGPQ9vxJVTHg=","Date":"Thu, 12 Aug 2021 19:07:24 +0900","From":"paul.elder@ideasonboard.com","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<20210812100724.GA2167@pyrite.rasen.tech>","References":"<20210812084501.2883780-1-kieran.bingham@ideasonboard.com>\n\t<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18732,"web_url":"https://patchwork.libcamera.org/comment/18732/","msgid":"<YRUQdBYhWBXQH5Qi@pendragon.ideasonboard.com>","date":"2021-08-12T12:13:40","subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello,\n\nOn Thu, Aug 12, 2021 at 07:07:24PM +0900, paul.elder@ideasonboard.com wrote:\n> On Thu, Aug 12, 2021 at 10:01:26AM +0100, David Plowman wrote:\n> > On Thu, 12 Aug 2021 at 09:45, Kieran Bingham wrote:\n> > >\n> > > The .clang-format file uses CaseSensitive on Regex rules for Include Categories.\n> > > Without this, it would not be possible to distinguish between QT headers which\n> > > commence with a 'Q' verses system headers including <queue>.\n> > >\n> > > While we have more wider support for libcamera to run and build on older\n> > > platforms, it should be safe to assume that developers who need to run\n> > > checkstyle can update their clang-format to a modern version.\n> > \n> > Do you know the magic runes to do this? The Pi repositories are stuck\n> > on version 9 currently, I believe.\n> \n> iirc the raspberry pi repos are compatible with regular debian repos? So\n> you add sid to the apt repos:\n> \n> /etc/apt/sources.list:\n> +deb https://deb.debian.org/debian/ sid main\n> +deb-src https://deb.debian.org/debian/ sid main\n> \n> And make sure that sid doesn't get used by default (I have it set to\n> bullseye) (make sure it doesn't conflict with other preferences settings\n> in /etc/apt/preferences.d/) (I think preferences.d is recommended but I\n> like all my preferences in one place):\n> \n> /etc/apt/preferences:\n> Package: *\n> Pin: release n=bullseye\n> Pin-Priority: 1100\n> \n> And then apt update, and apt install clang-format-12.\n> update-alternatives doesn't seem to pick it up so you might have to\n> relink it manually.\n> \n> Not sure if this is best practice for raspberry pi though :/ I'm also\n> not sure if this works alongside buster as I'm on bullseye, but it\n> doesn't look like clang-format-12 has any conflicting dependencies with\n> bullseye, so maybe it's fine on buster too.\n> \n> \n> This is why I'm pushing against this patch tbh... it's like saying \"it's\n> okay because Ubuntu 22.04 has it\". But it is a good change... idk what's\n> best.\n\nA hard dependency on clang-format >= 12 seems to harsh to me. Can we\nmake it optional ? One option would be to have multiple configuration\nfiles, or to pass additional options to clang-format on the command line\nfrom checkstyle.py.\n\n> > > clang-format-12 is supported in Ubuntu 20.04 in the updates category,\n> > > and in Debian sid. More recent versions of Ubuntu ship with\n> > > clang-format-12 or later by default, and other distributions may of\n> > > course vary further.\n> > >\n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > ---\n> > >  .clang-format | 2 +-\n> > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > >\n> > > diff --git a/.clang-format b/.clang-format\n> > > index ff60b928affc..df1421fe94a8 100644\n> > > --- a/.clang-format\n> > > +++ b/.clang-format\n> > > @@ -1,6 +1,6 @@\n> > >  # SPDX-License-Identifier: GPL-2.0-only\n> > >  #\n> > > -# clang-format configuration file. Intended for clang-format >= 7.\n> > > +# clang-format configuration file. Intended for clang-format >= 12.\n> > >  #\n> > >  # For more information, see:\n> > >  #","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9ACCEBD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 12:13:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 17A2160265;\n\tThu, 12 Aug 2021 14:13:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0EEE060264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 14:13:45 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3125AEE;\n\tThu, 12 Aug 2021 14:13:44 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mfphOBPp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628770424;\n\tbh=7pr9rGgCa+2Vi0a8bL+Kw4pkNvrTQQSDXjdy9ll1Gko=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mfphOBPpR1qI81/C/ekkgo/5GsIGdZQFR1vJ7ZqdOvVN3DkvWgSLtxBeA7Yxq0NrL\n\tMVWhAL6WRxrIYy2jf5kCU48Gy36q9XfO8DkKUurC6adDTDlcOii/z+f6NrbTv0xGgs\n\tjg9Ud+UFRNOiE9FBLB0bmICZ4iEx503pQ+ABrzPI=","Date":"Thu, 12 Aug 2021 15:13:40 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"paul.elder@ideasonboard.com","Message-ID":"<YRUQdBYhWBXQH5Qi@pendragon.ideasonboard.com>","References":"<20210812084501.2883780-1-kieran.bingham@ideasonboard.com>\n\t<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>\n\t<20210812100724.GA2167@pyrite.rasen.tech>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210812100724.GA2167@pyrite.rasen.tech>","Subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18736,"web_url":"https://patchwork.libcamera.org/comment/18736/","msgid":"<29c5e13c-415c-4205-a581-18d42dd44d99@ideasonboard.com>","date":"2021-08-12T13:06:38","subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 12/08/2021 13:13, Laurent Pinchart wrote:\n> Hello,\n> \n> On Thu, Aug 12, 2021 at 07:07:24PM +0900, paul.elder@ideasonboard.com wrote:\n>> On Thu, Aug 12, 2021 at 10:01:26AM +0100, David Plowman wrote:\n>>> On Thu, 12 Aug 2021 at 09:45, Kieran Bingham wrote:\n>>>>\n>>>> The .clang-format file uses CaseSensitive on Regex rules for Include Categories.\n>>>> Without this, it would not be possible to distinguish between QT headers which\n>>>> commence with a 'Q' verses system headers including <queue>.\n>>>>\n>>>> While we have more wider support for libcamera to run and build on older\n>>>> platforms, it should be safe to assume that developers who need to run\n>>>> checkstyle can update their clang-format to a modern version.\n>>>\n>>> Do you know the magic runes to do this? The Pi repositories are stuck\n>>> on version 9 currently, I believe.\n>>\n>> iirc the raspberry pi repos are compatible with regular debian repos? So\n>> you add sid to the apt repos:\n>>\n>> /etc/apt/sources.list:\n>> +deb https://deb.debian.org/debian/ sid main\n>> +deb-src https://deb.debian.org/debian/ sid main\n>>\n>> And make sure that sid doesn't get used by default (I have it set to\n>> bullseye) (make sure it doesn't conflict with other preferences settings\n>> in /etc/apt/preferences.d/) (I think preferences.d is recommended but I\n>> like all my preferences in one place):\n>>\n>> /etc/apt/preferences:\n>> Package: *\n>> Pin: release n=bullseye\n>> Pin-Priority: 1100\n>>\n>> And then apt update, and apt install clang-format-12.\n>> update-alternatives doesn't seem to pick it up so you might have to\n>> relink it manually.\n>>\n>> Not sure if this is best practice for raspberry pi though :/ I'm also\n>> not sure if this works alongside buster as I'm on bullseye, but it\n>> doesn't look like clang-format-12 has any conflicting dependencies with\n>> bullseye, so maybe it's fine on buster too.\n>>\n>>\n>> This is why I'm pushing against this patch tbh... it's like saying \"it's\n>> okay because Ubuntu 22.04 has it\". But it is a good change... idk what's\n>> best.\n\nWell the distinction I was hoping to make in the commit message was that\nthis is a dependency for /developers/ not users or compilers of the project.\n\nIt's only on those who create patches, and run checkstyle, who, as we\nalready recommend installing the latest or later Doxygen, and Meson, I\nthought this would be the same category.\n\nBut it seems some distributions are harder to update.\n\n\nSo this issue affects:\n\n - Developers only who run checkstyle.py\n - On a patch which modifies headers containing either <queue> or a\n   <Qt*>  header\n\ngit grep -l \"<queue>\"\nsrc/gstreamer/gstlibcamerasrc.cpp\nsrc/ipa/rkisp1/rkisp1.cpp\nsrc/libcamera/pipeline/ipu3/cio2.h\nsrc/libcamera/pipeline/ipu3/frames.h\nsrc/libcamera/pipeline/ipu3/ipu3.cpp\nsrc/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nsrc/libcamera/pipeline/raspberrypi/rpi_stream.h\nsrc/libcamera/pipeline/rkisp1/rkisp1.cpp\nsrc/libcamera/pipeline/simple/simple.cpp\n\n\nIf I drop the CaseSensitive: true then these files may ... very rarely\nmost likely ... show up with a change in check style trying to move <queue>.\n\nBut as it's a one off... and when we get wider support for clang-format\n12, then we can re-introduce it to stop the false move by clang.\n\nThe alternative (removing the QT header match) would result in larger\nrisk of false moves by checkstyle I believe, but even those would be\nlimited to changes made to QCam, which isn't receiving a high churn.\n\n\n> A hard dependency on clang-format >= 12 seems to harsh to me. Can we\n> make it optional ? One option would be to have multiple configuration\n> files, or to pass additional options to clang-format on the command line\n> from checkstyle.py.\n\n\nTwo files could work, though at the moment it's a single line diff\nbetween the two. I don't think command line arguments can help currently\n(other than specifying a clang-format version specific config file.)\n\n--\nKieran\n\n\n\n>>>> clang-format-12 is supported in Ubuntu 20.04 in the updates category,\n>>>> and in Debian sid. More recent versions of Ubuntu ship with\n>>>> clang-format-12 or later by default, and other distributions may of\n>>>> course vary further.\n>>>>\n>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>> ---\n>>>>  .clang-format | 2 +-\n>>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>>>\n>>>> diff --git a/.clang-format b/.clang-format\n>>>> index ff60b928affc..df1421fe94a8 100644\n>>>> --- a/.clang-format\n>>>> +++ b/.clang-format\n>>>> @@ -1,6 +1,6 @@\n>>>>  # SPDX-License-Identifier: GPL-2.0-only\n>>>>  #\n>>>> -# clang-format configuration file. Intended for clang-format >= 7.\n>>>> +# clang-format configuration file. Intended for clang-format >= 12.\n>>>>  #\n>>>>  # For more information, see:\n>>>>  #\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 36790BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 13:06:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A522360265;\n\tThu, 12 Aug 2021 15:06:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B665260264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 15:06:41 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 305BCEE;\n\tThu, 12 Aug 2021 15:06:41 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"d71CV4y4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628773601;\n\tbh=MbYP4aVLQzrpP21TZCXvDWNPNxytOAqMXRq4tqCZaUc=;\n\th=To:Cc:References:From:Subject:Date:In-Reply-To:From;\n\tb=d71CV4y4WdM5aaOh2AW3EYfkoQyKm/PqrTMfIu0EQafIncXOHzUvW2ZtEsaQtowxN\n\t+h708Y3MyHjJyvaT+21ES+UFmQp7mgv8if3ZuYoIQmrGMzpMUGp1E/juN49u+VWlw4\n\t4IJcXq2kGDcHb912Uk1aJWNfX3unBHyt7AigDWDk=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tpaul.elder@ideasonboard.com","References":"<20210812084501.2883780-1-kieran.bingham@ideasonboard.com>\n\t<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>\n\t<20210812100724.GA2167@pyrite.rasen.tech>\n\t<YRUQdBYhWBXQH5Qi@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<29c5e13c-415c-4205-a581-18d42dd44d99@ideasonboard.com>","Date":"Thu, 12 Aug 2021 14:06:38 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YRUQdBYhWBXQH5Qi@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18738,"web_url":"https://patchwork.libcamera.org/comment/18738/","msgid":"<YRUfJJRlKNCQNQ4y@pendragon.ideasonboard.com>","date":"2021-08-12T13:16:20","subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Thu, Aug 12, 2021 at 02:06:38PM +0100, Kieran Bingham wrote:\n> On 12/08/2021 13:13, Laurent Pinchart wrote:\n> > On Thu, Aug 12, 2021 at 07:07:24PM +0900, paul.elder@ideasonboard.com wrote:\n> >> On Thu, Aug 12, 2021 at 10:01:26AM +0100, David Plowman wrote:\n> >>> On Thu, 12 Aug 2021 at 09:45, Kieran Bingham wrote:\n> >>>>\n> >>>> The .clang-format file uses CaseSensitive on Regex rules for Include Categories.\n> >>>> Without this, it would not be possible to distinguish between QT headers which\n> >>>> commence with a 'Q' verses system headers including <queue>.\n> >>>>\n> >>>> While we have more wider support for libcamera to run and build on older\n> >>>> platforms, it should be safe to assume that developers who need to run\n> >>>> checkstyle can update their clang-format to a modern version.\n> >>>\n> >>> Do you know the magic runes to do this? The Pi repositories are stuck\n> >>> on version 9 currently, I believe.\n> >>\n> >> iirc the raspberry pi repos are compatible with regular debian repos? So\n> >> you add sid to the apt repos:\n> >>\n> >> /etc/apt/sources.list:\n> >> +deb https://deb.debian.org/debian/ sid main\n> >> +deb-src https://deb.debian.org/debian/ sid main\n> >>\n> >> And make sure that sid doesn't get used by default (I have it set to\n> >> bullseye) (make sure it doesn't conflict with other preferences settings\n> >> in /etc/apt/preferences.d/) (I think preferences.d is recommended but I\n> >> like all my preferences in one place):\n> >>\n> >> /etc/apt/preferences:\n> >> Package: *\n> >> Pin: release n=bullseye\n> >> Pin-Priority: 1100\n> >>\n> >> And then apt update, and apt install clang-format-12.\n> >> update-alternatives doesn't seem to pick it up so you might have to\n> >> relink it manually.\n> >>\n> >> Not sure if this is best practice for raspberry pi though :/ I'm also\n> >> not sure if this works alongside buster as I'm on bullseye, but it\n> >> doesn't look like clang-format-12 has any conflicting dependencies with\n> >> bullseye, so maybe it's fine on buster too.\n> >>\n> >>\n> >> This is why I'm pushing against this patch tbh... it's like saying \"it's\n> >> okay because Ubuntu 22.04 has it\". But it is a good change... idk what's\n> >> best.\n> \n> Well the distinction I was hoping to make in the commit message was that\n> this is a dependency for /developers/ not users or compilers of the project.\n> \n> It's only on those who create patches, and run checkstyle, who, as we\n> already recommend installing the latest or later Doxygen, and Meson, I\n> thought this would be the same category.\n> \n> But it seems some distributions are harder to update.\n> \n> \n> So this issue affects:\n> \n>  - Developers only who run checkstyle.py\n\nThat should be all developers :-) Anything that makes checkstyle.py more\ndifficult to use is a bad regression I think.\n\n>  - On a patch which modifies headers containing either <queue> or a\n>    <Qt*>  header\n> \n> git grep -l \"<queue>\"\n> src/gstreamer/gstlibcamerasrc.cpp\n> src/ipa/rkisp1/rkisp1.cpp\n> src/libcamera/pipeline/ipu3/cio2.h\n> src/libcamera/pipeline/ipu3/frames.h\n> src/libcamera/pipeline/ipu3/ipu3.cpp\n> src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> src/libcamera/pipeline/simple/simple.cpp\n> \n> \n> If I drop the CaseSensitive: true then these files may ... very rarely\n> most likely ... show up with a change in check style trying to move <queue>.\n> \n> But as it's a one off... and when we get wider support for clang-format\n> 12, then we can re-introduce it to stop the false move by clang.\n> \n> The alternative (removing the QT header match) would result in larger\n> risk of false moves by checkstyle I believe, but even those would be\n> limited to changes made to QCam, which isn't receiving a high churn.\n\nCan we condition the headers sorting rules on the clang-format version,\ndisabling them with clang-format < 12 ?\n\n> > A hard dependency on clang-format >= 12 seems to harsh to me. Can we\n> > make it optional ? One option would be to have multiple configuration\n> > files, or to pass additional options to clang-format on the command line\n> > from checkstyle.py.\n> \n> Two files could work, though at the moment it's a single line diff\n> between the two. I don't think command line arguments can help currently\n> (other than specifying a clang-format version specific config file.)\n\nThere's a --style argument that accepts individual style rules, but I\ndon't know if it's applied on top of .clang-format or replaces it (it\nseems to be the latter). It also appears that there's no command line\noption to specify a custom style file, which is very annoying. We could\ncreate symlinks on demand, or use another workaround.\n\n> >>>> clang-format-12 is supported in Ubuntu 20.04 in the updates category,\n> >>>> and in Debian sid. More recent versions of Ubuntu ship with\n> >>>> clang-format-12 or later by default, and other distributions may of\n> >>>> course vary further.\n> >>>>\n> >>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >>>> ---\n> >>>>  .clang-format | 2 +-\n> >>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n> >>>>\n> >>>> diff --git a/.clang-format b/.clang-format\n> >>>> index ff60b928affc..df1421fe94a8 100644\n> >>>> --- a/.clang-format\n> >>>> +++ b/.clang-format\n> >>>> @@ -1,6 +1,6 @@\n> >>>>  # SPDX-License-Identifier: GPL-2.0-only\n> >>>>  #\n> >>>> -# clang-format configuration file. Intended for clang-format >= 7.\n> >>>> +# clang-format configuration file. Intended for clang-format >= 12.\n> >>>>  #\n> >>>>  # For more information, see:\n> >>>>  #","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B6064C3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Aug 2021 13:16:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1B3256884F;\n\tThu, 12 Aug 2021 15:16:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 13AF360264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Aug 2021 15:16:27 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 50868EE;\n\tThu, 12 Aug 2021 15:16:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"v+2ISkbU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1628774184;\n\tbh=e5i/ryzTNIwBB7HwGZY4R2kmZ3A8rxv4pVLTNr1TNNw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=v+2ISkbUizEOgnTPNeYFu9vLDtm0UBgXBLbmO87jsHUAfk57ROssQlEi0fHqKsE/k\n\trw6yhKiiKXRw+0BaLytsIjiDmtlLUIpEUHUoRd7vaGNElO7n+9ujoNq579+z1a9jdt\n\tJYpcOLFtutG9bgcmTecmfZVCDQefJx5J9zXpJEZ8=","Date":"Thu, 12 Aug 2021 16:16:20 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YRUfJJRlKNCQNQ4y@pendragon.ideasonboard.com>","References":"<20210812084501.2883780-1-kieran.bingham@ideasonboard.com>\n\t<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>\n\t<20210812100724.GA2167@pyrite.rasen.tech>\n\t<YRUQdBYhWBXQH5Qi@pendragon.ideasonboard.com>\n\t<29c5e13c-415c-4205-a581-18d42dd44d99@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<29c5e13c-415c-4205-a581-18d42dd44d99@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18847,"web_url":"https://patchwork.libcamera.org/comment/18847/","msgid":"<e3ea90d1-eb08-a833-e8f0-d2b34f2f65dd@ideasonboard.com>","date":"2021-08-16T14:30:33","subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 12/08/2021 14:16, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> On Thu, Aug 12, 2021 at 02:06:38PM +0100, Kieran Bingham wrote:\n>> On 12/08/2021 13:13, Laurent Pinchart wrote:\n>>> On Thu, Aug 12, 2021 at 07:07:24PM +0900, paul.elder@ideasonboard.com wrote:\n>>>> On Thu, Aug 12, 2021 at 10:01:26AM +0100, David Plowman wrote:\n>>>>> On Thu, 12 Aug 2021 at 09:45, Kieran Bingham wrote:\n>>>>>>\n>>>>>> The .clang-format file uses CaseSensitive on Regex rules for Include Categories.\n>>>>>> Without this, it would not be possible to distinguish between QT headers which\n>>>>>> commence with a 'Q' verses system headers including <queue>.\n>>>>>>\n>>>>>> While we have more wider support for libcamera to run and build on older\n>>>>>> platforms, it should be safe to assume that developers who need to run\n>>>>>> checkstyle can update their clang-format to a modern version.\n>>>>>\n>>>>> Do you know the magic runes to do this? The Pi repositories are stuck\n>>>>> on version 9 currently, I believe.\n>>>>\n>>>> iirc the raspberry pi repos are compatible with regular debian repos? So\n>>>> you add sid to the apt repos:\n>>>>\n>>>> /etc/apt/sources.list:\n>>>> +deb https://deb.debian.org/debian/ sid main\n>>>> +deb-src https://deb.debian.org/debian/ sid main\n>>>>\n>>>> And make sure that sid doesn't get used by default (I have it set to\n>>>> bullseye) (make sure it doesn't conflict with other preferences settings\n>>>> in /etc/apt/preferences.d/) (I think preferences.d is recommended but I\n>>>> like all my preferences in one place):\n>>>>\n>>>> /etc/apt/preferences:\n>>>> Package: *\n>>>> Pin: release n=bullseye\n>>>> Pin-Priority: 1100\n>>>>\n>>>> And then apt update, and apt install clang-format-12.\n>>>> update-alternatives doesn't seem to pick it up so you might have to\n>>>> relink it manually.\n>>>>\n>>>> Not sure if this is best practice for raspberry pi though :/ I'm also\n>>>> not sure if this works alongside buster as I'm on bullseye, but it\n>>>> doesn't look like clang-format-12 has any conflicting dependencies with\n>>>> bullseye, so maybe it's fine on buster too.\n>>>>\n>>>>\n>>>> This is why I'm pushing against this patch tbh... it's like saying \"it's\n>>>> okay because Ubuntu 22.04 has it\". But it is a good change... idk what's\n>>>> best.\n>>\n>> Well the distinction I was hoping to make in the commit message was that\n>> this is a dependency for /developers/ not users or compilers of the project.\n>>\n>> It's only on those who create patches, and run checkstyle, who, as we\n>> already recommend installing the latest or later Doxygen, and Meson, I\n>> thought this would be the same category.\n>>\n>> But it seems some distributions are harder to update.\n>>\n>>\n>> So this issue affects:\n>>\n>>  - Developers only who run checkstyle.py\n> \n> That should be all developers :-) Anything that makes checkstyle.py more\n> difficult to use is a bad regression I think.\n\nAgreed.\n\n\n>>  - On a patch which modifies headers containing either <queue> or a\n>>    <Qt*>  header\n>>\n>> git grep -l \"<queue>\"\n>> src/gstreamer/gstlibcamerasrc.cpp\n>> src/ipa/rkisp1/rkisp1.cpp\n>> src/libcamera/pipeline/ipu3/cio2.h\n>> src/libcamera/pipeline/ipu3/frames.h\n>> src/libcamera/pipeline/ipu3/ipu3.cpp\n>> src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> src/libcamera/pipeline/raspberrypi/rpi_stream.h\n>> src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>> src/libcamera/pipeline/simple/simple.cpp\n>>\n>>\n>> If I drop the CaseSensitive: true then these files may ... very rarely\n>> most likely ... show up with a change in check style trying to move <queue>.\n>>\n>> But as it's a one off... and when we get wider support for clang-format\n>> 12, then we can re-introduce it to stop the false move by clang.\n>>\n>> The alternative (removing the QT header match) would result in larger\n>> risk of false moves by checkstyle I believe, but even those would be\n>> limited to changes made to QCam, which isn't receiving a high churn.\n> \n> Can we condition the headers sorting rules on the clang-format version,\n> disabling them with clang-format < 12 ?\n\nI tried using cpp as a preprocesor, but it's not happy - there are too\nmany issues to abuse cpp as a generic preprocessor with this file.\n\nAnnoyingly, it does 'work' but it generates lots of warnings and errors\ndue to # comments being treated as preprocessor directives and not\nparsed correctly.\n\nI've got an RFC to post that will let us keep multiple versions of the\n.clang-format file as .clang-format-7, .clang-format-12, and the\ncheckstyle will symlink the latest supported version.\n\nNot sure if I'm entirely fond of that either yet ... buy hence an RFC.\n\n\n>>> A hard dependency on clang-format >= 12 seems to harsh to me. Can we\n>>> make it optional ? One option would be to have multiple configuration\n>>> files, or to pass additional options to clang-format on the command line\n>>> from checkstyle.py.\n>>\n>> Two files could work, though at the moment it's a single line diff\n>> between the two. I don't think command line arguments can help currently\n>> (other than specifying a clang-format version specific config file.)\n> \n> There's a --style argument that accepts individual style rules, but I\n> don't know if it's applied on top of .clang-format or replaces it (it\n> seems to be the latter). It also appears that there's no command line\n> option to specify a custom style file, which is very annoying. We could\n> create symlinks on demand, or use another workaround.\n\nEssentially that's what I've implemented so lets see how that goes.\n\n\n>>>>>> clang-format-12 is supported in Ubuntu 20.04 in the updates category,\n>>>>>> and in Debian sid. More recent versions of Ubuntu ship with\n>>>>>> clang-format-12 or later by default, and other distributions may of\n>>>>>> course vary further.\n>>>>>>\n>>>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>>>> ---\n>>>>>>  .clang-format | 2 +-\n>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>>>>>\n>>>>>> diff --git a/.clang-format b/.clang-format\n>>>>>> index ff60b928affc..df1421fe94a8 100644\n>>>>>> --- a/.clang-format\n>>>>>> +++ b/.clang-format\n>>>>>> @@ -1,6 +1,6 @@\n>>>>>>  # SPDX-License-Identifier: GPL-2.0-only\n>>>>>>  #\n>>>>>> -# clang-format configuration file. Intended for clang-format >= 7.\n>>>>>> +# clang-format configuration file. Intended for clang-format >= 12.\n>>>>>>  #\n>>>>>>  # For more information, see:\n>>>>>>  #\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 243BFBD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Aug 2021 14:30:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7771D68894;\n\tMon, 16 Aug 2021 16:30:37 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 96CD268891\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Aug 2021 16:30:36 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E7CE03E5;\n\tMon, 16 Aug 2021 16:30:35 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"VYAM5E8R\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629124236;\n\tbh=6+i03DHXI78IGkPNh+LTUjO6K+rfFPMWKPN+dlLIbJM=;\n\th=From:To:Cc:References:Subject:Date:In-Reply-To:From;\n\tb=VYAM5E8RNzSuXOAzRpBqtGgqj0QKGPEzl/6YE1oT4CmRhyXj+Ey1T+OdZ5SAV3uVk\n\tjy8TY7uGSS77xx0vwDJf0v098PhIDRPKVbCzypk2ZhUTo09a1ieGKSqPZad8YvT6Or\n\tr/FDjR/9qxritoGQKtF+d5CPH6FJLs7cPovsBo+I=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210812084501.2883780-1-kieran.bingham@ideasonboard.com>\n\t<CAHW6GY+gFtqBG41hidQMWLG5-njXxz6Xt88ET_qYcW8B+tYhCw@mail.gmail.com>\n\t<20210812100724.GA2167@pyrite.rasen.tech>\n\t<YRUQdBYhWBXQH5Qi@pendragon.ideasonboard.com>\n\t<29c5e13c-415c-4205-a581-18d42dd44d99@ideasonboard.com>\n\t<YRUfJJRlKNCQNQ4y@pendragon.ideasonboard.com>","Message-ID":"<e3ea90d1-eb08-a833-e8f0-d2b34f2f65dd@ideasonboard.com>","Date":"Mon, 16 Aug 2021 15:30:33 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YRUfJJRlKNCQNQ4y@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] clang-format: Bump minimum version\n\trequirements","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]