Elixir v1.15 Released, Functional Programming Language

Elixir v1.15 has been released, a minor version update that mainly improves compilation and startup times. An integration with the Erlang/OTP logger has also been completed, bringing new features such as log rotation and compression out of the box.

  • Improve compilation and startup times

Elixir now caches and prunes load paths before compilation, ensuring projects (and dependencies) compile faster in closer-to-production environments.

In short, because the Erlang VM loads modules from the code path. Every application and every dependency that ships with Erlang and Elixir becomes an entry in the code path. So the larger the code path, the more work Erlang has to do to find the module.

In previous versions, Mix would only add entries to the load path. So, if you compile 20 dependencies, and then go to compile the 21st dependency, the code path will have 21 entries (plus all Erlang and Elixir applications). Since this allows modules from unrelated dependencies, and the more dependencies there are, the slower compilation will be.

The new version now trims code paths to only those listed as dependencies, bringing the behavior closer  mix release .

The effect is as follows:

  • Integrated Erlang/OTP logger

This release provides additional features such as global logger metadata and file logging out of the box.

The new release also soft-deprecates Elixir's Logger backend in favor of Erlang's Logger handlers. Elixir will automatically  :console convert the backend configuration to the new configuration. The previous configuration was:

config :logger, :console,
  level: :error,
  format: "$time $message $metadata"

now becomes:

config :logger, :default_handler,
  level: :error

config :logger, :default_formatter,
  format: "$time $message $metadata"

See the release announcement for details .

Guess you like

Origin www.oschina.net/news/246221/elixir-v1-15-0-released