Comments (13)
@sanjibukai yes, this is the right place to ask about this. Any help tracking down the root cause would be greatly appreciated. Although personally I don't like trying to configure docker I'm not sure when I'll take a look at this. A good first step would be to look at all the changes in this repository compared to the current master of https://github.com/JakeBecker/vscode-elixir-ls
Since there's been much less changes in this repository as compared to elixir-ls and elixir_sense if one of the changes did affect the Remote Dev Container support it should be feasible to track down. Also, what operating system are you running? I wonder if this problem affects certain operating systems more.
Although actually there are some elixir-ls PR's that come to mind and you might want to look into removing:
Does this extension need something particular to set up and that I'm missing?
No it does not
from vscode-elixir-ls.
Also this is a tangentially related issue report: elixir-lsp/elixir-ls#160
from vscode-elixir-ls.
Thanks for taking the time to answer..
I'll definitely try to dig more.. I'll look to these links..
Also, what operating system are you running?
I'm using linux (Manjaro) with everything up-to date (eg. linux 5.5.13, vscode 1.43.2, docker 19.03.8)
Edit:
I started to look at the change pointed in the first link elixir-lsp/elixir-ls@8cdc13e
And right away, I noticed that I forgot to mention what "operating system" (say base image) I'm using inside the container.. Well, I'm using an Alpine image of the Elixir Docker image which doesn't come with bash
but ash
!
I'm not sure if this has an impact on the shebang, but the first thing I'll do is to try with a regular image and as you said try by removing these changes..
from vscode-elixir-ls.
Well.. I thought that the simplest thing I can do was simply to install bash to begin with..
And indeed it did the trick.
The extension now works!!
And if I try to execute manually the language_server.sh
I got bash not found
, so TIL that the shebang is strict with the shell variant provided.
And when I put back sh
instead of bash
in the shebang, it works too (without having bash installed in the container)!
So in the meantime I'll simply add bash
in my Dockerfile (not a big deal) so that I don't have to change the extension code etc.
But would you mind if I ask why you went with a change that added restrictions?
I mean bash is a restriction of ash which is a restriction of sh.. So why not leave more generalized options when it's possible?
NB: Also, I permit myself to ask if this issue can be taken into account in a future version?
from vscode-elixir-ls.
@sanjibukai The problem which /bin/sh
is that it breaks support for Ubuntu, here's the forum post from David Sweeney reporting that: https://elixirforum.com/t/emacs-elixir-setup-configuration-wiki/19196/157
The reason it breaks is because asdf does not support sh
: asdf-vm/asdf#653
asdf only supports: bash
, fish
, zsh
I'm actually a little surprised that ash
works when dash
does not since it seems like they both aim for sh
compatibility. Is there an environment variable that indicates that language_server.sh
is running inside a container? Maybe that could be used to drop the asdf invocation since I would guess that most containers are only running a single version of elixir and erlang.
from vscode-elixir-ls.
I did't even know what's asdf (looked now), but I don't have that inside the container and indeed it's not a tool that makes sense within a container.
I guess that this line [ -f "$HOME/.asdf/asdf.sh" ] && . "$HOME/.asdf/asdf.sh"
simply don't succeed so I guess that it's not mandatory to have it..
from vscode-elixir-ls.
@sanjibukai can you test elixir-lsp/elixir-ls#190? It changes the default shell script to launch with #/bin/sh
which should work with alpine.
from vscode-elixir-ls.
Having this same issue. Running in a Debian container that has Bash installed, and the extension won't start. I'm fairly new to VSCode. How do I debug situations where an extension doesn't start? Should there be a log somewhere?
from vscode-elixir-ls.
@ndarilek Here are the troubleshooting instructions. Please provide some of the info because it will help in tracking this down:
Environment
Most of this can be filled out by running the VSCode command (by default bound to Ctrl+Shift+P) "ElixirLS Fork: Copy Debug Info"
- Elixir & Erlang versions (elixir --version):
- VSCode ElixirLS Fork version:
- Operating System Version:
- If using VSCode, are you using "ElixirLS Fork: Elixir support and debugger" (note that it has "Fork" in the name)?
Troubleshooting
- Restart your editor (which will restart ElixirLS) sometimes fixes issues
- Stop your editor, remove the entire
.elixir_ls
directory, then restart your editor- NOTE: This will cause you to have to re-run the entire dialyzer build
Crash report template
Delete this section if not reporting a crash
- Create a new Mix project with
mix new empty
, then open that project with VS Code and open an Elixir file. Is your issue reproducible on the empty project? If not, please publish a repo on Github that does reproduce it. - Check the output log by opening
View > Output
and selecting "ElixirLS" in the dropdown. Please include any output that looks relevant. (If ElixirLS isn't in the dropdown, the server failed to launch.) - Check the developer console by opening
Help > Toggle Developer Tools
and include any errors that look relevant.
from vscode-elixir-ls.
@ndarilek you're problem sounds fairly similar to elixir-lsp/elixir-ls#208 perhaps you also have an incomplete Erlang installation? What operating system are you on and how did you install elixir and erlang?
@sanjibukai can you try version 0.3.3 https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls (you might have to uninstall the "fork" version now that the fork is reconciled)
from vscode-elixir-ls.
from vscode-elixir-ls.
from vscode-elixir-ls.
Yeah, I still need to take care of elixir-lsp/elixir-ls#212 😅
I'm glad that you got it working smoothly now!
I'm going to go ahead and mark this closed from a combination of elixir-lsp/elixir-ls#190 and the fix first reported in elixir-lsp/elixir-ls#208
@sanjibukai if you're still running into issues, please file a new issue :)
from vscode-elixir-ls.
Related Issues (20)
- VSCode it keeps telling me: Could not find Hex HOT 1
- @doc on hover quit showing recently HOT 2
- Honor .formatter.exs line_length in editor.ruler HOT 4
- Running wallaby `feature` tests in VS Code HOT 3
- Confusing / harmful directions about debug_info in the README HOT 1
- Header must provide a Content-Length property error in VSCode HOT 24
- All testcases run from VS Code on Windows are always passed HOT 5
- elixirls crashes whenever I open VSCode HOT 2
- Completions broke? HOT 13
- Syntax highlighting broken in "Darcula theme for Elixir" HOT 4
- Hit return on "handle_call" completion insert extra "do" and "end" HOT 2
- elixir command check is invalid HOT 2
- Slow Formatting on First Save of Lengthy HEEx Templates
- elixir extension not supported HOT 4
- Feature request: Send to REPL/Terminal HOT 2
- Suggestion Problem HOT 1
- debugging with "Debug Test" option gets killed after a minute
- Wrong textmate scope for __MODULE__ with function call HOT 2
- How to Pass "--no-start" flag to the "mix test" command? HOT 4
- Memory and High CPU Usage HOT 43
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-elixir-ls.