Skip to content

Flymake backend signals errors ("obsolete report") when editing code in an indirect/cloned buffer #843

Open
@phst

Description

  • Server used: clangd
  • Emacs version: GNU Emacs 29.0.50 (build 59, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.16.0) of 2022-02-23 (also happens in Emacs 28)
  • Operating system: GNU/Linux
  • Eglot version: Git hash bd6a1cc
  • Eglot installation method: Just emacs -Q -l eglot.el from a checkout of this repository.
  • Using Doom: No

LSP transcript - M-x eglot-events-buffer (mandatory unless Emacs inoperable)

[internal] Wed Feb 23 14:15:25 2022:
(:message "Running language server: /usr/bin/clangd")
[client-request] (id:1) Wed Feb 23 14:15:25 2022:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
	  (:processId 2084824 :rootPath "/tmp/" :rootUri "file:///tmp" :initializationOptions #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
													    ())
		      :capabilities
		      (:workspace
		       (:applyEdit t :executeCommand
				   (:dynamicRegistration :json-false)
				   :workspaceEdit
				   (:documentChanges :json-false)
				   :didChangeWatchedFiles
				   (:dynamicRegistration t)
				   :symbol
				   (:dynamicRegistration :json-false)
				   :configuration t)
		       :textDocument
		       (:synchronization
			(:dynamicRegistration :json-false :willSave t :willSaveWaitUntil t :didSave t)
			:completion
			(:dynamicRegistration :json-false :completionItem
					      (:snippetSupport :json-false :deprecatedSupport t :tagSupport
							       (:valueSet
								[1]))
					      :contextSupport t)
			:hover
			(:dynamicRegistration :json-false :contentFormat
					      ["plaintext"])
			:signatureHelp
			(:dynamicRegistration :json-false :signatureInformation
					      (:parameterInformation
					       (:labelOffsetSupport t)
					       :activeParameterSupport t))
			:references
			(:dynamicRegistration :json-false)
			:definition
			(:dynamicRegistration :json-false :linkSupport t)
			:declaration
			(:dynamicRegistration :json-false :linkSupport t)
			:implementation
			(:dynamicRegistration :json-false :linkSupport t)
			:typeDefinition
			(:dynamicRegistration :json-false :linkSupport t)
			:documentSymbol
			(:dynamicRegistration :json-false :hierarchicalDocumentSymbolSupport t :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 :json-false)
			:codeAction
			(:dynamicRegistration :json-false :codeActionLiteralSupport
					      (:codeActionKind
					       (:valueSet
						["quickfix" "refactor" "refactor.extract" "refactor.inline" "refactor.rewrite" "source" "source.organizeImports"]))
					      :isPreferredSupport t)
			:formatting
			(:dynamicRegistration :json-false)
			:rangeFormatting
			(:dynamicRegistration :json-false)
			:rename
			(:dynamicRegistration :json-false)
			:publishDiagnostics
			(:relatedInformation :json-false :codeDescriptionSupport :json-false :tagSupport
					     (:valueSet
					      [1 2])))
		       :experimental #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
						   ()))))
[stderr] I[14:15:25.229] clangd version redacted
[stderr] I[14:15:25.229] Features: linux+grpc
[stderr] I[14:15:25.229] PID: 2084852
[stderr] I[14:15:25.229] Working directory: /tmp
[stderr] I[14:15:25.229] argv[0]: /usr/bin/clangd
[server-reply] (id:1) Wed Feb 23 14:15:25 2022:
(:id 1 :jsonrpc "2.0" :result
     (:capabilities
      (:astProvider t :callHierarchyProvider t :clangdInlayHintsProvider t :codeActionProvider
		    (:codeActionKinds
		     ["quickfix" "refactor" "info"])
		    :compilationDatabase
		    (:automaticReload t)
		    :completionProvider
		    (:allCommitCharacters
		     [" " "	" "(" ")" "[" "]" "{" "}" "<" ">" ":" ";" "," "+" "-" "/" "*" "%" "^" "&" "#" "?" "." "=" "\"" "'" "|"]
		     :resolveProvider :json-false :triggerCharacters
		     ["." "<" ">" ":" "\"" "/" "*"])
		    :declarationProvider t :definitionProvider t :documentFormattingProvider t :documentHighlightProvider t :documentLinkProvider
		    (:resolveProvider :json-false)
		    :documentOnTypeFormattingProvider
		    (:firstTriggerCharacter "\n" :moreTriggerCharacter
					    [])
		    :documentRangeFormattingProvider t :documentSymbolProvider t :executeCommandProvider
		    (:commands
		     ["clangd.applyFix" "clangd.applyTweak"])
		    :hoverProvider t :implementationProvider t :memoryUsageProvider t :referencesProvider t :renameProvider t :selectionRangeProvider t :semanticTokensProvider
		    (:full
		     (:delta t)
		     :legend
		     (:tokenModifiers
		      ["declaration" "deprecated" "deduced" "readonly" "static" "abstract" "virtual" "dependentName" "defaultLibrary" "usedAsMutableReference" "functionScope" "classScope" "fileScope" "globalScope"]
		      :tokenTypes
		      ["variable" "variable" "parameter" "function" "method" "function" "property" "variable" "class" "interface" "enum" "enumMember" "type" "type" "unknown" "namespace" "typeParameter" "concept" "type" "macro" "comment"])
		     :range :json-false)
		    :signatureHelpProvider
		    (:triggerCharacters
		     ["(" ")" "{" "}" "<" ">" ","])
		    :textDocumentSync
		    (:change 2 :openClose t :save t)
		    :typeDefinitionProvider t :typeHierarchyProvider t :workspaceSymbolProvider t)
      :serverInfo
      (:name "clangd" :version "clangd version redacted linux+grpc x86_64-grtev4-linux-gnu")))
[client-notification] Wed Feb 23 14:15:25 2022:
(:jsonrpc "2.0" :method "initialized" :params #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8125 data
							    ()))
[client-notification] Wed Feb 23 14:15:25 2022:
(:jsonrpc "2.0" :method "textDocument/didOpen" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c" :version 0 :languageId "c" :text "int main(void) {\n  return 0; \n}\n")))
[client-notification] Wed Feb 23 14:15:25 2022:
(:jsonrpc "2.0" :method "workspace/didChangeConfiguration" :params
	  (:settings nil))
[server-notification] Wed Feb 23 14:15:25 2022:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
	  (:diagnostics
	   []
	   :uri "file:///tmp/a.c" :version 0))
[stderr] I[14:15:25.232] Starting LSP over stdin/stdout
[stderr] I[14:15:25.232] <-- initialize(1)
[stderr] I[14:15:25.232] --> reply:initialize(1) 0 ms
[stderr] I[14:15:25.241] <-- initialized
[stderr] I[14:15:25.245] <-- textDocument/didOpen
[stderr] I[14:15:25.246] Failed to find compilation database for /tmp/a.c
[stderr] I[14:15:25.246] ASTWorker building file /tmp/a.c version 0 with command clangd fallback
[stderr] [/tmp]
[stderr] /usr/lib/llvm-13/bin/clang -resource-dir=redacted -- /tmp/a.c
[stderr] I[14:15:25.247] <-- workspace/didChangeConfiguration
[stderr] I[14:15:25.260] --> textDocument/publishDiagnostics
[client-request] (id:2) Wed Feb 23 14:15:26 2022:
(:jsonrpc "2.0" :id 2 :method "textDocument/signatureHelp" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 0 :character 0)))
[client-request] (id:3) Wed Feb 23 14:15:26 2022:
(:jsonrpc "2.0" :id 3 :method "textDocument/hover" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 0 :character 0)))
[client-request] (id:4) Wed Feb 23 14:15:26 2022:
(:jsonrpc "2.0" :id 4 :method "textDocument/documentHighlight" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 0 :character 0)))
[server-reply] (id:3) Wed Feb 23 14:15:26 2022:
(:id 3 :jsonrpc "2.0" :result nil)
[server-reply] (id:2) Wed Feb 23 14:15:26 2022:
(:id 2 :jsonrpc "2.0" :result
     (:activeParameter 0 :activeSignature 0 :signatures
		       []))
[server-reply] (id:4) Wed Feb 23 14:15:26 2022:
(:id 4 :jsonrpc "2.0" :result
     [])
[stderr] I[14:15:26.177] <-- textDocument/signatureHelp(2)
[stderr] I[14:15:26.185] <-- textDocument/hover(3)
[stderr] I[14:15:26.185] --> reply:textDocument/hover(3) 0 ms
[stderr] I[14:15:26.188] --> reply:textDocument/signatureHelp(2) 10 ms
[stderr] I[14:15:26.192] <-- textDocument/documentHighlight(4)
[stderr] I[14:15:26.192] --> reply:textDocument/documentHighlight(4) 0 ms
[client-request] (id:5) Wed Feb 23 14:15:28 2022:
(:jsonrpc "2.0" :id 5 :method "textDocument/signatureHelp" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 12)))
[client-request] (id:6) Wed Feb 23 14:15:28 2022:
(:jsonrpc "2.0" :id 6 :method "textDocument/hover" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 12)))
[client-request] (id:7) Wed Feb 23 14:15:28 2022:
(:jsonrpc "2.0" :id 7 :method "textDocument/documentHighlight" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 12)))
[server-reply] (id:6) Wed Feb 23 14:15:28 2022:
(:id 6 :jsonrpc "2.0" :result nil)
[server-reply] (id:5) Wed Feb 23 14:15:28 2022:
(:id 5 :jsonrpc "2.0" :result
     (:activeParameter 0 :activeSignature 0 :signatures
		       []))
[server-reply] (id:7) Wed Feb 23 14:15:28 2022:
(:id 7 :jsonrpc "2.0" :result
     [])
[stderr] I[14:15:28.118] <-- textDocument/signatureHelp(5)
[stderr] I[14:15:28.130] <-- textDocument/hover(6)
[stderr] I[14:15:28.131] --> reply:textDocument/hover(6) 0 ms
[stderr] I[14:15:28.131] --> reply:textDocument/signatureHelp(5) 12 ms
[stderr] I[14:15:28.139] <-- textDocument/documentHighlight(7)
[stderr] I[14:15:28.139] --> reply:textDocument/documentHighlight(7) 0 ms
[internal] (id:8) Wed Feb 23 14:15:28 2022:
(:deferring :textDocument/signatureHelp :id 8 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 11)))
[internal] (id:9) Wed Feb 23 14:15:28 2022:
(:deferring :textDocument/hover :id 9 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 11)))
[internal] (id:10) Wed Feb 23 14:15:28 2022:
(:deferring :textDocument/documentHighlight :id 10 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 11)))
[client-notification] Wed Feb 23 14:15:28 2022:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c" :version 1)
	   :contentChanges
	   [(:range
	     (:start
	      (:line 1 :character 11)
	      :end
	      (:line 1 :character 12))
	     :rangeLength 1 :text "")]))
[internal] Wed Feb 23 14:15:28 2022:
(:maybe-run-deferred
 (8 9 10))
[client-request] (id:8) Wed Feb 23 14:15:28 2022:
(:jsonrpc "2.0" :id 8 :method "textDocument/signatureHelp" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 11)))
[client-request] (id:9) Wed Feb 23 14:15:28 2022:
(:jsonrpc "2.0" :id 9 :method "textDocument/hover" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 11)))
[client-request] (id:10) Wed Feb 23 14:15:28 2022:
(:jsonrpc "2.0" :id 10 :method "textDocument/documentHighlight" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 11)))
[server-reply] (id:8) Wed Feb 23 14:15:29 2022:
(:id 8 :jsonrpc "2.0" :result
     (:activeParameter 0 :activeSignature 0 :signatures
		       []))
[server-reply] (id:9) Wed Feb 23 14:15:29 2022:
(:id 9 :jsonrpc "2.0" :result nil)
[server-notification] Wed Feb 23 14:15:29 2022:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
	  (:diagnostics
	   []
	   :uri "file:///tmp/a.c" :version 1))
[server-reply] (id:10) Wed Feb 23 14:15:29 2022:
(:id 10 :jsonrpc "2.0" :result
     [])
[stderr] I[14:15:28.983] <-- textDocument/didChange
[stderr] I[14:15:28.989] <-- textDocument/signatureHelp(8)
[stderr] I[14:15:28.992] <-- textDocument/hover(9)
[stderr] I[14:15:28.992] Failed to find compilation database for /tmp/a.c
[stderr] I[14:15:28.992] ASTWorker building file /tmp/a.c version 1 with command clangd fallback
[stderr] [/tmp]
[stderr] /usr/lib/llvm-13/bin/clang -resource-dir=redacted -- /tmp/a.c
[stderr] I[14:15:28.994] <-- textDocument/documentHighlight(10)
[stderr] I[14:15:28.995] --> reply:textDocument/signatureHelp(8) 5 ms
[stderr] I[14:15:28.998] --> reply:textDocument/hover(9) 6 ms
[stderr] I[14:15:28.998] Skipping rebuild of the AST for /tmp/a.c, inputs are the same.
[stderr] I[14:15:28.998] --> textDocument/publishDiagnostics
[stderr] I[14:15:28.998] --> reply:textDocument/documentHighlight(10) 4 ms
[client-request] (id:11) Wed Feb 23 14:15:30 2022:
(:jsonrpc "2.0" :id 11 :method "textDocument/signatureHelp" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 11)))
[client-request] (id:12) Wed Feb 23 14:15:30 2022:
(:jsonrpc "2.0" :id 12 :method "textDocument/hover" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 11)))
[client-request] (id:13) Wed Feb 23 14:15:30 2022:
(:jsonrpc "2.0" :id 13 :method "textDocument/documentHighlight" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 11)))
[server-reply] (id:12) Wed Feb 23 14:15:30 2022:
(:id 12 :jsonrpc "2.0" :result nil)
[server-reply] (id:11) Wed Feb 23 14:15:30 2022:
(:id 11 :jsonrpc "2.0" :result
     (:activeParameter 0 :activeSignature 0 :signatures
		       []))
[server-reply] (id:13) Wed Feb 23 14:15:30 2022:
(:id 13 :jsonrpc "2.0" :result
     [])
[stderr] I[14:15:30.754] <-- textDocument/signatureHelp(11)
[stderr] I[14:15:30.758] <-- textDocument/hover(12)
[stderr] I[14:15:30.759] --> reply:textDocument/hover(12) 0 ms
[stderr] I[14:15:30.759] --> reply:textDocument/signatureHelp(11) 4 ms
[stderr] I[14:15:30.910] <-- textDocument/documentHighlight(13)
[stderr] I[14:15:30.911] --> reply:textDocument/documentHighlight(13) 0 ms
[internal] (id:14) Wed Feb 23 14:15:31 2022:
(:deferring :textDocument/signatureHelp :id 14 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[internal] (id:15) Wed Feb 23 14:15:31 2022:
(:deferring :textDocument/hover :id 15 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[internal] (id:16) Wed Feb 23 14:15:31 2022:
(:deferring :textDocument/documentHighlight :id 16 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[client-notification] Wed Feb 23 14:15:31 2022:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c" :version 2)
	   :contentChanges
	   [(:range
	     (:start
	      (:line 1 :character 11)
	      :end
	      (:line 1 :character 11))
	     :rangeLength 0 :text " ")]))
[internal] Wed Feb 23 14:15:31 2022:
(:maybe-run-deferred
 (16 15 14))
[client-request] (id:16) Wed Feb 23 14:15:31 2022:
(:jsonrpc "2.0" :id 16 :method "textDocument/documentHighlight" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 12)))
[client-request] (id:15) Wed Feb 23 14:15:31 2022:
(:jsonrpc "2.0" :id 15 :method "textDocument/hover" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 12)))
[client-request] (id:14) Wed Feb 23 14:15:31 2022:
(:jsonrpc "2.0" :id 14 :method "textDocument/signatureHelp" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 1 :character 12)))
[server-reply] (id:16) Wed Feb 23 14:15:31 2022:
(:id 16 :jsonrpc "2.0" :result
     [])
[server-notification] Wed Feb 23 14:15:31 2022:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
	  (:diagnostics
	   []
	   :uri "file:///tmp/a.c" :version 2))
[stderr] I[14:15:31.476] <-- textDocument/didChange
[stderr] I[14:15:31.481] <-- textDocument/documentHighlight(16)
[stderr] I[14:15:31.481] Failed to find compilation database for /tmp/a.c
[stderr] I[14:15:31.481] ASTWorker building file /tmp/a.c version 2 with command clangd fallback
[stderr] [/tmp]
[stderr] /usr/lib/llvm-13/bin/clang -resource-dir=redacted -- /tmp/a.c
[stderr] I[14:15:31.483] <-- textDocument/hover(15)
[stderr] I[14:15:31.486] <-- textDocument/signatureHelp(14)
[stderr] I[14:15:31.489] --> reply:textDocument/documentHighlight(16) 7 ms
[stderr] I[14:15:31.489] Skipping rebuild of the AST for /tmp/a.c, inputs are the same.
[stderr] I[14:15:31.489] --> textDocument/publishDiagnostics
[stderr] I[14:15:31.489] --> reply:textDocument/hover(15) 5 ms
[stderr] I[14:15:31.489] --> reply:textDocument/signatureHelp(14) 3 ms
[internal] (id:8) Wed Feb 23 14:15:38 2022:
(:timed-out :textDocument/signatureHelp :id 8 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 11)))
[internal] (id:9) Wed Feb 23 14:15:38 2022:
(:timed-out :textDocument/hover :id 9 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 11)))
[internal] (id:10) Wed Feb 23 14:15:39 2022:
(:timed-out :textDocument/documentHighlight :id 10 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 11)))
[internal] (id:14) Wed Feb 23 14:15:41 2022:
(:timed-out :textDocument/signatureHelp :id 14 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[internal] (id:15) Wed Feb 23 14:15:41 2022:
(:timed-out :textDocument/hover :id 15 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[internal] (id:16) Wed Feb 23 14:15:41 2022:
(:timed-out :textDocument/documentHighlight :id 16 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[internal] (id:15) Wed Feb 23 14:15:41 2022:
(:timed-out :textDocument/hover :id 15 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[internal] (id:14) Wed Feb 23 14:15:41 2022:
(:timed-out :textDocument/signatureHelp :id 14 :params
	    (:textDocument
	     (:uri "file:///tmp/a.c")
	     :position
	     (:line 1 :character 12)))
[client-request] (id:17) Wed Feb 23 14:16:58 2022:
(:jsonrpc "2.0" :id 17 :method "textDocument/signatureHelp" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 3 :character 0)))
[client-request] (id:18) Wed Feb 23 14:16:58 2022:
(:jsonrpc "2.0" :id 18 :method "textDocument/hover" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 3 :character 0)))
[client-request] (id:19) Wed Feb 23 14:16:58 2022:
(:jsonrpc "2.0" :id 19 :method "textDocument/documentHighlight" :params
	  (:textDocument
	   (:uri "file:///tmp/a.c")
	   :position
	   (:line 3 :character 0)))
[server-reply] (id:18) Wed Feb 23 14:16:58 2022:
(:id 18 :jsonrpc "2.0" :result nil)
[server-reply] (id:17) Wed Feb 23 14:16:58 2022:
(:id 17 :jsonrpc "2.0" :result
     (:activeParameter 0 :activeSignature 0 :signatures
		       []))
[server-reply] (id:19) Wed Feb 23 14:16:58 2022:
(:id 19 :jsonrpc "2.0" :result
     [])
[stderr] I[14:16:58.210] <-- textDocument/signatureHelp(17)
[stderr] I[14:16:58.219] <-- textDocument/hover(18)
[stderr] I[14:16:58.219] --> reply:textDocument/hover(18) 0 ms
[stderr] I[14:16:58.223] --> reply:textDocument/signatureHelp(17) 13 ms
[stderr] I[14:16:58.226] <-- textDocument/documentHighlight(19)
[stderr] I[14:16:58.226] --> reply:textDocument/documentHighlight(19) 0 ms

Backtrace (mandatory, unless no error message seen or heard):

Debugger entered--Lisp error: (error "[Flymake] Obsolete report from backend eglot-flymake-backend with explanation nil")
  signal(error ("[Flymake] Obsolete report from backend eglot-flymake-backend with explanation nil"))
  error("[Flymake] Obsolete report from backend eglot-flymake-backend with explanation nil")
  flymake-error("Obsolete report from backend %s with explanation %s" eglot-flymake-backend nil)
  flymake--handle-report(eglot-flymake-backend backend-token20 nil :region (1 . 33))
  apply(flymake--handle-report eglot-flymake-backend backend-token20 (nil :region (1 . 33)))
  #f(compiled-function (&rest args) #<bytecode 0x15e2876702907aa7>)(nil :region (1 . 33))
  funcall(#f(compiled-function (&rest args) #<bytecode 0x15e2876702907aa7>) nil :region (1 . 33))
  (save-restriction (widen) (funcall eglot--current-flymake-report-fn diags :region (cons (point-min) (point-max))))
  eglot--report-to-flymake(nil)
  (cond (eglot--current-flymake-report-fn (eglot--report-to-flymake diags)) (t (setq eglot--unreported-diagnostics (cons t diags))))
  (let* ((--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- (1+ --cl-idx--)) (< --cl-idx-- (length --cl-vec--))) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags (list (let ((object-once diag-spec)) (let* (... ... ... ... ... ...) (progn ... ... ...))))))) (cond (eglot--current-flymake-report-fn (eglot--report-to-flymake diags)) (t (setq eglot--unreported-diagnostics (cons t diags)))) nil)
  (save-current-buffer (set-buffer buffer) (let* ((--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- (1+ --cl-idx--)) (< --cl-idx-- (length --cl-vec--))) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags (list (let (...) (let* ... ...)))))) (cond (eglot--current-flymake-report-fn (eglot--report-to-flymake diags)) (t (setq eglot--unreported-diagnostics (cons t diags)))) nil))
  (if buffer (save-current-buffer (set-buffer buffer) (let* ((--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- (1+ --cl-idx--)) (< --cl-idx-- (length --cl-vec--))) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags (list (let ... ...))))) (cond (eglot--current-flymake-report-fn (eglot--report-to-flymake diags)) (t (setq eglot--unreported-diagnostics (cons t diags)))) nil)) (let* ((path (expand-file-name (eglot--uri-to-path uri))) (--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- (1+ --cl-idx--)) (< --cl-idx-- (length --cl-vec--))) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags (list (let (...) (let* ... ...)))))) (setq flymake-list-only-diagnostics (assoc-delete-all path flymake-list-only-diagnostics #'string=)) (setq flymake-list-only-diagnostics (cons (cons path diags) flymake-list-only-diagnostics)) nil))
  (let* ((buffer (and t (find-buffer-visiting (eglot--uri-to-path uri))))) (if buffer (save-current-buffer (set-buffer buffer) (let* ((--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- (1+ --cl-idx--)) (< --cl-idx-- (length --cl-vec--))) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags (list ...)))) (cond (eglot--current-flymake-report-fn (eglot--report-to-flymake diags)) (t (setq eglot--unreported-diagnostics (cons t diags)))) nil)) (let* ((path (expand-file-name (eglot--uri-to-path uri))) (--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- (1+ --cl-idx--)) (< --cl-idx-- (length --cl-vec--))) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags (list (let ... ...))))) (setq flymake-list-only-diagnostics (assoc-delete-all path flymake-list-only-diagnostics #'string=)) (setq flymake-list-only-diagnostics (cons (cons path diags) flymake-list-only-diagnostics)) nil)))
  (progn (let* ((buffer (and t (find-buffer-visiting (eglot--uri-to-path uri))))) (if buffer (save-current-buffer (set-buffer buffer) (let* ((--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- ...) (< --cl-idx-- ...)) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags ...))) (cond (eglot--current-flymake-report-fn (eglot--report-to-flymake diags)) (t (setq eglot--unreported-diagnostics ...))) nil)) (let* ((path (expand-file-name (eglot--uri-to-path uri))) (--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- (1+ --cl-idx--)) (< --cl-idx-- (length --cl-vec--))) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags (list ...)))) (setq flymake-list-only-diagnostics (assoc-delete-all path flymake-list-only-diagnostics #'string=)) (setq flymake-list-only-diagnostics (cons (cons path diags) flymake-list-only-diagnostics)) nil))))
  (let* ((--cl-eglot--diag-type-- #'(lambda (sev) (cond ((null sev) 'eglot-error) ((<= sev 1) 'eglot-error) ((= sev 2) 'eglot-warning) (t 'eglot-note))))) (progn (let* ((buffer (and t (find-buffer-visiting (eglot--uri-to-path uri))))) (if buffer (save-current-buffer (set-buffer buffer) (let* ((--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and ... ...) (setq diag-spec ...) (setq diags ...)) (cond (eglot--current-flymake-report-fn ...) (t ...)) nil)) (let* ((path (expand-file-name ...)) (--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and (setq --cl-idx-- ...) (< --cl-idx-- ...)) (setq diag-spec (aref --cl-vec-- --cl-idx--)) (setq diags (nconc diags ...))) (setq flymake-list-only-diagnostics (assoc-delete-all path flymake-list-only-diagnostics #'string=)) (setq flymake-list-only-diagnostics (cons (cons path diags) flymake-list-only-diagnostics)) nil)))))
  (let* ((uri (car (cdr (plist-member --cl-rest-- ':uri)))) (diagnostics (car (cdr (plist-member --cl-rest-- ':diagnostics))))) (let* ((--cl-eglot--diag-type-- #'(lambda (sev) (cond (... ...) (... ...) (... ...) (t ...))))) (progn (let* ((buffer (and t (find-buffer-visiting ...)))) (if buffer (save-current-buffer (set-buffer buffer) (let* (... ... ... ...) (while ... ... ...) (cond ... ...) nil)) (let* ((path ...) (--cl-vec-- diagnostics) (--cl-idx-- -1) (diag-spec nil) (diags nil)) (while (and ... ...) (setq diag-spec ...) (setq diags ...)) (setq flymake-list-only-diagnostics (assoc-delete-all path flymake-list-only-diagnostics ...)) (setq flymake-list-only-diagnostics (cons ... flymake-list-only-diagnostics)) nil))))))
  (progn (let* ((uri (car (cdr (plist-member --cl-rest-- ':uri)))) (diagnostics (car (cdr (plist-member --cl-rest-- ':diagnostics))))) (let* ((--cl-eglot--diag-type-- #'(lambda (sev) (cond ... ... ... ...)))) (progn (let* ((buffer (and t ...))) (if buffer (save-current-buffer (set-buffer buffer) (let* ... ... ... nil)) (let* (... ... ... ... ...) (while ... ... ...) (setq flymake-list-only-diagnostics ...) (setq flymake-list-only-diagnostics ...) nil)))))))
  (closure (revert-buffer-preserve-modes eglot--managed-mode eglot-lsp-context company-tooltip-align-annotations company-backends markdown-fontify-code-blocks-natively t) (_server _method &rest --cl-rest--) "Handle notification publishDiagnostics.\n\n(fn SERVE..." (progn (let* ((uri (car (cdr ...))) (diagnostics (car (cdr ...)))) (let* ((--cl-eglot--diag-type-- #'...)) (progn (let* (...) (if buffer ... ...)))))))(#<eglot-lsp-server eglot-lsp-server-1580d9f8e606> textDocument/publishDiagnostics :diagnostics [] :uri "file:///tmp/a.c" :version 2)
  apply((closure (revert-buffer-preserve-modes eglot--managed-mode eglot-lsp-context company-tooltip-align-annotations company-backends markdown-fontify-code-blocks-natively t) (_server _method &rest --cl-rest--) "Handle notification publishDiagnostics.\n\n(fn SERVE..." (progn (let* ((uri (car (cdr ...))) (diagnostics (car (cdr ...)))) (let* ((--cl-eglot--diag-type-- #'...)) (progn (let* (...) (if buffer ... ...))))))) #<eglot-lsp-server eglot-lsp-server-1580d9f8e606> textDocument/publishDiagnostics (:diagnostics [] :uri "file:///tmp/a.c" :version 2))
  eglot-handle-notification(#<eglot-lsp-server eglot-lsp-server-1580d9f8e606> textDocument/publishDiagnostics :diagnostics [] :uri "file:///tmp/a.c" :version 2)
  apply(eglot-handle-notification #<eglot-lsp-server eglot-lsp-server-1580d9f8e606> textDocument/publishDiagnostics (:diagnostics [] :uri "file:///tmp/a.c" :version 2))
  (let ((eglot--cached-server server)) (apply fn server method (append params nil)))
  (closure ((fn . eglot-handle-notification) (initargs :process (closure ((contact "/usr/bin/clangd") (server-info "/usr/bin/clangd") (autostart-inferior-process) (readable-name . "EGLOT (tmp/c-mode)") (nickname . "tmp") (language-id . "c") (contact "/usr/bin/clangd") (class . eglot-lsp-server) (project transient . "/tmp/") (managed-major-mode . c-mode) eglot--managed-mode eglot-lsp-context company-tooltip-align-annotations company-backends markdown-fontify-code-blocks-natively t) nil (let ((default-directory default-directory)) (make-process :name readable-name :command (setq server-info ...) :connection-type 'pipe :coding 'utf-8-emacs-unix :noquery t :stderr (get-buffer-create ...) :file-handler t)))) (contact "/usr/bin/clangd") (server-info "/usr/bin/clangd") (autostart-inferior-process) (readable-name . "EGLOT (tmp/c-mode)") (nickname . "tmp") (language-id . "c") (contact "/usr/bin/clangd") (class . eglot-lsp-server) (project transient . "/tmp/") (managed-major-mode . c-mode) eglot--managed-mode eglot-lsp-context company-tooltip-align-annotations company-backends markdown-fontify-code-blocks-natively t) (server method params) (let ((eglot--cached-server server)) (apply fn server method (append params nil))))(#<eglot-lsp-server eglot-lsp-server-1580d9f8e606> textDocument/publishDiagnostics (:diagnostics [] :uri "file:///tmp/a.c" :version 2))
  jsonrpc-connection-receive(#<eglot-lsp-server eglot-lsp-server-1580d9f8e606> (:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params (:diagnostics [] :uri "file:///tmp/a.c" :version 2)))
  jsonrpc--process-filter(#<process EGLOT (tmp/c-mode)> "Content-Length: 37\15\n\15\n{\"id\":16,\"jsonrpc\":\"2.0\",\"result\":[]}Content-Length: 124\15\n\15\n{\"jsonrpc\":\"2.0\",\"...")

Minimal configuration (mandatory)

emacs -Q -f toggle-debug-on-error -l flymake -L ~/checkout/of/eglot/repo -l eglot.el /tmp/a.c -f flymake-mode -f eglot

No additional configuration, but ensure that clangd is installed. (The precise language server and version shouldn't matter, this appears to be an Eglot-internal problem.) Then, visit any C/C++ file (/tmp/a.c in my example), clone the buffer with C-x 4 c, and start typing in the cloned buffer. Flymake will immediately signal an error.

Metadata

Assignees

No one assigned

    Labels

    Minorbugemacs-bugSomething to be solved mostly in Emacs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions