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

error while running dialyxir #523

Closed
epinault opened this issue Nov 8, 2023 · 2 comments · Fixed by #541
Closed

error while running dialyxir #523

epinault opened this issue Nov 8, 2023 · 2 comments · Fixed by #541

Comments

@epinault
Copy link
Contributor

epinault commented Nov 8, 2023

Precheck

Per #467 , opening a new issue., Will see if I can get a repro from private code

Environment

  • Elixir & Erlang/OTP versions (elixir --version): elixir 1.15, OTP 26

  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): 1.4.2

Current behavior

Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.
Unknown error occurred: %FunctionClauseError{module: Dialyxir.Warnings.InvalidContract, function: :format_long, arity: 1, kind: nil, args: nil, clauses: nil}
Legacy warning:
lib/halberd_client/http_client.ex:10: Invalid type specification for function 'Elixir.HalberdClient.HTTPClient':get/2.
The success typing is 'Elixir.HalberdClient.HTTPClient':get(binary(),'nil' | maybe_improper_list() | map()) -> {'error',} | {'ok',#{'client':=#{'struct':='Elixir.Tesla.Client', 'adapter':='nil' | {,} | {,,}, 'fun':=, 'post':=[any()], 'pre':=[any()]}, 'module':=atom(), 'struct':='Elixir.Tesla.Env', 'body':=, 'headers':=[{,}], 'method':='delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace', 'opts':=[{,}], 'query':=[{,}], 'status':='nil' | integer(), 'url':=binary()}}
But the spec is 'Elixir.HalberdClient.HTTPClient':get('Elixir.Tesla.Env':url(),'Elixir.Tesla':option()) -> 'Elixir.Tesla.Env':result()
They do not overlap in the 2nd argument

Expected behavior

  • A short description of the expected behavior.
@epinault
Copy link
Contributor Author

thanks for fixing this? when do you think we can get this released?

@jeremyjh
Copy link
Owner

Hi, just released 1.4.4 on Hex.

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 a pull request may close this issue.

2 participants