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

Dialyzer and erlang 26.0.2 elixir 1.15.6 #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

visciang
Copy link
Contributor

This PR address the following points

  • Running on elixir 1.15.6 and erlang 26.0.2, mix dialyzer results in the following error:

    Generated optimus app
    Finding suitable PLTs
    Checking PLT...
    [:dialyxir, :elixir, :ex_doc, :kernel, :logger, :ssl, :stdlib]
    Looking up modules in dialyxir_erlang-26.0.2_elixir-1.15.6_deps-dev.plt
    ** (UndefinedFunctionError) function :dialyzer_plt.plt_kind/1 is undefined (module :dialyzer_plt is not available)
        (dialyzer 5.1) :dialyzer_plt.plt_kind(~c"/Volumes/Code/personal/optimus_savonarola/_build/dev/dialyxir_erlang-26.0.2_elixir-1.15.6_deps-dev.plt")
        (dialyzer 5.1) dialyzer.erl:294: :dialyzer.plt_info/1
        (dialyxir 1.3.0) lib/dialyxir/plt.ex:243: Dialyxir.Plt.plt_files/1
        (dialyxir 1.3.0) lib/dialyxir/plt.ex:16: Dialyxir.Plt.find_plts/3
        (dialyxir 1.3.0) lib/mix/tasks/dialyzer.ex:254: Mix.Tasks.Dialyzer.check_plt/1
        (dialyxir 1.3.0) lib/mix/tasks/dialyzer.ex:174: Mix.Tasks.Dialyzer.run/1
        (mix 1.15.6) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
        (mix 1.15.6) lib/mix/cli.ex:92: Mix.CLI.run_task/2
    
  • The type Optimus.t() is defined as opaque but actually it is used by other Optimus modules as a non opaque type. This is detected by dialyzer application side, for example:

    optimus = Optimus.new!(...)
    
    Optimus.help(optimus)  #  <--
    Optimus.fetch_subcommand(optimus, subcommand_path)  #  <--
    

    results in

    lib/dake/cli_args.ex:104:call_with_opaque
    The call Optimus.help(_optimus@1::'Elixir.Optimus':t()) contains an opaque term in 1st argument when a structured term of 
    type atom() | #{'name':=_, _=>_} is expected}.
    ________________________________________________________________________________
    lib/dake/cli_args.ex:107:call_with_opaque
    The call Optimus.fetch_subcommand(_optimus@1::'Elixir.Optimus':t(),_subcommand_path@1::[atom(),...]) contains an 
    opaque term in 1st argument when terms of different types are expected in these positions}.
    ________________________________________________________________________________
    

@coveralls
Copy link

coveralls commented Sep 28, 2023

Coverage Status

coverage: 90.72%. remained the same
when pulling 6b271bb on visciang:master
into 411646b on savonarola:master.

@visciang visciang marked this pull request as ready for review September 28, 2023 21:21
@QMalcolm
Copy link

I would like to further move to erlang 27.1.2 and elixir 1.17.3. Has there been any movement on this?

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

Successfully merging this pull request may close these issues.

3 participants