Enhancement
58 changes
Add Application.compile_env/3 and Application.compile_env!/2 for reading values at compilation time and tracking if they accidentally change during runtime
Allow custom calendar representations in calendar sigils
Add c:Calendar.parse_time/1, c:Calendar.parse_date/1, c:Calendar.parse_naive_datetime/1 and c:Calendar.parse_utc_datetime/1 callbacks to calendar behaviour
Add support for NO_COLOR environment variable
Add :token_metadata and :literal_encoder support to Code.string_to_quoted/2
Add compiler tracing to lift events done by the compiler
Return {:error, :unavailable} in Code.ensure_compiled/1 if module is in a deadlock
Add DateTime.now!/2 and DateTime.shift_zone!/3
Speed up getting one random element from enumerables
Add Enum.frequencies/1, Enum.frequencies_by/2, and Enum.map_intersperse/2
Allow a sorting function on Enum.min/max/min_by/max_by
Add asc/desc and compare/1 support to Enum.sort/2
Add version alongside app names in stacktraces
Add Function.identity/1
Add Kernel.is_struct/1 and Kernel.is_map_key/2
Warn when function head comes immediately after the implementation instead of before the implementation
Warn if duplicate key is found in struct declaration
Print all undefined functions as warnings and then raise. This allows users to see all undefined calls at once, when it would otherwise require them to compile the code multiple times
Add Keyword.pop!/2 and Keyword.pop_values/2
Add Map.pop!/2
Optimize multiple operations
Add Module.has_attribute?/2
Add @compile {:no_warn_undefined, mfa_or_module} to turn off undefined function warnings
Add NaiveDateTime.local_now/0
Warn if duplicate key is found in record declaration
Update to Unicode 12.1
Add :encoding option to StringIO and optimize get_chars operation
Support diffs in pattern matching and in assert_receive
Supports capturing named devices in asynchronous tests
Warn on circular file imports when loading default .iex.exs
Allow customization of the continuation prompt on IEx
Allow start_options to be configured on Logger's GenEvent
Integrate Elixir's Logger with Erlang/OTP 21+'s logger. This means setting up the logger level in Elixir will automatically change the logger level for Erlang and vice-versa
Add --profile time flag to profile compilation steps
Add --skip-umbrella-children flag. The new flag does not compile umbrella apps. This is useful for building caches in CD/CI pipelines
Add --check-unused flag. The new flag raises if there are any unused dependencies in the lock file
Allow RELEASE_DISTRIBUTION to be set to none
Support overlays in rel/overlays
Allow configuration reboot to be disabled in releases
Add support for simple round-robin test partitioning across multiple machines
Add MIX_DEPS_PATH environment variable for setting :deps_path
Add Mix.Project.deps_scms/1 that returns deps with their SCMs
Add Mix.Task.Compiler.after_compiler/2 callback, to simplify compilers that may need to run something at multiple steps
compiler_options/0 is deprecated in favor of compiler_option/1
Mix.Config.persist/1 has been deprecated. Instead of Mix.Config.persist(config) use Application.put_all_env(config, persistent: true) (Application.put_all_env/2 was added in v1.9)
calls/0 is deprecated in favor of compiler tracer
The xref.exclude option has been moved to elixirc_options.no_warn_undefined as the xref pass has been moved into the compiler
Code.load_file/2 has been deprecated in favor of Code.require_file/2 or Code.compile_file/2
Code.loaded_files/0 and Code.unload_file/1 have been deprecated in favor of Code.required_files/0 and Code.unrequire_file/1 respectively
Code.ensure_compiled?/1 is deprecated in favor of Code.ensure_compiled/1
String.normalize/2 has been deprecated in favor of :unicode.characters_to_nfc_binary/1 or :unicode.characters_to_nfd_binary/1 which ship as part of Erlang/OTP 20+
Supervisor.Spec.supervise/2 has been deprecated in favor of the new Supervisor child specification
The :simple_one_for_one strategy in Supervisor has been deprecated in favor of DynamicSupervisor
:compile_time_purge_level application environment configuration has been deprecated in favor of the more general :compile_time_purge_matching config
Deprecate logging non-chardata values
This check has been moved into the compiler and has no effect now
This check has been moved into the compiler and has no effect now
This check has been moved into the compiler and has no effect now