Enhancement
78 changes
Support an init/1 function in engines that will return the initial buffer (defaults to an empty string)
Add support for Access.all/0, Access.elem/1, Access.key/2 and Access.key!/1 for traversing nested data structures
Add Calendar and Date, Time, NaiveDateTime and DateTime types
Add --logger-otp-reports BOOL and --logger-sasl-reports BOOL switches
Emit a summary of compilation errors when modules are missing
Add Enum.group_by/3 that allows developers to map on the value being grouped
Make list values in maps returned by Enum.group_by/2 and Enum.group_by/3 preserve the order of the input enumerable instead of reversing it.
Add Enum.drop_every/2 that drops every nth, including the first one
Suggest possible functions on UndefinedFunctionError for existing modules
Warn if unknown fields are given to raise/2
Support IO devices in File.copy/3
Raise a more meaningful exit if you try to GenServer.call/3 yourself
Support :base option when inspecting binaries
Add IO.warn/2 that will print a warning message with stacktrace and notify the compiler a warning was printed (in case --warnings-as-errors was enabled)
Support generated: true in quote
Support Kernel.pop_in/1 and Kernel.pop_in/2 for yanking a value from a nested data structure
Allow variable struct names when matching, for example, %module{key: "value"} = struct
Allow guards on the left side of <- in for and with special forms
Support else chunks in with
Track {module, function, arity} imports and warn on unused ones when such are specified in :only
Add keyword/0 and keyword/1 built-in types to typespecs
Add sigils for date (~D[2015-04-17]), time (~T[08:00:00]) and naive date times ~N[2015-04-17 08:00:00]
Support @enforce_keys on defstruct/1 to guarantee some keys are explicitly given when building structs
Add support for :count switch type
Add parse!/2 and parse_head!/2 that raise OptionParser.ParseError in case of errors
Add Process.sleep/1
Range.range?/1 now checks the validity of a range.
Support :include_captures in Regex.split/3
Add String.myers_difference/2 for calculating the difference between two strings
Add System.os_time/0 and System.os_time/1
Add support for %{required(foo) => bar} and %{optional(foo) => bar} forms (Erlang 19 only)
Add support for @optional_callbacks to mark certain that certain callbacks may be optionally implemented
Introduce %{...} to mean any map (Erlang 19 only)
Add URI.merge/2
Add Version.parse!/1
Show pinned variables on failed assert ^left = right and assert match?(^left, right) assertions
Add ExUnit.Case.register_attribute which allow attributes to be cleaned up whenever a test is defined
Add ExUnit.Case.register_test and support the ability to tag "tests" by type. This will allow projects like QuickCheck to change the wording in formatters to say "10 properties" instead of "10 tests"
Support diffing of values when using == in assert
Start running tests as soon as cases are loaded. This feature is enabled by default when running tests through Mix
Raise a straight-forward error message in case a duplicate test name is defined
Bump the default number of max cases to double of schedulers to support both IO and CPU bound tests
Support for named setups in setup and setup_all
Support for bundling tests together with describe/2
Add nl/2 that loads a given module on a list of nodes
No longer restart applications on recompile/1
Improve IEx expand to handle functions after &
Introduce Logger.reset_metadata/0,1
Add mix xref and mix compile.xref that runs cross-reference checks, with the latter running after compilation by default
Add mix app.tree and mix deps.tree
Add Mix.Task.rerun/2 that reenables and re-runs a task
Integrate OptionParser.ParseError into Mix, automatically converting such exceptions into Mix.Error and embedding the task information
Support @preferred_cli_env attribute when defining tasks
Support mix test --raise that will raise when a test suite fails (instead of setting the exit code to 1)
Enable rebar3 manager by default for Hex dependencies
Add mix escript.install to install escripts
Print stacktraces for Mix.Error when MIX_DEBUG=1 is set
Add a user friendly error for merge conflicts on mix.lock
Track files between path dependencies. This means umbrella applications will no longer trigger full recompilation when a sibling changes. Instead it will only recompile the files affected by the sibling changes
No longer print every file being compiled. Instead a generic "Compiling N files (.ext)" will be printed and files will only be logged in case they take more than 5 seconds to compile. This threshold can be customized by passing the --long-compilation-threshold flag and the previous behaviour can be reenabled by giving --verbose to mix compile
Add mix test --stale that uses static analysis on source files to know which tests should run when source files changes. If any test file changes, it will also re-run. Changing a configuration file or the test helper will trigger a full recompilation
Float.to_string/2 and Float.to_char_list/2 has been soft-deprecated as Elixir will now attempt to print the shortest and most accurate representation by default. Developers can always fallback to :erlang.float_to_binary/2 and :erlang.float_to_list/2 if they need the previous functionality
to_char_list functions have been soft-deprecated in favor of to_charlist. This aligns with the naming conventions in both Erlang and Elixir
The confusing String.strip/2, String.lstrip/2 and String.rstrip/2 API has been soft deprecated in favor of String.trim/2, String.trim_leading/2 and String.trim_trailing/2
The confusing String.ljust/3 and String.rjust/3 API has been soft deprecated in favor of String.pad_leading/3 and String.pad_trailing/3
char_list is soft-deprecated in favor of charlist
Dict is no longer a behaviour and its functions will be deprecated in upcoming releases
Passing a dictionary to Enum.group_by/3 is deprecated
\x{H*} in strings/sigils/charlists is deprecated
Add deprecation for defdelegate list arguments and :append_first option. The previously undocumented and deprecated support for matching has been removed
Warn if a variable is assigned inside case/if/etc and used outside the block
Keyword.size/1 is deprecated in favor of Kernel.length/1
Map.size/1 is deprecated in favor of Kernel.map_size/1
The option /r (for ungreedy) has been deprecated in favor of /U
Set is no longer a behaviour and its functions will be deprecated in upcoming releases
String.valid_character?/1 is deprecated in favor of String.valid?/1 with pattern matching
Task.find/2 is deprecated in favor of explicit message matching
Passing a non-map to URI.decode_query/2 is deprecated