From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#70408: 30.0.50; Eglot and Project integration Date: Tue, 16 Apr 2024 14:51:10 +0100 Message-ID: References: <87o7aas3sk.fsf.ref@aol.com> <87o7aas3sk.fsf@aol.com> <86le5djzz2.fsf@gnu.org> <8cfba95b-fedd-4b5f-9778-d656601006d1@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23352"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70408@debbugs.gnu.org, Ergus To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 16 15:52:17 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rwjEP-0005s9-98 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Apr 2024 15:52:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwjE1-0001Dn-J3; Tue, 16 Apr 2024 09:51:53 -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 1rwjE0-0001Df-7W for bug-gnu-emacs@gnu.org; Tue, 16 Apr 2024 09:51:52 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwjDz-0001Hu-Up for bug-gnu-emacs@gnu.org; Tue, 16 Apr 2024 09:51:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rwjEB-0000cO-VM for bug-gnu-emacs@gnu.org; Tue, 16 Apr 2024 09:52:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Apr 2024 13:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70408 X-GNU-PR-Package: emacs Original-Received: via spool by 70408-submit@debbugs.gnu.org id=B70408.17132755072220 (code B ref 70408); Tue, 16 Apr 2024 13:52:03 +0000 Original-Received: (at 70408) by debbugs.gnu.org; 16 Apr 2024 13:51:47 +0000 Original-Received: from localhost ([127.0.0.1]:44072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwjDs-0000ZY-Pa for submit@debbugs.gnu.org; Tue, 16 Apr 2024 09:51:46 -0400 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:59783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwjDo-0000Xy-Mi for 70408@debbugs.gnu.org; Tue, 16 Apr 2024 09:51:43 -0400 Original-Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-516d0162fa1so5635742e87.3 for <70408@debbugs.gnu.org>; Tue, 16 Apr 2024 06:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713275482; x=1713880282; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zLb6Xy82cyIjUP3TNr/NshuXhLBuNLGnG9HbAWClir8=; b=EwD4XDdbQunHbyRxIttK1qaXBF3980ZOGeuR0Ryvi6a8MmpZuvdHDn3hCj3+CoE/In 3jQVOonb84NtKeJ4ELfrcyLMT2tFvILfBqzcc/WblL0GaTORDedjxzo7gMvQwILbd6WM gckUSDBQePiflNDmEpDf1cE7W6S7JKUupuK09AWs9r8/DkEsbwYyEq+MGGy8GsTEIDk/ dERFev0DNrypwz6V+I+EVyEfFbmBwSpLw1NstugrbWdDnu1Fz+VgYMcvFKPZjn28uIvU 0vih4tk+31GEJt8/XDAO/D6pLXgCPG4+jiImpFOjKiw1q8JTofk8gWR2q3GJYadiJJxe j7aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713275482; x=1713880282; h=content-transfer-encoding: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=zLb6Xy82cyIjUP3TNr/NshuXhLBuNLGnG9HbAWClir8=; b=CxKXyU1AwzaKYq/w2NgQEJ4u89V/z5ZJTZ97hOoalWjGYKZqmlRfHM2j6G/ocGwMK/ NuO+HLpx6WtpZu6fd2DBOQrV9n5Wdzj0uFFBnwarQQLPGPeaT5voeK8/wztAXvDmUOfg IG3H7vY11tZicW4qA9LI4gsFQWyo39fW567juG7bc620dDgyTHAgA/m9yuuVp7Kmk2ru y17CN/uAE+Z+j4CICcjF19Kxuri/VXXasTnccqECj30F0085tYsw8gEH7GzfoTNk6Pn2 3l1KaQculBJ2W+pE4+C1f4b+4b35eSESNuXEANp2mnKnENoJeM4LE5rL6ogjFXjjDNyz 7Kcg== X-Forwarded-Encrypted: i=1; AJvYcCW2lIA6/ZcPZ/8EOz2pNlpqpb3ZYZLvts03P+Hj3D8rgz3qHOb4rMJaD9BqUn5+LLB/U8jGLEB+dU8DZIRoMjgv8HlJF5A= X-Gm-Message-State: AOJu0YzLC5YAy6tEBevgnGf7Ab+pV6F4XuhEvT+SOP36skzd0IfGJqC5 SAwNdKBHi+cXOkCXeJuI3ujQ+O3+NgQsdXq0v79QXAjnXv9ERkyHF3T6QUiDDCQc5Y9xHwq31ut 1z/h7t/zv0MAyUPvetY5Hn8OFCAE= X-Google-Smtp-Source: AGHT+IEf6bUmtk4tqMIOTUt56gjUfphBB/bf+qlnF08h29t+GD85ZH03QQ8j7Ad8BhYkosBkiayziDR8wu/k/OkBIPQ= X-Received: by 2002:a05:6512:318d:b0:519:2e3d:205 with SMTP id i13-20020a056512318d00b005192e3d0205mr1200785lfe.69.1713275482029; Tue, 16 Apr 2024 06:51:22 -0700 (PDT) In-Reply-To: <8cfba95b-fedd-4b5f-9778-d656601006d1@gutov.dev> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283431 Archived-At: On Tue, Apr 16, 2024 at 1:56=E2=80=AFPM Dmitry Gutov wro= te: > IIUC Ergus's request is primarily about a situation where an > "out-of-tree" build is used. Meaning, the directory for build artefacts > is not a subdirectory of the project root, but -- apparently -- some > sibling directory of it (e.g. "../build"). So it's somewhat atypical, > although I suppose the solution from the link above might work with it to= o. Ah, I know about that. That's where compile-commands.json is generated by CMake. But using that './build' as the project root passed via LSP to clangd (and likely any other server) will most likely fail: that's not the project root and it doesn't have any versioned source files (only auto-generated ones). Because of this, C++ projects usually have sth like: ln -sf build/compile_commands.json compile_commands.json as a build step. Alternatively, you invoke clangd with `--compile-commands-dir=3Dbuild`. I don't think there's anything project.el or Eglot can do or should do about this case. > This bug is split off from an emacs-devel discussion, where I posted a > draft solution of mine: > https://lists.gnu.org/archive/html/emacs-devel/2024-04/msg00279.html > I'm curious for any feedback - like would that be good enough for this > and related cases, or maybe if someone has an even simpler approach in mi= nd. I'll pass, but wish you luck. I've stated in the past that I think project.el should allow subprojects inside larger projects, and let users of project-current (direct or indirect) specify if they're interesting in the innermost, outermost, or intermediate projects when searching for projects to act on, via a combination of prefix arguments, arguments, customized special variables or let-bound special variables. Jo=C3=A3o