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#73500: eglot: diagnostic location not always shown Date: Sat, 28 Sep 2024 22:18:00 +0100 Message-ID: <87r093tr3r.fsf@gmail.com> References: <86wmiw58r1.fsf@gnu.org> <6654a127-fb75-4b8b-86d6-267b92567429@fbengineering.ch> 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="3896"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73500@debbugs.gnu.org, Eli Zaretskii To: Federico Beffa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 28 23:18:54 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 1sueq5-0000sF-Rr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 Sep 2024 23:18:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suepo-0004kP-4i; Sat, 28 Sep 2024 17:18:36 -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 1suepl-0004jy-7S for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2024 17:18:33 -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 1suepk-0007uQ-Ur for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2024 17:18:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=aCwbJwLqLKixacYS0tU5Z2npWf/gsuH9PthfijMUnCg=; b=BIKHEwESAmlkz8xq22oCmgWZUOmg+m3/Xfb1UGnLc0a6wd6F2FVjX7CJHeG/g+5cU0s4EO3vPBfA6XnTke6lVHyo3FS9xdOydcuzq7n+RtyIEQZh/VUJNAvk90IGkXYSvR6JJvsfDpuxNzSJI5n4wr2pj4lqIy7Hw586roC19+gYVRZEjOzmYE0Dp4CluKijtQLOUE5p8+dDADYni4ixJYKHjZC2T5OJygs3/xqP6IOffjwAkx3NiLZ1nM86re/H+w4Wbm8zBMC9XLX2vFHwWEr9+Hho6Jz463aYt3lqgxBic4bNTq4lNThnZ6bIOtNO7x9tbesODv8b8aarQlx6Kg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sueqE-0007dg-9t for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2024 17:19:02 -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: Sat, 28 Sep 2024 21:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73500 X-GNU-PR-Package: emacs Original-Received: via spool by 73500-submit@debbugs.gnu.org id=B73500.172755828529159 (code B ref 73500); Sat, 28 Sep 2024 21:19:02 +0000 Original-Received: (at 73500) by debbugs.gnu.org; 28 Sep 2024 21:18:05 +0000 Original-Received: from localhost ([127.0.0.1]:46550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suepI-0007aB-BU for submit@debbugs.gnu.org; Sat, 28 Sep 2024 17:18:04 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:50315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suepF-0007ZR-HI for 73500@debbugs.gnu.org; Sat, 28 Sep 2024 17:18:03 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-37cd831ab06so926996f8f.0 for <73500@debbugs.gnu.org>; Sat, 28 Sep 2024 14:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727558184; x=1728162984; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aCwbJwLqLKixacYS0tU5Z2npWf/gsuH9PthfijMUnCg=; b=SzicOu6zkgbiLrSqVarbH6hFdWu5rLOB2mx4CzsC9hdQZr2o/IIUm9Tf8tQs3YMDFF N6kHMw7ZnedH5XpYWJgh+XPnMOWnGCaVz1u8egQjB93fNUyvqj8BRB/i1j/oeMaqHJSj KoNEaOnDOGtzve8NxUF8YehItdtOaKtgrSryTPJJ5jlRT/m3Y0WZkG1k8jjSJ94NbD7S TddxOh8AsoIMQO25HJ8r3ANe/DJ0/w9IML8NIhcpIJ5asTsFSf6KhZzQMXpLG5PcXI3e f8sRQafJS6ne55scwav9e2Zd63sWuvJhlBiDrFbNB6QjpInFB0iU2lMC6Jnc8VimUg2v ml6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727558184; x=1728162984; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aCwbJwLqLKixacYS0tU5Z2npWf/gsuH9PthfijMUnCg=; b=gLLZBPxXcqsi8tb83BhVddG8AGdkNtNj4C23on2P/CJyvM5OeP9jVbeC5icM9Kd88+ xubuxdKHuN+vb81A1v/G1vLvaVuS1qTL06992DYAYNsrAMFWzdTMvomB2i7Cbke6nLsW /IEn8vTeWt4OFtTavjHXNCY9xQg3JsOYfK1cfh5I6pLJec0hnnKMYeIjKicHMd4LXRdY vZhw4RVNnl93jTLRfVoYbFlQ47LZcvLYBQtnX2l+p4UXuxR6FkpclgM60RslPMsWgLr2 XOMhy9nunanXNSq22jvcNpz77plBTCHQylu0MdxZtfadepog7i6x2KM4ZpIseWUiCf+j Ebbg== X-Forwarded-Encrypted: i=1; AJvYcCV15LSmsLDIztayuD5VEaIno/ffVTB4de7BjlrzN+P5wboe1Pps4mf3JZ33x9Gt7ZHOcVi6hw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YylJqp2GNN9fevQXZ/pptn/NTKq/8mBfOMX4V53D7hYO3QhmQxS vyebZLU1YBLoLlcAYVtEP66+LxDEMgSJo6slamJjpbK6wjp0Ml+dzCOXUw== X-Google-Smtp-Source: AGHT+IGISXuOfMmhHOKXbdIIk4QotbA7zIOU1xGaiQSNRrdXsjZSwuu1wd9OPXZK/0zInh7WEm7UCw== X-Received: by 2002:a5d:62c4:0:b0:374:bcff:cfa6 with SMTP id ffacd0b85a97d-37cd5aa9b05mr3087972f8f.18.1727558183936; Sat, 28 Sep 2024 14:16:23 -0700 (PDT) Original-Received: from krug ([87.196.73.214]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e969ffc56sm109766385e9.22.2024.09.28.14.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 14:16:23 -0700 (PDT) In-Reply-To: <6654a127-fb75-4b8b-86d6-267b92567429@fbengineering.ch> (Federico Beffa's message of "Sat, 28 Sep 2024 17:23:30 +0200") 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:292605 Archived-At: On Sat, Sep 28, 2024 at 4:23=E2=80=AFPM Federico Beffa wrote: > > The attached archive includes everything mentioned at the indicated > link. See the included `README.md` file for instructions on how to > reproduce the bug (minimally). Thanks. > assume you have running test benches with everything. You assume wrong. Eglot supports hundreds of servers. I only have the servers I work or worked with in the past. "Supports foo server " means solely that someone knowledgeable with foo tried it and reported good results at some point, so they requested to add a server invocation to eglot-server-programs. Anyway, I couldn't reproduce your problem simply because the Main.hs program you provided does not seem to produce any diagnostics, according the haskell-language-server I installed in my system, which identifies itself as haskell-language-server version: 1.9.1.0 (GHC: 9.2.8) (PATH: /usr/bin/haske= ll-language-server) I'm not a Haskell programmer, so I don't know if this makes sense to you. In the events log, the publishDiagonstics message is the following: [jsonrpc] e[22:01:33.466] <-- textDocument/publishDiagnostics { "jsonrpc": "2.0", "method": "textDocument/publishDiagnostics", "params": { "diagnostics": [], "uri": "file:///home/capitaomorte/Downloads/bug73500/src/Main.hs", "version": 2 } } Notice the empty JSON array. However, when I change your Main.hs to what is likely a nonsensical Haskell program: module Main where =20=20=20=20=20 isAscending :: [Int] -> Bool isAscending [] =3D True isAscending [x] =3D x -- ^ this second 'x' _is_ underlined isAscending (x : y : ys) =3D x < y && isAscending (y : ys) =20=20=20=20=20 main :: IO () main =3D putStrLn "Hello, bug 73500!" Then I see the second x being underlined with a 1-char-long diagnostic, the corresponding LSP event being: [jsonrpc] e[22:05:21.403] <-- textDocument/publishDiagnostics { "jsonrpc": "2.0", "method": "textDocument/publishDiagnostics", "params": { "diagnostics": [ { "code": "-Wdeferred-type-errors", "message": "=E2=80=A2 Couldn't match expected type =E2=80=98Bool=E2= =80=99 with actual type =E2=80=98Int=E2=80=99\n=E2=80=A2 In the expression:= x\n In an equation for =E2=80=98isAscending=E2=80=99: isAscending [x] =3D= x", "range": { "end": { "character": 19, "line": 4 }, "start": { "character": 18, "line": 4 } }, "severity": 1, "source": "typecheck" } ], "uri": "file:///home/capitaomorte/Downloads/bug73500/src/Main.hs", "version": 25 } } I have now removed haskell-language-server from my machine. Jo=C3=A3o