fun_with_flags v1.8.0 Release Notes
- ➕ Add support for Elixir 1.13. Drop support for Elixir 1.9. Elixir >= 1.10 is now required. Dropping support for older versions of Elixir simply means that this package is no longer tested with them in CI, and that compatibility issues are not considered bugs.
- Removed all uses of
defdelegate/2. They caused some references to configured modules (that can change according to the config) to be reified at compile time, which lead to unexpected behaviour. They've been replaced with plain old function definitions that do the same job. (Thanks connorlay, pull/111.)
- ⚡️ Local dev: Update the config for the library to use
Configinstead of the deprecated
Mix.Config. For the avoidance of doubt: this has no effect when using the package in your projects, because the
config/*.exsfiles are not present in the bundles downloaded from Hex.pm.
Application.compile_env/3to read the cache configuration at compile-time, which is used to define a module attribute (therefore, set at compile-time). That part of the config is compiled into a module attribute for performance reasons, and it has been a long standing issue because users of the package would get confused by their config changes not being reflected in an already compiled application (link to relevant section in previous version of the readme). Now, if the relevant configuration changes, users will get a clear error.
- Improve error handling in different layers of the package. From the persistence adapters all the way to the public functions of the top-level module. In practice, this means that some situations that would have caused a
MatchErrornow instead will bubble up an error tuple. Most importantly, this does not affect the signature or behaviour of the
FunWithFlags.enabled?/2function, which continues to return a simple boolean. (pull/120)
- Typespec improvements. These include new typespecs for previously unspecced functions, amended typespecs for the new error tuples that are now bubbled up (see previous point) and fixed typespec that incorrectly ignored a returned error tuple. (pull/120)
- The typespecs for the
FunWithFlags.Store.PersistenceElixir behaviour have been updated (see previous point). Users of the package who implemented their own custom persistence adapters are encouraged to double-check that these respect the typespecs. (pull/120)