Enhancement
94 changes
Include source code snippets in syntax errors
Add support for epoch time (%s) to Calendar.strftime/2
Code.format_string!/2 now converts 'charlists' into ~c"charlists" by default
Add :on_undefined_variable to the compiler options to preserve the warning behaviour which was deprecated back in Elixir v1.4
Add Code.loaded?/1 and Code.ensure_all_loaded(!)/1
Add Code.prepend_paths/1, Code.append_paths/1, and Code.delete_paths/1
Add Code.with_diagnostics/2 to return diagnostics when compiling and evaluating code
Support nested expressions in Code.Fragment.cursor_context/1
Keep operators and no paren calls in Code.Fragment.container_cursor_to_quoted/1
Add Date.before?/2 and Date.after?/2
Add DateTime.before?/2 and DateTime.after?/2
Support precision in DateTime.utc_now/2
Support distributed File.Stream
Inspect now renders 'charlists' as ~c"charlists" by default
Break down case and cond inside dbg/2
Add t:nonempty_binary/0 and t:nonempty_bitstring/0
Treat @behaviours as runtime dependencies
Do not add runtime dependencies for alias references in patterns and guards
Warn for nested calls without parens inside keywords
Support for multi-letter uppercase sigils
Introduce mechanism to collect several errors in a module. Previously, as soon as there was a compilation error, compilation would fail. Now the compiler became a bit smarter and will report multiple errors whenever possible as multiple error: ... messages, similar to warning: ...
Raise instead of warning on undefined variables. Previously, an undefined variable would attempt to invoke a function of the same name, which led to confusing error messages, especially to newcomers. To enable the previous behaviour, invoke Code.compiler_options(on_undefined_variable: :warn) at the top of your mix.exs
Support --sname undefined/--name undefined so a name is automatically generated
Add Keyword.split_with/2
Improve error message when piping into an expression ending in bracket-based access
Add Macro.Env.lookup_alias_as/2
Add Map.split_with/2
Add Map.intersect/2 and Map.intersect/3
Add MapSet.split_with/2
Optimize most functions
Add NaiveDateTime.beginning_of_day/1 and NaiveDateTime.end_of_day/1
Add NaiveDateTime.before?/2 and NaiveDateTime.after?/2
Support precision in NaiveDateTime.utc_now/2
Mark functions as generated in "Docs" chunk
Add Module.get_last_attribute/3
Support :return_separator option
Add Process.alias/0,1 and Process.unalias/1
Add Range.split/2
Update Unicode to version 15.0.0
Add :fast_ascii mode to String.valid?/2
Add support for automatic shutdown in Supervisor
Support :lines in System.cmd/3 to capture output line by line
Remove head of line blocking on Task.yield_many/2
Enable selective receive optimizations in Erlang/OTP 26+
Reduce tasks footprint by avoiding unecessary work during spawning
Do not copy args on temporary Task.Supervisor.start_child/2
Add Time.before?/2 and Time.after?/2
Add URI.append_path/2
Add more color configuration to ExUnit CLI formatter
Accept {module, function} tuples in ExUnit setup callbacks
Add ExUnit.Case.get_last_registered_test/1
Add ExUnit.DocTest.doctest_file/2
Include doctest_data in doctest tags
When comparing two anonymous functions, defined at the same place but capturing a different environment, we will now also diff the environments
Make pry opt-in on dbg with --dbg pry
Support IEX_HOME
Only provide aliases when autocompleting alias, import, and require
Provide field completion on map and struct updates
Add runtime_info(:allocators)
Implement protocol for Range, DateTime, and Regex
Add Logger.add_handlers/1 and Logger.default_formatter/1
Introduce default_formatter and default_handler configuration for Logger which configures Erlang/OTP logger
Add :always_evaluate_messages configuration to Logger
Implement the Erlang Logger formatter API
Add support for ports in Logger metadata
Allow applications to be started concurrently via the :start_concurrently configuration
Set --all-warnings by default
Reduce the amount of filesystem lookups for path dependencies by storing timestamps in manifests
Track digests of @external_resources
Write optional_applications to .app file
Add --purge-consolidation-path-if-stale which will purge the given consolidation path if compilation is required
Automatically recompile dependencies if their compile env changes
Automatically install Hex and Rebar on mix deps.get/mix deps.update
Support --check-locked which raises if changes to the lockfile are required
Allow passing additional arguments
Support --no-exit option
Allow multiple formatters per file extension and sigil
Show diffs whenever --check-formatted fails
Allow the formatting root to be configured
Cache deps and archive loadpaths in Erlang/OTP 26
Support --trace-to-file to improve performance when working with large outputs
Allow passing additional arguments to the eval command
Support --output flag
Support def cli to unify all CLI defaults in a single place
Add Mix.Project.deps_tree/1
File.cp/3 and File.cp_r/3 with a function as third argument
Require pin variable when accessing variable inside binary size in match
Require the :return_diagnostics option to be
add_backend/2, remove_backend/2, and configure_backend/2 have been deprecated
The :console configuration has been deprecated in favor of :default_formatter
The :backends configuration has been deprecated in favor of Logger.add_handlers/1
:preferred_cli_env is deprecated in favor of :preferred_envs in def cli
:preferred_cli_target is deprecated in favor of :preferred_targets in def cli
The environment variable HEX_MIRROR is deprecated in favor of HEX_BUILDS_URL