peburrows / goth

Elixir package for Oauth authentication via Google Cloud APIs
http://hexdocs.pm/goth
MIT License
289 stars 111 forks source link

Fix dialyzer errors stemming from mis-specced functions with new `sub` parameter #34

Closed GoNZooo closed 6 years ago

GoNZooo commented 6 years ago

The new sub parameter for a few of the Token functions has a default value of nil, but this wasn't reflected in the type spec. This meant that dialyzer simply concluded that the function could never finish and so anything that used these functions simply propagated that.

I noticed this because entire trees of execution in one of our projects were marked as having no local return, so this error bubbles up to the top, making dialyzer effectively useless for whatever uses `Goth .

This also addresses #31

peburrows commented 6 years ago

Thanks! I'll get a new version pushed to hex.pm soon.