JakeBecker / elixir-ls

A frontend-independent IDE "smartness" server for Elixir. Implements the JSON-based "Language Server Protocol" standard and provides debugger support via VS Code's debugger protocol.
Apache License 2.0
843 stars 52 forks source link

ElixirLS crashing in vs code with umbrella project #41

Closed beardedeagle closed 6 years ago

beardedeagle commented 6 years ago

I am getting the following when opening VS Code Insiders with the Elixir LS plugin installed:

[Extension Host] ok:localhost:/tmp/elixir-sense-1515347850488828000.sock
 (at Socket.__dirname.start.env.proc.stdout.on (/Users/rlthompson/.vscode-insiders/extensions/mjmcloug.vscode-elixir-1.1.0/out/src/elixirSenseServerProcess.js:27:25))
/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253

[Extension Host] [vscode-elixir] ElixirSense client connected on localhost:/tmp/elixir-sense-1515347850488828000.sock (at ElixirSenseClient.handleConnect (/Users/rlthompson/.vscode-insiders/extensions/mjmcloug.vscode-elixir-1.1.0/out/src/elixirSenseClient.js:29:17))
messageService.ts:126

The ElixirLS server crashed 5 times in the last 3 minutes. The server will not be restarted.
e.doShow @ messageService.ts:126
e.show @ messageService.ts:105
e._showMessage @ mainThreadMessageService.ts:70
e._showMessage @ mainThreadMessageService.ts:40
e.$showMessage @ mainThreadMessageService.ts:34
e._doInvokeHandler @ rpcProtocol.ts:186
e._invokeHandler @ rpcProtocol.ts:171
e._receiveRequest @ rpcProtocol.ts:116
e._receiveOneMessage @ rpcProtocol.ts:91
(anonymous) @ rpcProtocol.ts:34
(anonymous) @ rpcProtocol.ts:231
e.fire @ event.ts:142
(anonymous) @ ipc.net.ts:81
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560

Erlang version:

~ > kerl status
Available builds:
20.2,20.2
----------
Available installations:
20.2 /Users/rlthompson/.kerl/installations/20.2
----------
The current active installation is:
/Users/rlthompson/.kerl/installations/20.2
There's no Dialyzer PLT for the active installation
The build options for the active installation are:

 --enable-darwin-64bit --with-ssl=/usr/local/opt/openssl

Elixir version:

 ~ > kiex list

kiex elixirs

=* elixir-1.6.0-rc.0

# => - current
# =* - current && default
#  * - default

Workspace Settings:

{
    "elixir.projectPath": "/probe",
    "elixirLS.projectDir": "/probe",
    "elixirLinter.useStrict": true,
    "elixir.elixirEnv": "dev",
    "elixirLS.mixEnv": "dev"
}

Installed vs code plugins

 ~ > code-insiders --list-extensions
Arjun.swagger-viewer
JakeBecker.elixir-ls
PeterJausovec.vscode-docker
bibhasdn.django-html
coderfee.open-html-in-browser
donjayamanne.githistory
eamodio.gitlens
felixfbecker.php-debug
felixfbecker.php-intellisense
formulahendry.code-runner
humao.rest-client
iampeterbanjo.elixirlinter
ipedrazas.kubernetes-snippets
kalitaalexey.vscode-rust
kumar-harsh.graphql-for-vscode
lextudio.restructuredtext
lukehoban.Go
magicstack.MagicPython
mauve.terraform
mjmcloug.vscode-elixir
ms-python.python
ms-vscode.atom-keybindings
ms-vscode.cpptools
ms-vscode.csharp
ms-vscode.PowerShell
msjsdiag.debugger-for-chrome
paulhoughton.vscode-jscpd
pgourlain.erlang
rebornix.Ruby
robertohuertasm.vscode-icons
sbrink.elm
secanis.jenkinsfile-support
silverbulleters.sonarqube-inject
sozercan.slack
timonwong.shellcheck
wayou.vscode-todo-highlight
wholroyd.jinja
yuce.erlang-otp
zhuangtongfa.Material-theme

ElixirLS version: v0.2.9

Project structure:

Probe
├── build
│   └── probe
├── deployment
│   └── probe
└── probe
    ├── apps
    │   ├── api
    │   │   ├── config
    │   │   ├── lib
    │   │   │   ├── api
    │   │   │   └── api_web
    │   │   │       ├── channels
    │   │   │       ├── resolvers
    │   │   │       ├── schema
    │   │   │       └── views
    │   │   ├── priv
    │   │   │   └── gettext
    │   │   │       └── en
    │   │   │           └── LC_MESSAGES
    │   │   └── test
    │   │       ├── api_web
    │   │       │   └── views
    │   │       └── support
    │   ├── db
    │   │   ├── config
    │   │   ├── lib
    │   │   │   └── db
    │   │   └── test
    │   └── svc
    │       ├── config
    │       ├── lib
    │       │   └── svc
    │       │       ├── alerts
    │       │       ├── callbacks
    │       │       └── checks
    │       └── test
    ├── config
    ├── priv
    │   └── data
    └── rel
beardedeagle commented 6 years ago

Hrm. I nuked all dialyzer files in .mix and in my project, removed deps and _build then rebuilt and opened everything from the umbrella project root and now I see data populating Problems. I'll leave this open in case you want to look at it.

JakeBecker commented 6 years ago

Hm. I don't know, but I recommend that you don't run both vscode-elixir and vscode-elixir-ls extensions at the same time. Both will try to compile your project code and they're likely to interfere with each other. I don't know if that's the cause of your issue, but it'll likely cause instability of some sort.

beardedeagle commented 6 years ago

@JakeBecker Hrm, I'd agree if it weren't for the fact that this operates as expected with non umbrella apps. This issue literally only occurs in umbrella apps. Would be great to see support for it. May I recommend reopening the issue until it can be looked at closer?