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

Does not work on elixir 1.10 #92

Closed
7 tasks done
lukaszsamson opened this issue Jan 9, 2020 · 8 comments
Closed
7 tasks done

Does not work on elixir 1.10 #92

lukaszsamson opened this issue Jan 9, 2020 · 8 comments

Comments

@lukaszsamson
Copy link
Collaborator

lukaszsamson commented Jan 9, 2020

@josevalim
Copy link

Things like Mix.State is also a private API, so please don't continue using private APIs. Open up an issue so we provide a public API for you to call.

About the dialyzer one, please provide a project that reproduces the error. I am assuming mix dialyze or similar reproduces it? It does look like an Elixir bug.

@axelson
Copy link
Member

axelson commented Jan 11, 2020

@lukaszsamson thanks for putting this list together and tracking down these issues!

@josevalim Posted on elixir-lang-core https://groups.google.com/forum/#!topic/elixir-lang-core/_LrWhl-kUZY (although re-reading your comment, perhaps I should have just raised an issue directly). Although in either case, this is just one of the private api usages, I'll try and do a sweep to look for the others.

@lukaszsamson
Copy link
Collaborator Author

@josevalim I looked deeper into dialyzer issue. It turns out that dialyzer is not required to trigger it at all and it might be a consequence of the fixtures used in this project.

I am able to reproduce from the root of this repo

$ iex -S mix
Interactive Elixir (1.10.0-rc.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> mixfile = "apps/language_server/test/fixtures/dialyzer/mix.exs"         
"apps/language_server/test/fixtures/dialyzer/mix.exs"
iex(2)> Kernel.ParallelCompiler.compile([mixfile])                              
{:ok, [ElixirLS.LanguageServer.Fixtures.Dialyzer.Mixfile], []}
iex(3)> Mix.Task.run("compile", ["--return-errors", "--ignore-module-conflict"])

19:44:23.319 [error] Task #PID<0.524.0> started from #PID<0.541.0> terminating
** (MatchError) no match of right hand side value: false
    (elixir 1.10.0-rc.0) src/elixir_erl_var.erl:14: :elixir_erl_var.translate/4
    (stdlib 3.11) lists.erl:1354: :lists.mapfoldl/3
    (elixir 1.10.0-rc.0) src/elixir_erl_clauses.erl:20: :elixir_erl_clauses.match/3
    (elixir 1.10.0-rc.0) src/elixir_erl_clauses.erl:28: :elixir_erl_clauses.clause/6
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:230: :elixir_erl.translate_clause/3
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:220: :elixir_erl."-translate_definition/4-lc$^0/1-0-"/2
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:220: :elixir_erl.translate_definition/4
    (elixir 1.10.0-rc.0) src/elixir_erl.erl:183: :elixir_erl.split_definition/11
Function: #Function<9.64842280/0 in Mix.Tasks.Compile.Protocols.consolidate/6>
    Args: []

It seems that the protocol defined upper in directory hierarchy ends up in the fixture dir
Screenshot 2020-01-11 at 20 05 45

@josevalim
Copy link

I am looking into this now. Thank you so much for isolating those, it makes my life much easier!

@josevalim
Copy link

@lukaszsamson so the command above compiled just fine for me. I am thinking you have some stale files somewhere. Try running git clean -dfx and removing _build and deps. Or try a separate checkout and see if you can reproduce it there.

@lukaszsamson
Copy link
Collaborator Author

@josevalim yes, it must have been some stale state. I remember doing mix clean && mix deps.clean --all && rm -r .elixir_ls though, it seems this was not enough. Anyway, thanks for your help.

@axelson
Copy link
Member

axelson commented Jan 20, 2020

@lukaszsamson regarding "tests crash mix" I'm actually seeing that same error locally on 1.9.1, it's just not failing the CI builds.

@lukaszsamson
Copy link
Collaborator Author

Yep, I can confirm it also on 1.9.4. I'm going to create a separate isse.

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

No branches or pull requests

3 participants