Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(void-variable it) errors when starting omnisharp server with Emacs 28 native comp #521

Open
Ruin0x11 opened this issue May 11, 2021 · 11 comments

Comments

@Ruin0x11
Copy link

This may be related to #516.

Using Emacs 28 with native compilation enabled, this error occurs when starting the server.

Debugger entered--Lisp error: (void-variable it)
  omnisharp--read-lines-from-process-output(#<process OmniServer<4>> "{\"Event\":\"log\",\"Body\":{\"LogLevel\":\"INFORMATION\",\"N...")
  (let* ((messages-from-server (omnisharp--read-lines-from-process-output process message-part)) (error-message (concat "The server sent an unknown json message. " "Inspect the omnisharp-server process buffer " "to view recent messages from the server. " "Set `omnisharp-debug' to t and inspect the " "*omnisharp-debug* buffer for this error specifical...")) (json-messages (-map #'(lambda (json-string) (omnisharp--json-read-from-string json-string error-message)) messages-from-server))) (-map #'omnisharp--handle-server-event json-messages))
  omnisharp--handle-server-message(#<process OmniServer<4>> "{\"Event\":\"log\",\"Body\":{\"LogLevel\":\"INFORMATION\",\"N...")

If I add these lines to my config the error stops occurring.

(setq no-native-compile t
      load-no-native t)
@razzmatazz
Copy link
Contributor

razzmatazz commented May 17, 2021

Hi @Ruin0x11 -- just noticed your issue on doom emacs :)

I just started running emacs28+nativecomp myself (albeit with lsp-mode) -- but will try to see what little fix can be done to aleviate this issue.

@razzmatazz
Copy link
Contributor

Hmm, I could not replicate this issue on my mac with latest doom emacs. Do you have the latest omnisharp-emacs/doom installed? Do you have any specific project settings?

I installed server using M-x omnisharp-install-server and my test projects has succeeded in loading it.

@jcs090218
Copy link
Contributor

I think this is the problem from dash. Try reinstall it may work.

@Ruin0x11
Copy link
Author

Ruin0x11 commented May 18, 2021

Sorry, I had only noticed this repo was deprecated in favor of lsp-mode a short time ago. I thought it was still maintained because it came bundled with doom-emacs. I've since switched to using lsp-mode.

I should at least mention that I reinstalled dash and my entire Emacs system again, but those didn't fix the problem. I'm using Windows Server 2019.

I'll close this for now.

@razzmatazz
Copy link
Contributor

I try to maintain this once a while to fix breakages, but no new features are planned.

@CsBigDataHub
Copy link

@razzmatazz any work around for this? Having the same issue on emacs28+nativecomp myself. I prefer this package to lsp for some feature like symbol-rename and jump to a definition imported from a .dll.

Thanks for your work and inputs.

@razzmatazz razzmatazz reopened this May 30, 2021
@razzmatazz
Copy link
Contributor

razzmatazz commented May 30, 2021

I managed to replicate this myself with emacs28+nativecomp. Running the code under non-nativecomp (regular) build apparently does NOT trigger the issue..

@razzmatazz
Copy link
Contributor

razzmatazz commented May 31, 2021

@razzmatazz any work around for this? Having the same issue on emacs28+nativecomp myself. I prefer this package to lsp for some feature like symbol-rename and jump to a definition imported from a .dll.

Thanks for your work and inputs.

On a related note, @CsBigDataHub can you vouch for my PR OmniSharp/omnisharp-roslyn#2079 where I am trying to merge in my changes so jump-to-definition-in-dll would work in LSP mode for omnisharp-roslyn? :) I can't get them to review/merge my PR so that one is stuck...

@CsBigDataHub
Copy link

@razzmatazz any work around for this? Having the same issue on emacs28+nativecomp myself. I prefer this package to lsp for some feature like symbol-rename and jump to a definition imported from a .dll.

Thanks for your work and inputs.

On a related note, @CsBigDataHub can you vouch for my PR OmniSharp/omnisharp-roslyn#2079 where I am trying to merge in my changes so jump-to-definition-in-dll would work in LSP mode for omnisharp-roslyn? :) I can't get them to review/merge my PR so that one is stuck...

Sure, let me build the project with your PR and test it out. Will update soon.

@benjamin-asdf
Copy link

Btw I fixed this by adding (require 'dash) to every single file in the omnisharp project

razzmatazz added a commit to razzmatazz/omnisharp-emacs that referenced this issue Jul 25, 2021
…cs28 w/native comp

Related to:
- (void-variable it) errors when starting omnisharp server with Emacs 28 native comp OmniSharp#521
@razzmatazz
Copy link
Contributor

I have merged a PR that attempts to fix this issue with the change proposed by @rtnlmeme-DestroyerOfDeath -- will take some time to be updated to melpa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants