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

LSP doesn't work with .NET 6 and Mac M1 with Ionide #939

Closed
leolorenzoluis opened this issue May 8, 2022 · 8 comments
Closed

LSP doesn't work with .NET 6 and Mac M1 with Ionide #939

leolorenzoluis opened this issue May 8, 2022 · 8 comments
Labels

Comments

@leolorenzoluis
Copy link

leolorenzoluis commented May 8, 2022

Based off my findings it looks like Ionide uses a dependency that doesn't work with M1/.NET 6. Find references doesn't work with M1 with .NET 6

'libe_sqlite3' (no such file), '/usr/local/lib/libe_sqlite3' (no such file), '/usr/lib/libe_sqlite3' (no such file),

https://github.com/fsharp/FsAutoComplete/blob/main/paket.dependencies#L33

Which causes this to happen: ionide/ionide-vscode-fsharp#1707

Which might be related due to this: ericsink/SQLitePCL.raw#468

Not sure if package dependencies need to be updated for SQLitePCL

@leolorenzoluis leolorenzoluis changed the title Autocomplete doesn't work with .NET 6 Autocomplete doesn't work with .NET 6 and Mac M1 May 8, 2022
@leolorenzoluis leolorenzoluis changed the title Autocomplete doesn't work with .NET 6 and Mac M1 LSP doesn't work with .NET 6 and Mac M1 May 8, 2022
@baronfel baronfel added the bug label May 8, 2022
@razzmatazz
Copy link
Contributor

razzmatazz commented May 10, 2022

Mhm, actually it does work for me on M1 w/.NET 6 (installed with dotnet tool install -g fsautocomplete and runs as native binary), but I hit another issue with excessive CPU usage:

This is my lsp/find refs call/response for a proof from emacs/lsp-mode :)

Bildschirmfoto 2022-05-10 um 22 13 28
[Trace - 10:14:18 PM] Sending request 'textDocument/references - (313)'.
Params: {
  "textDocument": {
    "uri": "file:///Users/bob/src/csharp-language-server/src/CSharpLanguageServer/Server.fs"
  },
  "position": {
    "line": 1478,
    "character": 8
  },
  "context": {
    "includeDeclaration": false
  }
}


[Trace - 10:14:18 PM] Received response 'textDocument/references - (313)' in 3ms.
Result: [
  {
    "uri": "file:///Users/bob/src/csharp-language-server/src/CSharpLanguageServer/Server.fs",
    "range": {
      "start": {
        "line": 1483,
        "character": 8,
        "debuggerDisplay": "(1483,8)"
      },
      "end": {
        "line": 1483,
        "character": 14,
        "debuggerDisplay": "(1483,14)"
      },
      "debuggerDisplay": "(1483,8)-(1483,14)"
    }
  }
]

@razzmatazz
Copy link
Contributor

@leolorenzoluis what macos version are you running this on?

btw, how did you install fsautocomplete? via dotnet tool install -g fsautocomplete or via some other mechanism that ionide extension uses?

I wonder if it could be that dotnet tool-installed fsautocomplete has a different runtime environment than the version downloaded and installed by vscode/ionide extension..

@leolorenzoluis
Copy link
Author

@razzmatazz macOS Monterey 12.3.1. I did not install fsautocomplete globally, but through Ionide. Does it work in your case with VS Code and Ionide?

@razzmatazz
Copy link
Contributor

hmm, it does.. I tried to uninstall fsautocomplete via dotnet tool uninstall -g fsautocomplete and it still works for me, so I think vscode-ionide uses some local installation of fsautocomplete (not from dotnet tools);

the project I am testing this with is https://github.com/razzmatazz/csharp-language-server

Bildschirmfoto 2022-05-11 um 08 12 57

@leolorenzoluis leolorenzoluis changed the title LSP doesn't work with .NET 6 and Mac M1 LSP doesn't work with .NET 6 and Mac M1 with Ionide May 11, 2022
@leolorenzoluis
Copy link
Author

leolorenzoluis commented May 11, 2022

Screen Shot 2022-05-11 at 1 25 13 AM

Screen Shot 2022-05-11 at 1 25 38 AM

I cloned your repo and tested, I get no references for other variables. Also just to add, find references partially work like if it's within the local scope of the function, but it doesn't find references outside say usages of the variable within a module.

I also encountered CPU excessive usage which caused my M1 to be hot!

I tested with Project Rider and their find references works fine.

@razzmatazz
Copy link
Contributor

razzmatazz commented Jun 13, 2022

One unrelated thing is that fsac does not compile on macOS/arm64 for me, caused by:

Seems to be fixed on latest dotnet/runtime @ master a couple of weeks ago:

Seems to be fixed on dotnet/7 only though.

@razzmatazz
Copy link
Contributor

I also encountered CPU excessive usage which caused my M1 to be hot!

FYI; at least the cpu hogging issue has been seeming fixed for me with v0.56.2

@TheAngryByrd
Copy link
Member

Since this seems like a runtime issue I'm gonna go ahead and close it.

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

No branches or pull requests

4 participants