From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: A note about clang-format Date: Tue, 22 Aug 2023 21:13:58 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006069c2060388a324" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39992"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Corwin Brust , emacs-devel To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 22 22:15:12 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qYXmQ-000A9D-Bx for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Aug 2023 22:15:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYXlb-0003YT-5G; Tue, 22 Aug 2023 16:14:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYXlZ-0003YK-DB for emacs-devel@gnu.org; Tue, 22 Aug 2023 16:14:17 -0400 Original-Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYXlW-0000vW-Jz for emacs-devel@gnu.org; Tue, 22 Aug 2023 16:14:17 -0400 Original-Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2bcda0aaf47so1561611fa.1 for ; Tue, 22 Aug 2023 13:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692735252; x=1693340052; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WqHbYZ3q0RvIiP2dUh5WW1GA212eV+GhlEHDQuVusdU=; b=sdJP59joavGX4ygyLWS299tyeQA5zSuZZnzr5eWxVeurJ6J7CJhH5WiYWZpNcysI9w s06HeJVlxuoKMKnVMLSY/R/I/mJCReVFERYhNWFFafFuE3VKilTB2fvWjPfLdOSDbqvQ mxq6dy898//nohxhR9qEliL2vPtzqemR4142Mpgv8XH2VxuPm4SK9GbIR9LTTu065x0Y ZJaZEkE9GRaAP6mMvgP9yQjYFFPieRNiuX6Ra74BhLKgjd8k4fjxJCjfIgGFzXpwmq1D cOvo9lhUrbrtWrU2h48EiKE6RBmrUFbZIG2aNlrMVOIWnRn7+OPEvEYSvmb4uhbJ8Qox fH2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692735252; x=1693340052; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WqHbYZ3q0RvIiP2dUh5WW1GA212eV+GhlEHDQuVusdU=; b=d6b+ETQfBhYZdxCbd9/A5TbQYkgJvNyTOlq8I4Zp2yYhjstzixak1GmhZ6BPNfx7XW gsDHzDuaE163WgYWLvEJQGcGbtcQQwD/pV6SSdWFu6yUKdbYasHnq0iMIVkf/pmbR5kK v7jVrc/BmKwPrCb7V8cNpCpnoqZDMIeQpgBjuiFw24ldqfHYcyVq/1rldiyOdFSnAaqw b5nDDSqlOHn8yjiJhKNoiza4/HjIFw9GofjHUOOVnmOWxRvgqWJPwboR5YNu4hCUrszm MZrkn0/k7KklefgyTXC36vtEyYyBcXbsILR1ViZGXVGnfm19T0pexW7eBS0GFqIzk45D p9WQ== X-Gm-Message-State: AOJu0YwdfjgD3gXsc01bGr47nDOxg5LZ5zFZIHcdEgK9Sbmex+STZm3y b7Xy/W6EvpS2drRKrkNhLAu94a7bbnxgbz45nb+0T2qP X-Google-Smtp-Source: AGHT+IG1Eb0loP7uJQ5Kdm0sJeLBJqzw/seTTK5NAov84GexkEJpSj1CADcZlrIh6Gd2T6nXU5NdaoTxfekaKfLZUYg= X-Received: by 2002:a2e:b5bc:0:b0:2bc:b63c:e823 with SMTP id f28-20020a2eb5bc000000b002bcb63ce823mr2895118ljn.22.1692735251702; Tue, 22 Aug 2023 13:14:11 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x229.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309115 Archived-At: --0000000000006069c2060388a324 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 22, 2023, 20:45 Gerd M=C3=B6llmann w= rote: > I think we (meaning you) should lobby Eli for compile_commands.json > > generation first :) > > I think that might not even be necessary because users can do that > easily, if they know how. See https://github.com/rizsotto/Bear, for > example, which is GPLv3. With it, do an initial full build with "bear > -- gmake" instead of just "gmake". > Yes, I've used 'bear' before (in fact I asked you, remember?). But -- great as it is -- it's still basically a hack which requires actually compiling the code to learn _how_ it would be compiled. That's not always practical, perhaps not even always possible depending on the toolchain to use. So it's a needless hindrance and, afair, not perfectly accurate (you had some non-trivial ad-hoc tweak script as I recall). I don't see a fundamental technical reason not to generate this simple file from our own configuration script, which is the source of truth for this information after all. In all Cmake projects I work with, it's a matter of setting a simple variable. I wonder if the automake world doesn't have something similar. If it doesn't, how hard can it be to add one? We should lower that bar so that every Emacs C hacker (including Eli and other long timers) can benefit from LSP (with Eglot, of course ;) ). This will be beneficial to Emacs C code and to Eglot itself of course. And with that, it seems I have done all the lobbying myself :) Jo=C3=A3o > --0000000000006069c2060388a324 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Aug 22, 2023, 20:45 Gerd M=C3=B6llmann <gerd.= moellmann@gmail.com> wrote:

> I think we (meaning you) should lobby Eli for compile_commands.json > generation first :)

I think that might not even be necessary because users can do that
easily, if they know how.=C2=A0 See https://gi= thub.com/rizsotto/Bear, for
example, which is GPLv3.=C2=A0 With it, do an initial full build with "= ;bear
-- gmake" instead of just "gmake".

Yes, I&#= 39;ve used 'bear' before (in fact I asked you, remember?).

But -- great as it is -- it'= s still basically a hack which requires actually compiling the code to lear= n _how_ it would be compiled. That's not always practical, perhaps not = even always possible depending on the toolchain to use.

So it's a needless hindrance and, afair= , not perfectly accurate (you had some non-trivial ad-hoc tweak script as I= recall).

I don't se= e a fundamental technical reason not to generate this simple file from our = own configuration script, which is the source of truth for this information= after all.=C2=A0 In all Cmake projects I work with, it's a matter of s= etting a simple variable. I wonder if the automake world doesn't have s= omething similar. If it doesn't, how hard can it be to add one?

We should lower that bar so= that every Emacs C hacker (including Eli and other long timers) can benefi= t from LSP (with Eglot, of course ;) ). This will be beneficial to Emacs C = code and to Eglot itself of course.

And with that, it seems I have done all the lobbying myself= :)

Jo=C3=A3o