Skip to content

Releases: Qqwy/elixir-type_check

v0.7.0

30 Sep 00:17
Compare
Choose a tag to compare

Version 0.7.0 has been released! rocket

Added

  • Addition of the option enable_runtime_checks. When false, all runtime checks in the given module are completely disabled. This is useful to for instance disable checks in a particular environment. (c.f. #52) Thank you, @baldwindavid!
  • Adding DateTime.t to the default overrides, as it was still missing.

0.6.0 - Addition of spectest & 'default overrides' Elixir's standard library types

26 Sep 11:06
63cbb88
Compare
Choose a tag to compare

Version 0.6.0 has been released! 🚀

Its main changes are the addition of spectests and the implementation of a very large portion of the types in all modules of Elixir's standard library.

Additions & Improvements:

  • Adding TypeCheck.ExUnit, with the function spectest to test function-specifications.
    • Possibility to use options :except, :only, :initial_seed.
    • Possibility to pass custom options to StreamData.
  • Adding TypeCheck.DefaultOverrides with many sub-modules containing checked typespecs for the types in Elixir's standard library (75% done).
    • Ensure that these types are correct also on older Elixir versions (1.9, 1.10, 1.11)
  • By default load these 'DefaultOverrides', but have the option to turn this behaviour off in TypeCheck.Option.
  • Nice generators for Enum.t, Collectable.t, String.t.
  • Support for the builtin types:
    • pid()
    • nonempty_list(), nonempty_list(type).
  • Allow use TypeCheck in IEx or other non-module contexts, to require TypeCheck and import TypeCheck.Builtin in the current scope (without importing/using the macros that only work at the module level.)
  • The introspection function __type_check__/1 is now added to any module that contains a use TypeCheck.

Fixes

  • Fixes the Inspect implementation of custom structs, by falling back to Any, which is more useful than attempting to use a customized implementation that would try to read the values in the struct and failing because the struct-type containing types in the fields.
  • Fixes conditional compilation warnings when optional dependency :stream_data was not included in your project.