Skip to content

v0.6.0

Compare
Choose a tag to compare
@msz msz released this 05 Jun 17:29
· 53 commits to master since this release
95ff46e

New features

Multiple behaviour support in Hammox.Protect and Hammox.protect/2 [#93]

use Hammox.Protect now accepts multiple :behaviour options:

use Hammox.Protect, module: My.Module, behaviour: My.Module.Contract, behaviour: My.Module.OtherContract

Which is functionally equivalent to:

use Hammox.Protect, module: My.Module, behaviour: My.Module.Contract
use Hammox.Protect, module: My.Module, behaviour: My.Module.OtherContract

Likewise, Hammox.protect/2 now additionally supports a list of behaviours as second argument:

Hammox.protect(My.Module, [My.Module.Contract, My.Module.OtherContract]),

Big thanks to @camilleryr for submitting these changes.

Bug fixes

  • Complex multiline typespecs no longer cause a CaseClauseError with recent versions of Elixir when Hammox tries to print them [#113]
  • The bool() type is now correctly supported and no longer causes an exception [#115]
  • Type guards are now correctly supported and no longer cause an exception [#116]
  • Fixes incorrect usage of Code.ensure_compiled/1 [#111] (thanks to @Adzz)

Other