Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess via Gdb <gdb@sourceware.org>
To: Simon Marchi <simark@simark.ca>,
	Joel Brobecker <brobecker@adacore.com>,
	Simon Marchi via Gdb <gdb@sourceware.org>
Cc: Mark Wielaard <mark@klomp.org>
Subject: Re: Any concrete plans after the GDB BoF?
Date: Sat, 11 Feb 2023 17:13:37 +0000	[thread overview]
Message-ID: <87mt5kunum.fsf@redhat.com> (raw)
In-Reply-To: <ca44e215-3100-7825-73a2-6d7bb911e479@simark.ca>

Simon Marchi via Gdb <gdb@sourceware.org> writes:

> On 10/31/22 09:37, Joel Brobecker via Gdb wrote:
>>> I agree with all you said.  There is always some resistance related to
>>> how clang-format handles this or that case.  In my opinion, that's minor
>>> compared to the benefit of using it.  My opinion would be: make the
>>> clang-format config that is closest to our style today, make a big
>>> re-format, and carry on.
>> 
>> I agree with that. As long as the formatting is consistent, it might
>> take a little getting used to, but I think we'll be happier if we don't
>> have to spend time worrying about code formatting.
>> 
>> The one small obstacle, perhaps, might be if different versions of
>> the tool format things differently. In that case, we might have to
>> clearly state which version we expect the code to be formatted with.
>> I am thinking of the kind of issues we get with the configury which
>> is generated by the auto tools, which is so dependent on the version
>> that even the distro-provided versions introduce spurious differences
>> sometimes, as a result of which I have built my own set of vanilla
>> autotools. If clang-format is tricky to build, we may have issues
>> in that respect...
>
> I would suggest mandating one version, and for that version to
> continuously be the latest stable version of clang-format, like we do
> for Black.  When a new version comes out, we don't have to wonder if /
> when we move the next version.  Someone just pushes a patch re-formating
> the code to the next version, if there are some differences.  It keeps
> the overhead to a minimum.

I dislike our policy of using the latest version of black, and would
argue that always using the latest version _increases_ the overhead,
rather than reducing it.

My thinking is this; not every one is using a distro that quickly
packages the latest version.  This means that if we are always chasing
the latest version, at least some people will end up continually having
to build clang-format on a regular basis just so they can push to GDB.

If I had a choice then, personally, I'd vote against using clang-format
at all, but it feels like there's a majority in favour, so if we do have
to go down this route, I'd rather we adopted the same policy as for
autotools and C++ versioning.  That is, pick something that works for
us, and commit to it over the medium term.  That way at least, I can
build a single version of clang-format and know that it's going to last
me for a while.

>
> So far I have never seen problems related to distro-specific patches, as
> we have seen with autoconf.
>
> For Debian/Ubuntu, it's easy to get the latest stable version through
> apt.llvm.org.  I don't really know about other distros.  In any case,
> it's easy to build and not long (not long like building the whole
> llvm/clang):
>
> $ git clone --depth 1 https://github.com/llvm/llvm-project.git --branch release/15.x
> $ mkdir -p llvm-project/build
> $ cd llvm-project/build
> $ cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm -DCMAKE_INSTALL_PREFIX=/tmp/llvm
> $ make -j 4 clang-format
> $ make install-clang-format
> $ /tmp/llvm/bin/clang-format --version
> clang-format version 15.0.4 (https://github.com/llvm/llvm-project.git 08bd84e8a6358eb412fcef279f8875e2d69a3374)

Could we build something like this into the GDB makefile maybe?  That
way folk don't need to go looking for this information.

Thanks,
Andrew


>
> Simon


  parent reply	other threads:[~2023-02-11 17:14 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27 10:47 Luis Machado via Gdb
2022-10-28 16:16 ` Simon Marchi via Gdb
2022-10-28 16:51   ` John Baldwin
2022-10-28 16:54     ` Simon Marchi via Gdb
2022-10-31  9:28   ` Luis Machado via Gdb
2022-10-31 13:17     ` Simon Marchi via Gdb
2022-10-31 13:37       ` Joel Brobecker via Gdb
2022-10-31 14:15         ` Simon Marchi via Gdb
2022-10-31 17:31           ` Joel Brobecker via Gdb
2023-02-11 17:13           ` Andrew Burgess via Gdb [this message]
2023-02-12 12:43             ` Mark Wielaard
2023-02-13 11:54               ` Andrew Burgess via Gdb
2023-02-13 12:52                 ` Luis Machado via Gdb
2023-02-13 14:24                   ` Tom Tromey
2023-02-13 14:42                     ` Luis Machado via Gdb
2023-02-13 15:13                   ` Andrew Burgess via Gdb
2023-02-13 15:23                     ` Luis Machado via Gdb
2023-02-14  5:48                       ` Joel Brobecker via Gdb
2023-02-15 14:47                         ` Andrew Burgess via Gdb
2023-02-16  4:14                           ` Joel Brobecker via Gdb
2023-02-16  9:51                           ` Mark Wielaard
2023-02-16 10:16                             ` Joel Brobecker via Gdb
2023-02-16 11:58                               ` Eli Zaretskii via Gdb
2023-02-16 13:31                                 ` Joel Brobecker via Gdb
2023-02-16 15:23                                   ` Eli Zaretskii via Gdb
2023-02-14 13:07                   ` Mark Wielaard
2023-02-14 14:23                   ` Pedro Alves
2023-02-14 13:00                 ` Mark Wielaard
2023-02-15 14:36                   ` Andrew Burgess via Gdb
2023-02-13 14:05             ` Tom Tromey
2022-12-15 10:17     ` Luis Machado via Gdb
2023-01-01 22:02     ` Mark Wielaard
2023-01-20 17:30       ` Tom Tromey
2023-01-20 20:30         ` Tom Tromey
2023-01-27 15:50           ` Lancelot SIX via Gdb
2023-01-27 23:50             ` Tom Tromey
2023-01-30 17:43               ` Lancelot SIX via Gdb
2023-01-30 18:46                 ` Mark Wielaard
2023-01-30 21:08                   ` Tom Tromey
2023-02-04 11:36                     ` Mark Wielaard
2023-01-31 10:00                   ` Lancelot SIX via Gdb
2022-12-13  2:48 ` Frank Ch. Eigler via Gdb
2023-02-16  8:53 anix via Gdb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mt5kunum.fsf@redhat.com \
    --to=gdb@sourceware.org \
    --cc=aburgess@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=mark@klomp.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox