all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72779: EGLOT pyright bug
@ 2024-08-23 16:44 Johann De Waal
  2024-08-24  6:29 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Johann De Waal @ 2024-08-23 16:44 UTC (permalink / raw)
  To: 72779

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

Good day, I hope you are well.

I've got a bug to report for eglot.

To reproduce is quite simple, I run eglot in a python buffer and it
immediately exits with message 'exited abnormally with code 1'.

Some notes.
1. Running pyright in the command line works as expected.
2. Pyright was installed using "npm install -g pyright".
   node -v = v20.16.0
   pyright --version = 1.1.377

I've also attached some the logs from the eglot buffer.

Thank you for your time and your work on eglot. Please let me know if
I can improve my bug report in any way.

Kind regards.

[-- Attachment #2: eglot_buffer.txt --]
[-- Type: text/plain, Size: 3384 bytes --]

[stderr] 
[stderr] 
[stderr] nil
[stderr] nil
[stderr] Process EGLOT (middlewaremk2/(python-mode)) stderr finished
[internal] Fri Aug 23 18:25:18 2024:
(:message "Running language server: pyright")
[client-request] (id:1) Fri Aug 23 18:25:18 2024:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
	  (:processId 8735 :rootPath "/home/johann/workspace/middlewaremk2/" :rootUri "file:///home/johann/workspace/middlewaremk2" :initializationOptions #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
																					 ())
		      :capabilities
		      (:workspace
		       (:applyEdit t :executeCommand
				   (:dynamicRegistration :json-false)
				   :workspaceEdit
				   (:documentChanges t)
				   :didChangeWatchedFiles
				   (:dynamicRegistration t)
				   :symbol
				   (:dynamicRegistration :json-false)
				   :configuration t :workspaceFolders t)
		       :textDocument
		       (:synchronization
			(:dynamicRegistration :json-false :willSave t :willSaveWaitUntil t :didSave t)
			:completion
			(:dynamicRegistration :json-false :completionItem
					      (:snippetSupport t :deprecatedSupport t :resolveSupport
							       (:properties
								["documentation" "details" "additionalTextEdits"])
							       :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)
			:inlayHint
			(:dynamicRegistration :json-false)
			:publishDiagnostics
			(:relatedInformation :json-false :codeDescriptionSupport :json-false :tagSupport
					     (:valueSet
					      [1 2])))
		       :window
		       (:workDoneProgress t)
		       :general
		       (:positionEncodings
			["utf-32" "utf-8" "utf-16"])
		       :experimental #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
						   ()))
		      :workspaceFolders
		      [(:uri "file:///home/johann/workspace/middlewaremk2" :name "~/workspace/middlewaremk2/")]))
[internal] Fri Aug 23 18:25:20 2024:
(:message "Connection state changed" :change "exited abnormally with code 1\n")

----------b---y---e---b---y---e----------

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

* bug#72779: EGLOT pyright bug
  2024-08-23 16:44 bug#72779: EGLOT pyright bug Johann De Waal
@ 2024-08-24  6:29 ` Eli Zaretskii
  2024-08-24  9:01   ` João Távora
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-08-24  6:29 UTC (permalink / raw)
  To: Johann De Waal, João Távora; +Cc: 72779

> From: Johann De Waal <njdewaal@gmail.com>
> Date: Fri, 23 Aug 2024 18:44:41 +0200
> 
> I've got a bug to report for eglot.
> 
> To reproduce is quite simple, I run eglot in a python buffer and it
> immediately exits with message 'exited abnormally with code 1'.
> 
> Some notes.
> 1. Running pyright in the command line works as expected.
> 2. Pyright was installed using "npm install -g pyright".
>    node -v = v20.16.0
>    pyright --version = 1.1.377
> 
> I've also attached some the logs from the eglot buffer.

Not sure it's our problem and not of pyright, but I added João to this
discussion, in the hope that he might have some comments or
suggestions.





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

* bug#72779: EGLOT pyright bug
  2024-08-24  6:29 ` Eli Zaretskii
@ 2024-08-24  9:01   ` João Távora
  2024-08-24 10:12     ` Johann De Waal
  0 siblings, 1 reply; 5+ messages in thread
From: João Távora @ 2024-08-24  9:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 72779, Johann De Waal

On Sat, Aug 24, 2024 at 7:29 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > Please let me know if I can improve my bug report in any way.

You can follow https://joaotavora.github.io/eglot/#Troubleshooting-Eglot
pay attention to the part about the emacs -q session.  In that
same shell where "pyright works as expected", you should be able
to start emacs -Q, navigate to a python file, and
C-u M-x eglot RET pyright RET.

pyright is a javascript program. It's possible you have a javascript
environment in your shell which is not your Emacs's session.

Also knowing that pyright in the command line works "as expected"
would manually issuing LSP commands to it from stdin.  I suspect
you haven't done that.

João





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

* bug#72779: EGLOT pyright bug
  2024-08-24  9:01   ` João Távora
@ 2024-08-24 10:12     ` Johann De Waal
  2024-08-29 11:38       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Johann De Waal @ 2024-08-24 10:12 UTC (permalink / raw)
  To: João Távora; +Cc: Eli Zaretskii, 72779

Hello, thank you for your swift responses.

Following the 'emacs -Q' advice I was able to pinpoint the problem.

I had the following in my configs.
  (add-to-list 'eglot-server-programs
           '(python-mode . ("pyright"))
which had to be
  (add-to-list 'eglot-server-programs
           '(python-mode . ("pyright-langserver" "--stdio")))

I had set it in this erroneous manner because I was experimenting with mypy.

Thank you for your help.

Kind regards.


On Sat, 24 Aug 2024 at 10:59, João Távora <joaotavora@gmail.com> wrote:
>
> On Sat, Aug 24, 2024 at 7:29 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > > Please let me know if I can improve my bug report in any way.
>
> You can follow https://joaotavora.github.io/eglot/#Troubleshooting-Eglot
> pay attention to the part about the emacs -q session.  In that
> same shell where "pyright works as expected", you should be able
> to start emacs -Q, navigate to a python file, and
> C-u M-x eglot RET pyright RET.
>
> pyright is a javascript program. It's possible you have a javascript
> environment in your shell which is not your Emacs's session.
>
> Also knowing that pyright in the command line works "as expected"
> would manually issuing LSP commands to it from stdin.  I suspect
> you haven't done that.
>
> João





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

* bug#72779: EGLOT pyright bug
  2024-08-24 10:12     ` Johann De Waal
@ 2024-08-29 11:38       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2024-08-29 11:38 UTC (permalink / raw)
  To: Johann De Waal; +Cc: joaotavora, 72779-done

> From: Johann De Waal <njdewaal@gmail.com>
> Date: Sat, 24 Aug 2024 12:12:57 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, 72779@debbugs.gnu.org
> 
> Hello, thank you for your swift responses.
> 
> Following the 'emacs -Q' advice I was able to pinpoint the problem.
> 
> I had the following in my configs.
>   (add-to-list 'eglot-server-programs
>            '(python-mode . ("pyright"))
> which had to be
>   (add-to-list 'eglot-server-programs
>            '(python-mode . ("pyright-langserver" "--stdio")))
> 
> I had set it in this erroneous manner because I was experimenting with mypy.

Thanks to both of you.  I'm therefore closing this bug.





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

end of thread, other threads:[~2024-08-29 11:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 16:44 bug#72779: EGLOT pyright bug Johann De Waal
2024-08-24  6:29 ` Eli Zaretskii
2024-08-24  9:01   ` João Távora
2024-08-24 10:12     ` Johann De Waal
2024-08-29 11:38       ` Eli Zaretskii

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.