-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Elixir 1.15 #512
Elixir 1.15 #512
Conversation
@jeremyjh it would be helpful to me if you can approve the workflow so the CI can run. I have to switch in local right now to test between them. |
a3d7da8
to
0fa00da
Compare
I changed the workflow settings so it shouldn't prompt again. |
@danschultzer FYI: I just got around to engaging those errors for my own project. For what it's worth, I cleaned up tests with this commit. Some additions are reasonable while others are clearly kludges, but none of the added I plan to take a similar inventory of the various errors observed while running as an archive with |
09fd7a2
to
0ea8535
Compare
Thanks @jonnystorm! I noticed that the dialyxir load path disappears with certain test cases using This may break in the future and I would rather ensure that the @jeremyjh this should be ready for review! |
Hi is there a plan to merge this soon? Wondering if I should explore a workaround / hold off on upgrading etc... any timelines would be super helpful. Thanks for all the great work folks! |
lib/mix/tasks/dialyzer.ex
Outdated
if Version.match?(System.version(), ">= 1.15.0") do | ||
defp check_dialyzer do | ||
if function_exported?(Mix, :ensure_application!, 1) do | ||
Mix.ensure_application!(:dialyzer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this raises - for example because they installed erlang on debian without dialyzer - is it obvious what the user needs to do next? That is why we are printing the extended error message in the other branch of this top-level if. I think we should trap this and print the message in this case as well, maybe just move the message itself to separate function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the message printed: https://github.com/elixir-lang/elixir/blob/a94700f861706482f6fe7f5abb884f235763db6f/lib/mix/lib/mix.ex#L622-L627
Which would read as:
The application "dialyzer" could not be found. This may happen if your
Operating System broke Erlang into multiple packages and may be fixed
by installing the missing "erlang-dev" and "erlang-dialyzer" packages
It should be clear enough right?
@danschultzer @elishagreenwald Hi guys, sorry to leave this languishing, I'd somehow missed it was complete. Been super busy lately. I have just a couple of small asks to change before we merge. |
[app: :local_plt_no_warn, version: "1.0.0", dialyzer: [plt_file: {:no_warn, "local.plt"}]] | ||
[ | ||
app: :local_plt_no_warn, | ||
prune_code_paths: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prune_cod_paths is a workaround for apps that aren't specifying all their runtime dependencies. Could add dialyzer to extra_applications instead? I don't think prune_code_paths
is what we want to recommend people do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's Dialyxir that gets pruned, and I haven't been able to find a way to prevent Elixir from pruning it. Halfway through the tests all the Dialixir modules are gone. I've tried extra_applications
, and setting it as a dep. Only thing I've found to work is to setting that flag.
This could break in the future, so it would be nice to find a better solution, but I haven't figured out why Mix.Project.in_project
would cause the dialixir code paths to be pruned in the first place.
0ea8535
to
771a2fb
Compare
Resolves #511
This uses
Mix.ensure_application!/1
instead ofCode.ensure_loaded?/1
. This is similar to how missing erlang libraries are dealt with in other repos:nccgroup/sobelow#143
phoenixframework/tailwind@68185c7
This PR also tests on Elixir 1.15 and OTP 26, but there are issues getting the tests to succeed. I'll see if I can get the tests to succeed.