-
Notifications
You must be signed in to change notification settings - Fork 194
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
"Build failed for unknown reason" and entirety of mix.exs red underlined #597
Comments
For one project, here is the output log where ElixirLS fails. I tested and see that running
|
Any thoughts on this one? I'm still having this issue. |
I've had this issue a couple of times, I'm not sure if these exact steps make it work but I've done this: For context: plugins=(git asdf) The actual steps: # Completely quit from VSCode GUI
# In your project's root folder:
# Remove deps and compiled files
rm -rf deps _build .elixir_ls
# Delete the extension included dialyxir
rm ~/extensions/jakebecker.elixir-ls-0.8.1/elixir-ls-release/dialyxir-1.1.0.ez
code . Check in VSCode Output > ElixirLS. After some compilation and analysis it should show something like this:
|
I'm having a related problem where mix.exs is fully red highlighted with this error
yet I can run mix compile and run the application with no problems. |
@alexfariac I had resolved this issue by getting deps 😀 (and waiting for indexing) - |
Please head to Troubleshooting section in the README and use elixir forum for support |
Hi @lukaszsamson. Can you give more details why this is closed with a comment pointing to a troubleshooting section or forum? The fact that there are various troubleshooting steps or workarounds (that sometimes work and sometimes don't) doesn't make this not a bug. By just closing this with no details or investigation, there is ambiguity. If the ElixirLS team has decided that this is a Lastly, if there's no way of preventing this issue from occurring, is it possible that ElixirLS could detect when the issue has occurred and automatically perform the troubleshooting steps itself? |
I am seeing this on several of my projects. I have tried various trouble shooting stuff (e.g. #597 (comment)) and it hasn't helped. I really do think it is a bug in the plugin, it should be able to tell you what the actual error is. "Can't continue due to errors on dependencies" makes look very much like the real errors on the dependencies are not being shown. From the command line there are no errors with the project. This in turn makes the plugin version much unreliable, and I can't depend on it working. |
Hello! I am tagging @axelson, @NobbZ, @Trevoke, and @asummers since you four are listed as the people in the In the original issue, I listed four separate reports of this issue, listed here again:
Note that in the original description comment, there is a link to a reproduction of this issue from scratch. Additionally, this has been reported in the Elixir Forum in other posts: I understand that people are busy and this is all volunteer and that anyone isn't being made to fix something. What I don't understand is why this issue is just closed without even addressing or discussing the issue. A summary of the problem:
So I think that this issue should remain open until fixed and not just closed. If the ElixirLS team or contributors do not ever want to fix it, then I think that should be clearly stated but the issue still left open for the case of someone coming along who wants to fix it. The additional benefit of clear communication, rather than closing this and hoping it goes away and telling people to go somewhere else, is that people understand the status of ElixirLS and whether or not to look for other tools or look into contributing themselves. If an issue is buried by being closed, it prevents those things from happening. |
My opinion on this is that it's a known issue with known (or at leas easily findable) workarounds. Even more, in the coming up version I added custom command to restart elixir-ls (elixir-lsp/vscode-elixir-ls#218). This is enough a reason to close it. |
The work arounds often don't work. At least that has been my experience. Also if it was a known issue, the issue itself should be documented somewhere. Documenting workarounds for a known issue isn't the same thing as documenting the issue - why it occurs, what triggers it, etc. Later: Also forgot to say if it is a known issue, it should still be documented in an open bug report. |
Sorry to hear that @brianmay but it's open source software that people work on in their free time. Would you like me or other community members to offer paid support?
It is documented in https://github.com/elixir-lsp/elixir-ls#troubleshooting, though I admit not very throughly. Care to improve it?
That's disputable. Open bugs that are not workable only clutter the issues section. Elixir lang only keeps a handful of issues open and closes all other. Fortunately github has search function. |
I use elixir for open source projects, as such I don't really have funds to offer for paid support. I am not getting any income from my Elixir work either.
Yes, it definitely is the trend that maintainers will close bug reports that they "don't won't to look at" or "have been open too long". e.g. just recently I saw a maintainer of a project close a critical security bug, because fixing it would require a significant redesign. As a result people casually looking at the project would not know it suffered from a serious security issue. It is likely in the future that people will rediscover this security issue and open up new bug reports, which take the maintainers time to process and close. Where I come from, bugs are only closed under set conditions. e.g. if it was fixed. Or it never was a bug. Or if it was a duplicate. That allows easy searching of bugs that are still open and have not been fixed yet. It also allows others to see what bugs have not been fixed and to offer help. Also github has a "tags" feature. e.g. It is possible to mark a bug "wontfix" and then exclude "wontfix" bugs from the list of bugs. If this is not enough, the projects feature - with significant improvements in beta(*), offers other ways to sort through bugs, without having to close bug reports for bugs that have not been resolved. But getting back on topic, we don't necessarily need a complete fix here. But maybe if we had some assistance to be able to debug what was going wrong. It might be some simple expectation about my project that isn't correct. Unfortunately the error message given is very generic, and doesn't tell us what is going wrong. I have no idea how to debug this. e.g. is there some command we can use to demonstrate the problem outside visual code? (*) at least last I checked it was still in beta. |
Do anyone have a simple project that reproduces this reliably? |
@lukaszsamson I can point you to any one of my projects where this happens. e.g. https://github.com/brianmay/phone_db/ I have a sneaky suspicion that the problem might depend on some unknown aspect on my system, and if you tried to reproduce the problem it is going to work for you. In fact, I just deleted the
But curiously, syntax highlighting seems to be working despite this error. |
As mentioned above, I could have debugged this more when I first reported it over a year ago, but I am no longer working at the company with the large Elixir codebases I reliably saw this in and do not currently use Elixir in my day job. I have smaller personal codebases where I do not see this issue at present. Those codebases are highly curated in the sense that they are fully typespecced, have clean dependencies, and are compliant with Dialyzer and Credo, so I would expect those codebases to have less issues. However, there are often flashes of it in that the entirety of |
@brianmay I cannot reproduce this on current master using your repo. |
I'm convinced that big part of that errors was a duplicate of #120. This bug is fixed in 031bd0a which will be part of 0.12 release. I'm going to close the issue now. If anyone has a reliable repro steps, which is not a duplicate of #120 and is reproducible on current master then please open a new issue |
In Visual Studio Code (VSCode), ElixirLS consistently reports a problem with
mix.exs
, sayingBuild failed for unknown reason. See output log.
This makes the entirety ofmix.exs
to be red underlined.The issue causes problems with ElixirLS' autocomplete and intellisense features. This happens across many Elixir projects and repositories.
This has been reported before.
rm -rf deps _build .elixir_ls
, runmix deps.get
, and then reopen VSCode. However, as soon as you make any change to your dependencies, the problem often returns.Environment
Elixir 1.11.4 (compiled with Erlang/OTP 23)
macOS Catalina, version 10.15.7
VSCode
ElixirLS v0.8.0
Troubleshooting
.elixir_ls
directory, then restart your editorIf you're experiencing high CPU usage, it is most likely Dialyzer building the PLTs; after it's done the CPU usage should go back to normal. You could also disable Dialyzer in the settings.
Logs
Yes
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.This issue seems to occur with any Elixir project with dependencies.
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.)I will need to check this output log on several repositories and can post a follow-up. However, this problem seems to be systemic with ElixirLS and not specific to any one repository.
Help > Toggle Developer Tools
and include any errors that look relevant.I haven't seen anything relevant there.
The text was updated successfully, but these errors were encountered: