all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 49ef173b028: Make publishDiagnostics faster by using cached variable
       [not found] ` <20240419202150.E4536C1FB59@vcs2.savannah.gnu.org>
@ 2024-04-22 14:30   ` Michael Albinus
  2024-04-22 14:42     ` João Távora
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2024-04-22 14:30 UTC (permalink / raw)
  To: emacs-devel; +Cc: Theodor Thornhill, João Távora

Theodor Thornhill via Mailing list for Emacs changes
<emacs-diffs@gnu.org> writes:

>     * test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Add
>     regression test for symlink behavior

This test fails on EMBA. Since there is clangd 11, perhaps a version
check is needed like in other tests?

--8<---------------cut here---------------start------------->8---
[eglot-tests] [eglot-test-basic-symlink]: test start
[eglot] Connected! Server `clangd' now managing `(c++-mode c-mode c-ts-mode c++-ts-mode objc-mode)' buffers in project `symlink-project'.
/tmp/eglot--fixture-rsZULn/symlink-project/mainlink.cpp and /tmp/eglot--fixture-rsZULn/symlink-project/main.cpp are the same file
[eglot-tests] [eglot-test-basic-symlink]: FAILED
[eglot] Asking EGLOT (symlink-project/(c++-mode c-mode c-ts-mode c++-ts-mode objc-mode)) politely to terminate
[jsonrpc] Server exited with status 9
[eglot-tests] contents of ` *EGLOT (symlink-project/(c++-mode c-mode c-ts-mode c++-ts-mode objc-mode)) output*':
[eglot-tests] contents of ` *EGLOT (symlink-project/(c++-mode c-mode c-ts-mode c++-ts-mode objc-mode)) stderr*':
I[13:39:34.933] Debian clangd version 11.0.1-2
I[13:39:34.934] PID: 75887
I[13:39:34.934] Working directory: /tmp/eglot--fixture-rsZULn/symlink-project
I[13:39:34.934] argv[0]: /usr/bin/clangd
I[13:39:34.934] Starting LSP over stdin/stdout
I[13:39:34.936] <-- initialize(1)
I[13:39:34.937] --> reply:initialize(1) 0 ms
I[13:39:34.943] <-- initialized
I[13:39:34.943] <-- textDocument/didOpen
I[13:39:34.944] <-- workspace/didChangeConfiguration
I[13:39:34.949] Failed to find compilation database for /tmp/eglot--fixture-rsZULn/symlink-project/main.cpp
I[13:39:34.949] ASTWorker building file /tmp/eglot--fixture-rsZULn/symlink-project/main.cpp version 0 with command clangd fallback
[/tmp/eglot--fixture-rsZULn/symlink-project]
/usr/bin/clang /tmp/eglot--fixture-rsZULn/symlink-project/main.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-11/lib/clang/11.0.1
I[13:39:34.953] <-- textDocument/didOpen
I[13:39:34.957] <-- textDocument/references(2)
I[13:39:34.963] Failed to find compilation database for /tmp/eglot--fixture-rsZULn/symlink-project/foo.h
I[13:39:34.963] ASTWorker building file /tmp/eglot--fixture-rsZULn/symlink-project/foo.h version 0 with command clangd fallback
[/tmp/eglot--fixture-rsZULn/symlink-project]
/usr/bin/clang -xobjective-c++-header /tmp/eglot--fixture-rsZULn/symlink-project/foo.h -fsyntax-only -resource-dir=/usr/lib/llvm-11/lib/clang/11.0.1
I[13:39:35.020] --> textDocument/publishDiagnostics
I[13:39:35.021] --> reply:textDocument/references(2) 64 ms
I[13:39:35.028] --> textDocument/publishDiagnostics
I[13:39:35.030] <-- shutdown(3)
I[13:39:35.030] --> reply:shutdown(3) 0 ms
I[13:39:35.031] <-- exit
I[13:39:35.031] LSP finished, exiting with status 0
Process EGLOT (symlink-project/(c++-mode c-mode c-ts-mode c++-ts-mode objc-mode)) stderr finished
[eglot-tests] contents of `*EGLOT (symlink-project/(c++-mode c-mode c-ts-mode c++-ts-mode objc-mode)) events*':
[jsonrpc] D[13:39:34.883] Running language server: /usr/bin/clangd
[jsonrpc] e[13:39:34.885] --> initialize[1] {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":75592,"clientInfo":{"name":"Eglot","version":"1.17"},"rootPath":"/tmp/eglot--fixture-rsZULn/symlink-project/","rootUri":"file:///tmp/eglot--fixture-rsZULn/symlink-project","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":false,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]}},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["plaintext"],"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"linkSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"properties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false,"codeDescriptionSupport":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"support":true},"workDoneProgress":true},"general":{"positionEncodings":["utf-32","utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///tmp/eglot--fixture-rsZULn/symlink-project","name":"/tmp/eglot--fixture-rsZULn/symlink-project/"}]}}
[stderr]  I[13:39:34.933] Debian clangd version 11.0.1-2
[jsonrpc] e[13:39:34.937] <-- initialize[1] {"id":1,"jsonrpc":"2.0","result":{"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"referencesProvider":true,"renameProvider":true,"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":[],"tokenTypes":["variable","variable","parameter","function","member","function","member","variable","class","enum","enumConstant","type","dependent","dependent","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"Debian clangd version 11.0.1-2"}}}
[jsonrpc] e[13:39:34.937] --> initialized {"jsonrpc":"2.0","method":"initialized","params":{}}
[jsonrpc] e[13:39:34.941] --> textDocument/didOpen {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///tmp/eglot--fixture-rsZULn/symlink-project/main.cpp","version":0,"languageId":"c++","text":"#include\"foo.h\"\nint main() { return foo(); }"}}}
[jsonrpc] e[13:39:34.941] --> workspace/didChangeConfiguration {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
[jsonrpc] e[13:39:34.954] --> textDocument/didOpen {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///tmp/eglot--fixture-rsZULn/symlink-project/foo.h","version":0,"languageId":"c","text":"int foo();"}}}
[jsonrpc] e[13:39:34.957] --> textDocument/references[2] {"jsonrpc":"2.0","id":2,"method":"textDocument/references","params":{"textDocument":{"uri":"file:///tmp/eglot--fixture-rsZULn/symlink-project/foo.h"},"position":{"line":0,"character":4},"context":{"includeDeclaration":true}}}
[stderr]  I[13:39:34.934] PID: 75887
[stderr]  I[13:39:34.934] Working directory: /tmp/eglot--fixture-rsZULn/symlink-project
[stderr]  I[13:39:34.934] argv[0]: /usr/bin/clangd
[stderr]  I[13:39:34.934] Starting LSP over stdin/stdout
[stderr]  I[13:39:34.936] <-- initialize(1)
[stderr]  I[13:39:34.937] --> reply:initialize(1) 0 ms
[stderr]  I[13:39:34.943] <-- initialized
[stderr]  I[13:39:34.943] <-- textDocument/didOpen
[stderr]  I[13:39:34.944] <-- workspace/didChangeConfiguration
[stderr]  I[13:39:34.949] Failed to find compilation database for /tmp/eglot--fixture-rsZULn/symlink-project/main.cpp
[stderr]  I[13:39:34.949] ASTWorker building file /tmp/eglot--fixture-rsZULn/symlink-project/main.cpp version 0 with command clangd fallback
[stderr]  [/tmp/eglot--fixture-rsZULn/symlink-project]
[stderr]  /usr/bin/clang /tmp/eglot--fixture-rsZULn/symlink-project/main.cpp -fsyntax-only -resource-dir=/usr/lib/llvm-11/lib/clang/11.0.1
[stderr]  I[13:39:34.953] <-- textDocument/didOpen
[stderr]  I[13:39:34.957] <-- textDocument/references(2)
[stderr]  I[13:39:34.963] Failed to find compilation database for /tmp/eglot--fixture-rsZULn/symlink-project/foo.h
[stderr]  I[13:39:34.963] ASTWorker building file /tmp/eglot--fixture-rsZULn/symlink-project/foo.h version 0 with command clangd fallback
[stderr]  [/tmp/eglot--fixture-rsZULn/symlink-project]
[stderr]  /usr/bin/clang -xobjective-c++-header /tmp/eglot--fixture-rsZULn/symlink-project/foo.h -fsyntax-only -resource-dir=/usr/lib/llvm-11/lib/clang/11.0.1
[stderr]  I[13:39:35.020] --> textDocument/publishDiagnostics
[jsonrpc] e[13:39:35.021]   <-- textDocument/publishDiagnostics {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///tmp/eglot--fixture-rsZULn/symlink-project/foo.h","version":0}}
[stderr]  I[13:39:35.021] --> reply:textDocument/references(2) 64 ms
[jsonrpc] e[13:39:35.022]   <-- textDocument/references[2] {"id":2,"jsonrpc":"2.0","result":[{"range":{"end":{"character":7,"line":0},"start":{"character":4,"line":0}},"uri":"file:///tmp/eglot--fixture-rsZULn/symlink-project/foo.h"}]}
[jsonrpc] e[13:39:35.031] --> shutdown[3] {"jsonrpc":"2.0","id":3,"method":"shutdown","params":null}
[stderr]  I[13:39:35.028] --> textDocument/publishDiagnostics
[stderr]  I[13:39:35.030] <-- shutdown(3)
[stderr]  I[13:39:35.030] --> reply:shutdown(3) 0 ms
[jsonrpc] e[13:39:35.031]   <-- textDocument/publishDiagnostics {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///tmp/eglot--fixture-rsZULn/symlink-project/main.cpp","version":0}}
[jsonrpc] e[13:39:35.031]   <-- shutdown[3] {"id":3,"jsonrpc":"2.0","result":null}
[jsonrpc] e[13:39:35.037] --> exit {"jsonrpc":"2.0","method":"exit","params":null}
[jsonrpc] D[13:39:35.037] Connection state change: `killed
'
----------b---y---e---b---y---e----------
[stderr]  I[13:39:35.031] <-- exit
[stderr]  I[13:39:35.031] LSP finished, exiting with status 0
[stderr]  
[stderr]  
[stderr]  nil
[stderr]  nil
[stderr]  Process EGLOT (symlink-project/(c++-mode c-mode c-ts-mode c++-ts-mode objc-mode)) stderr finished
[eglot-tests] Killing (main.cpp foo.h), wiping /tmp/eglot--fixture-rsZULn
Test eglot-test-basic-symlink backtrace:
  signal(ert-test-failed (((should (= (line-number-at-pos (point)) 5))
  ert-fail(((should (= (line-number-at-pos (point)) 5)) :form (= 3 5) 
  (if (unwind-protect (setq value-120 (apply fn-118 args-119)) (setq f
  (let (form-description-122) (if (unwind-protect (setq value-120 (app
  (let ((value-120 'ert-form-evaluation-aborted-121)) (let (form-descr
  (let* ((fn-118 #'=) (args-119 (condition-case err (list (line-number
  (save-current-buffer (set-buffer (get-buffer "*xref*")) (goto-char (
  (save-current-buffer (set-buffer (find-file-noselect "foo.h")) (goto
  (save-current-buffer (set-buffer (find-file-noselect "symlink-projec
  (closure (typescript-mode-abbrev-table typescript-mode-syntax-table 
  funcall((closure (typescript-mode-abbrev-table typescript-mode-synta
  (prog1 (funcall fn) (setq test-body-successful-p t))
  (let ((process-environment (cons (format "XDG_CONFIG_HOME=%s" null-d
  (unwind-protect (let ((process-environment (cons (format "XDG_CONFIG
  (let* ((fixture-directory (make-nearby-temp-file "eglot--fixture-" t
  eglot--call-with-fixture((("symlink-project" ("main.cpp" . "#include
  (closure (typescript-mode-abbrev-table typescript-mode-syntax-table 
  #[0 "\303\300!\11>\204\17\0\304\305\306\300D\"\210\300\307H\303\1!\n
  handler-bind-1(#[0 "\303\300!\11>\204\17\0\304\305\306\300D\"\210\30
  ert--run-test-internal(#s(ert--test-execution-info :test ... :result
  ert-run-test(#s(ert-test :name eglot-test-basic-symlink :documentati
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #[385 "\1
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test eglot-test-basic-symlink condition:
    (ert-test-failed
     ((should (= (line-number-at-pos ...) 5)) :form (= 3 5) :value nil))
   FAILED   6/49  eglot-test-basic-symlink (0.320862 sec) at lisp/progmodes/eglot-tests.el:439
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master 49ef173b028: Make publishDiagnostics faster by using cached variable
  2024-04-22 14:30   ` master 49ef173b028: Make publishDiagnostics faster by using cached variable Michael Albinus
@ 2024-04-22 14:42     ` João Távora
  2024-04-23 11:28       ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: João Távora @ 2024-04-22 14:42 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel, Theodor Thornhill

[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]

On Mon, Apr 22, 2024 at 3:30 PM Michael Albinus <michael.albinus@gmx.de>
wrote:
>
> Theodor Thornhill via Mailing list for Emacs changes
> <emacs-diffs@gnu.org> writes:
>
> >     * test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Add
> >     regression test for symlink behavior
>
> This test fails on EMBA. Since there is clangd 11, perhaps a version
> check is needed like in other tests?


I don't think that's the issue.  The test just needs to be made more robust
and give the server some time to analyze code.  I've seen this failure on
an Archlinux VM with clangd 17, which is fairly recent.

The test should wait and assert the proper server LSP responses instead of
implmentation details the xref.el user interface.

The performance optimization that preceded the test is also buggy anyway,
and I
have to redo it.  It fails blatantly on Windows (probably if you're on
Windows
using Eglot there are no diags at all right now.  let's follow up on 70408,
which
is where all the details are.  Thanks

[-- Attachment #2: Type: text/html, Size: 1291 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master 49ef173b028: Make publishDiagnostics faster by using cached variable
  2024-04-22 14:42     ` João Távora
@ 2024-04-23 11:28       ` Michael Albinus
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2024-04-23 11:28 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel, Theodor Thornhill

João Távora <joaotavora@gmail.com> writes:

> let's follow up on 70408, which is where all the details are.  Thanks

So I've added a skip for EMBA, in order not to poison the test jobs.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-23 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <171355811045.27698.4417955472893685111@vcs2.savannah.gnu.org>
     [not found] ` <20240419202150.E4536C1FB59@vcs2.savannah.gnu.org>
2024-04-22 14:30   ` master 49ef173b028: Make publishDiagnostics faster by using cached variable Michael Albinus
2024-04-22 14:42     ` João Távora
2024-04-23 11:28       ` Michael Albinus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.