Compatibility and Deprecations
Elixir is versioned according to a vMAJOR.MINOR.PATCH schema.
Elixir is currently at major version v1. A new backwards compatible minor release happens every 6 months. Patch releases are not scheduled and are made whenever there are bug fixes or security patches.
Elixir applies bug fixes only to the latest minor branch. Security patches are available for the last 5 minor branches:
|1.10||Bug fixes and security patches|
|1.9||Security patches only|
|1.8||Security patches only|
|1.7||Security patches only|
|1.6||Security patches only|
There are currently no plans for a major v2 release.
Elixir minor and patch releases are backwards compatible: well-defined behaviours and documented APIs in a given version will continue working on future versions.
Although we expect the vast majority of programs to remain compatible over time, it is impossible to guarantee that no future change will break any program. Under some unlikely circumstances, we may introduce changes that break existing code:
Security: a security issue in the implementation may arise whose resolution requires backwards incompatible changes. We reserve the right to address such security issues.
Bugs: if an API has undesired behaviour, a program that depends on the buggy behaviour may break if the bug is fixed. We reserve the right to fix such bugs.
Compiler front-end: improvements may be done to the compiler, introducing new warnings for ambiguous modes and providing more detailed error messages. Those can lead to compilation errors (when running with
--warning-as-errors) or tooling failures when asserting on specific error messages (although one should avoid such). We reserve the right to do such improvements.
Imports: new functions may be added to the
Kernelmodule, which is auto-imported. They may collide with local functions defined in your modules. Collisions can be resolved in a backwards compatible fashion using
import Kernel, except: [...]with a list of all functions you don't want to be imported from
Kernel. We reserve the right to do such additions.
In order to continue evolving the language without introducing breaking changes, Elixir will rely on deprecations to demote certain practices and promote new ones. Our deprecation policy is outlined in the "Deprecations" section.
The only exception to the compatibility guarantees above are experimental features, which will be explicitly marked as such, and do not provide any compatibility guarantee until they are stabilized.
Erlang/OTP versioning is independent from the versioning of Elixir. Each version of Elixir supports a specific range of Erlang/OTP versions. The compatibility table is shown below.
|Elixir version||Supported Erlang/OTP versions|
|1.0||17 - 17 (and Erlang/OTP 18 from v1.0.5)|
|1.1||17 - 18|
|1.2||18 - 18 (and Erlang/OTP 19 from v1.2.6)|
|1.3||18 - 19|
|1.4||18 - 19 (and Erlang/OTP 20 from v1.4.5)|
|1.5||18 - 20|
|1.6||19 - 20 (and Erlang/OTP 21 from v1.6.6)|
|1.7||19 - 22|
|1.8||20 - 22|
|1.9||20 - 22|
|1.10||21 - 22 (and Erlang/OTP 23 from v1.10.3)|
|1.11||21 - 23|
While Elixir often adds compatibility to new Erlang/OTP versions on released branches, such as support for Erlang/OTP 20 in v1.4.5, those releases usually contain the minimum changes for Elixir to run without errors. Only the next minor release, in this case v1.5.0, does effectively leverage the new features provided by the latest Erlang/OTP release.
Elixir deprecations happen in 3 steps:
The feature is soft-deprecated. It means both CHANGELOG and documentation must list the feature as deprecated but no warning is effectively emitted by running the code. There is no requirement to soft-deprecate a feature.
The feature is effectively deprecated by emitting warnings on usage. This is also known as hard-deprecation. In order to deprecate a feature, the proposed alternative MUST exist for AT LEAST THREE minor versions. For example,
Enum.uniq/2was soft-deprecated in favor of
Enum.uniq_by/2in Elixir v1.1. This means a deprecation warning may only be emitted by Elixir v1.4 or later.
The feature is removed. This can only happen on major releases. This means deprecated features in Elixir v1.x shall only be removed by Elixir v2.x.
The first column is the version the feature was hard deprecated. The second column shortly describes the deprecated feature and the third column explains the replacement and from which the version the replacement is available from.
|Version||Deprecated feature||Replaced by (available since)|
|v1.10|| app environment|| app environment (v1.7)|
|v1.9|| on the second argument before hand (v1.0)|
|v1.8||, and the like||, and so on (v1.4)|
|v1.8||'s callback|| (v1.6)|
|v1.7|| callbacks|| (v1.0)|
|v1.6|| to traverse over the arguments (v1.0)|
|v1.6|| module attribute (v1.0)|
|v1.5|| type|| type (v1.3)|
|v1.5|| comprehensions (v1.0)|
|v1.5|| module|| (Erlang/OTP 17)|
|v1.5|| is allowed only in start expressions) (v1.0)|
|v1.5|| type|| value (v1.3)|
|v1.5|| type|| key (v1.3)|
|v1.5|| with a binary padding (v1.3)|
|v1.5|| with a binary as second argument (v1.3)|
|v1.4||overridableprivate functionsSupport for making||(v1.0)public functionsUse|
|v1.4||Variable used as function call||Use parentheses (v1.0)|
|v1.4|| module|| module attribute (v1.0)|
|v1.4|| (Erlang/OTP 17)|
|v1.4|| (Erlang/OTP 17)|
|v1.4|| module|| (v1.2)|
|v1.4|| module|| (v1.1)|
|v1.4||Use single-letter aliases (v1.0)|
|v1.4|| module|| (v1.1)|
|v1.3|| inside strings/sigils/charlists|| (v1.1)|
|v1.3|| module|| (v1.2)|
|v1.3||Define the function explicitly (v1.0)|
|v1.3|| behaviour|| data structure (v1.1)|
|v1.3||Use direct message matching (v1.0)|
|v1.3||Use a map (v1.0)|
|v1.2|| behaviour|| data structure (v1.1)|
|v1.1|| protocol|| behaviour (v1.1)|