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

Add and fix some type specs #139

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

Conversation

ishikawa
Copy link
Contributor

Because the Dialyzer had emitted some errors when compiling with this library, so I added/fixed some type specs.

  • Changed Ace.HTTP.Service.service to GenServer.server - GenServer.call/2 can take several type of argument other than pid.
  • Ace.HTTP.Service.start_link/2 actually invoke GenServer.start_link/3, so changed the return type of the function to GenServer.on_start which allows {:error, term} too.
  • Add type specs Ace.HTTP2.Settings.

@ishikawa
Copy link
Contributor Author

ishikawa commented Dec 31, 2019

Running the Dialyzer under Erlang 21.3 and Elixir 1.8.1 environment failed with errors (Job #630850457):

lib/ace/http2/connection.ex:37: Function init/1 has no local return
done (warnings were emitted)
The command "mix dialyzer --halt-exit-status" exited with 2.

I found that this problem could be fixed with upgrading Erlang/OTP to 21.3.8 (Job #631233171). So I changed the version of OTP in travis.yml in the commit ee43e18.

But the Dialyzer still fails under Elixir 1.7.4 environment 🤔

@CrowdHailer
Copy link
Owner

@ishikawa this might be fixed by dropping support for older Elixir versions. I am thinking of supporting 1.9 and 1.10 only from the next release.

@ishikawa
Copy link
Contributor Author

@CrowdHailer Thanks for your reply. In the meantime, I merged the master branch 😄

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.

None yet

2 participants