From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 08 Dec 2022 14:46:58 +0100 Message-ID: <87wn72ovn1.fsf@gmx.de> References: <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> <87o7sl6awm.fsf@gmx.de> <87h6y7uioy.fsf@dfreeman.email> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2758"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Felician Nemeth , 58790@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas To: Danny Freeman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 14:48:21 2022 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 1p3HG8-0000UO-FS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 14:48:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3HFs-00011V-NV; Thu, 08 Dec 2022 08:48:04 -0500 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 1p3HFq-00010r-LK for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 08:48:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3HFq-0002OW-Am for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 08:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3HFp-0003Ai-St for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 08:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2022 13:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58790 X-GNU-PR-Package: emacs Original-Received: via spool by 58790-submit@debbugs.gnu.org id=B58790.167050722812182 (code B ref 58790); Thu, 08 Dec 2022 13:48:01 +0000 Original-Received: (at 58790) by debbugs.gnu.org; 8 Dec 2022 13:47:08 +0000 Original-Received: from localhost ([127.0.0.1]:56881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3HEy-0003AQ-5y for submit@debbugs.gnu.org; Thu, 08 Dec 2022 08:47:08 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:45501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3HEx-0003A7-0J for 58790@debbugs.gnu.org; Thu, 08 Dec 2022 08:47:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1670507220; bh=iBODjCyFVIe0ksdVysloTvOLyiuknW5kJy2h3+eBMDE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=SymsaNLlVIkhyfnewWVVzvU0Q367kZmylHbPlwyHVzTqXok1aFwkClY2I5KFpIEYD TCHay+exj6bfylGH+RgZp6rPmJ5z1/DRAAv1BETO9JJd2kVwdmBjyR2djhXB0SL2hL zwYvSbw2uDDIebRgd2AhWMgngmdmGXR6xSby4F/BsbxPu0ukiYszdA5n76I0V1O6za hvGLhx/Ov8b2B4XEUxxvWadsVFCHudarpfmg1KgOGjpy9pcg2+DitiUhMhy3aAemxz tkBP5gL9PXPYENiLqed26DVY0R7gDtSSlYEhYWdbIvynuUTMbdFvV/dQbZTEG3ReNI ULo5fkl9quGsw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.11]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M7Jza-1p2BqB48fk-007mAZ; Thu, 08 Dec 2022 14:47:00 +0100 In-Reply-To: <87h6y7uioy.fsf@dfreeman.email> (Danny Freeman's message of "Wed, 07 Dec 2022 13:56:37 -0500") X-Provags-ID: V03:K1:xI66W/6j9gkW6Yu0DE35Hkx8c8efcgkX5+cHjC4Y5qBia57bJOk 2wOHj+XqpJ4qIeZPBO33FnmKn5nSCbThca8MPvasjbGSrShLg1txMQx12dcSat49TxGS4+2 jUxfiPU46Zb1kk3LUds4qQcCLUumlPVmqAQ35H82ZAjFFmPGy/kavZ9xNl5qjQKo33Ln0Ge u6/T0G6oMuJU4EXs/X6vg== UI-OutboundReport: notjunk:1;M01:P0:TmWEszRb1x8=;puv5xG/0EoupcAz/lUHltnhePHM oyFwDeHgAO+ojLbi/GIs9gfDQcaiE90Q0541JNXnNg+7dxb8Yvf6HHJXN9ugVG3NOJMr1k+bE Hal2u37hs0Afj0GiU4Qe9e2dQqi/LSvlLtGXH7dDgxawsITes1oYk/j6qd3f+7wThOozViXKo MF+Hf7BxGeViQGRLJn+W3ggnDy+DKbgpMm2NHqClmF3t5FMs4wNgbSNPpUYmKzIvEAWZESS91 +G91ultba1Ce6rEJCUap2A+BZ6AbM1X97ZP5WuuMal4trw8s8dWK/3Z9cyNFUvBdfPXSQkkLV lYJahhbKIiFtQ+OJgXqFsSbliVLc3Ws8RbUItWGMcZvUCC7pUm+96EZXSWrFj7Y41dSan1Xt9 yElb9/gy37hKYgrYR1X2NaIayketnHXhDAAOhY7bk5528gwTvhTMTGA9dcJZrIuu8K/6VqU/z 0VSG3Fy2Ip/yp2NILHjl8cnlqJ/tEsg/UwIWj453Jv5r+C1GSy4L+7WRnyXSCpAgJhnduls6q vYtX8EGjUIAf7lQBPruL2+SEznZlj0v0CZCOcInl/6+L++es9cMfDHfuxwsEVDNWdqgqrh5+s +cVOLSbehhVs9qXXV3umN64YaA0i+73+hP5E7EZUfLBRsYwlNV39eVwMqAki2Ihq9PmdIIWVF ldt0epLJ/suFDE6fcLHl81m5T+j8oPx1rhiQ/vXsEAPebQACFxwk/uYqc9nMDVzdlN6lta1Sa VHBwiZPGSfsfNsbi6xFT59SK3vX5+ZccCs04Ddh8I5ZtWnZ22h1299rBSZEluzmSb5IBGHm6 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:250285 Archived-At: Danny Freeman writes: Hi Danny, >> Well, running the test together with your package looks fine. What I >> don't understand is the following sequence: >> >> [client-request] (id:6) Fri Dec 2 17:04:01 2022: >> (:jsonrpc "2.0" :id 6 :method "textDocument/definition" :params >> (:textDocument >> (:uri "file:///usr/local/src/eglot-xref-to-jar-repo/src/user.clj") >> :position >> (:line 3 :character 3))) >> [server-reply] (id:6) Fri Dec 2 17:04:01 2022: >> (:jsonrpc "2.0" :id 6 :result >> (:uri "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj" :range >> (:start >> (:line 923 :character 6) >> :end >> (:line 923 :character 9)))) >> >> That means, that the client (my local Emacs) has asked for >> "textDocument/definition" on the file user.clj, as indicated by your >> recipe. The remote server has returned as answer, that this definition is in >> "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This >> file must be located on the server, because the server cannot know >> anything about my local configuration, right? > > The server should be running on your machine locally, and have access to > everything Emacs does. It knows the location of that jar because it uses > the clojure build tool to create a classpath for the project, which > contains the full location of the clojure-1.10.3.jar file. ??? I'm speaking about a clojure file which is located on a remote machine, accessed via Tramp. I thought that Eglot uses an LSP server on that remote machine then. > From what the clojure-lsp maintainers tell me, it will not run on a > remote machine and be able to work with a project on your local machine. > I'm not sure what it would return for a definition if it was able to run > on a remote machine. The LSP server shouldn't care. It returns a local file name, like "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This is because the file is local from the server's pov. It is the client, Eglot, which must be able to access this file on the remote machine. A task for your jarchive file name handler, I believe. Or do I misunderstand the architecture? Best regards, Michael.