Skip to content

Releases: elixir-lang/elixir

v1.0.1

07 Oct 11:49
Compare
Choose a tag to compare

Enhancements

  • [Mix] Add MIX_ENV output to archive.build (as on escript.build)

Bug fixes

  • [CLI] Fix Elixir CLI when running on Cygwin
  • [ExUnit] Include stacktraces in ExUnit timeouts
  • [Mix] Load dependencies before deps.check compiles dependencies
  • [Mix] Ensure Mix.Config is deep merged
  • [Mix] Change version requirement in new apps to ~> MAJOR.MINOR
  • [Mix] Report correct location if local.hex fails and give higher priority to powershell install on Windows
  • [Mix] Ensure --elixirc-paths option for compile.elixir is a subset of the project :elixirc_paths configuration and it does not remove skipped entries from the manifest
  • [Mix] Ensure compile.elixir writes to manifest when files are removed
  • [Mix] Ensure compile.elixir purges and deletes modules before compiling
  • [Mix] Do not crash on malformed proxy env var
  • [Stream] Ensure chunk/4 works correctly when halted
  • [System] Do not allow relative paths in System.cmd/3 as documented
  • [System] Fix :stderr_to_stdout option in System.cmd/3

v1.0.0

10 Sep 12:48
Compare
Choose a tag to compare

Enhancements

  • [Logger] Add Logger.enable/1 and Logger.disable/1

Backwards incompatible changes

  • [GenEvent] No longer support {:swap_handler, ...} as callback return value
  • [List] List.unzip/2 was removed

v0.15.1

10 Aug 17:22
Compare
Choose a tag to compare
v0.15.1 Pre-release
Pre-release

Enhancements

  • [GenEvent] Support :ack mode for GenEvent streams
  • [Inspect] Support :base option in inspect/2 to choose the base (:binary, :octal, :decimal or :hex) numbers a printed
  • [Kernel] Print warnings when used ? with characters with escape codes
  • [Logger] Add SASL log forwarding option to Logger
  • [Logger] Add $padlevel to option Logger formatter
  • [Logger] Backends receive the exact handler value when added, allowing a key to be passed for configuration lookup
  • [Logger] Add Logger.flush/0 to flush the Logger (useful for testing)
  • [Logger] Persist backends dynamically added or removed via add_backend/2 and remove_backend/2
  • [Macro] Add Macro.validate/1 to recursively check if a value is a valid quoted expression
  • [Mix] Load mix deps only when there is a need to use them (this improves the timing for the majority of tasks in a Mix project)
  • [Mix] Make the environment explicit on the success message generated after escript.build is invoked
  • [Mix] Load config/config.exs inside escripts
  • [Mix] Store and check Elixir version requirement for generated archives

Bug fixes

  • [CLI] Fix shell bugs when running on Windows with Cygwin or MinGW
  • [Kernel] Modules compiled by Elixir now report the correct beam location when :code.which/1 is invoked. If the bytecode is only available in memory, :code.which/1 returns :in_memory
  • [Kernel] Do not expand args for unknown functions/macros
  • [Kernel] Ensure defstruct, @attr inside and friends raise a nice error messages when values cannot be properly escaped
  • [Kernel] Do not raise conflicts on imports used from inside quotes
  • [Logger] Metadata is now correctly merged on each Logger.metadata/1 call
  • [Logger] Use the Logger PID on :error_logger wrapper to avoid race conditions on shutdown
  • [Macro] Ensure bitstrings work with Macro.escape/1
  • [Mix] Ensure aliases are invoked on umbrella recursive tasks
  • [Mix] Leave it up to the application to start the Logger after compilation
  • [Mix] Accept more forms of git versions (like "git version 1.9.3 (Apple Git-50)")
  • [Path] Do not normalize paths in Path.join/2 as normalization is beyond the scope of such function
  • [URI] to_string/1 now properly converts URI to strings when the schema is missing

Deprecations

  • [Collectable] Having a function as collectable is deprecated
  • [Module] Module.function/3 is deprecated, please use :erlang.make_fun/3 instead

v0.15.0

02 Aug 20:02
Compare
Choose a tag to compare
v0.15.0 Pre-release
Pre-release

Enhancements

  • [Agent] Improve the Agent API to also accept functions that receive explicit module, function and arguments
  • [IEx] Support --werl call on Windows
  • [Logger] Add Logger
  • [Map] Add Map.from_struct/1
  • [Mix] Allow --app flag to be passed to mix new
  • [Mix] Support lowercase http(s)_proxy environment variables
  • [Mix] Allow elixirc_paths to also be given through the command line to mix compile.elixir
  • [String] String.slice/2 and String.slice/3 have been optimized

Bug fixes

  • [IEx] Ensure functions in Kernel.SpecialForms and IEx.Helpers are also auto-completed
  • [IEx] Ensure remote shells can be started with --remsh
  • [Kernel] Correctly parse unary/binary operators regardless of number of spaces
  • [Kernel] Ensure private functions are not exported
  • [Protocol] Do not expose protocol convention on assert_impl!/2
  • [Regex] Do not consider include captures on Regex.split/3 results
  • [Stream] Implement the Inspect protocol for Streams so we do not leak the Stream representation

Deprecations

  • [IEx] IEx color configuration expects a list of atoms instead of a string with colors separated by comma
  • [Inspect] Inspect.Algebra.surround_many/6 now expects Inspect.Opts instead of an integer limit
  • [Inspect] Inspect.Algebra.pretty/2 is deprecated in favor of Inspect.Algebra.format/2 that instead returns iodata. This function was used only by documentation examples and it is unlikely to affect actual code
  • [IO] IO.ANSI.terminal? is deprecated in favor of IO.ANSI.enabled?
  • [IO] IO.ANSI.escape/2 and IO.ANSI.escape_fragment/2 is deprecated in favor of IO.ANSI.format/2 and IO.ANSI.format_fragment/2
  • [Kernel] Leading 0 for octals is deprecated in favor of 0o
  • [Kernel] 0X for hexadecimals is deprecated in favor of 0x
  • [Kernel] 0B for binaries is deprecated in favor of 0b
  • [Mix] Mix color configuration expects a list of atoms instead of a string with colors separated by comma
  • [String] \NNN, \NN and \N for octals are deprecated inside string, sigils and chars in favor of hexadecimal entries with \x

Backwards incompatible changes

  • [Kernel] binding/1 and binding/2 expecting a list were removed
  • [Regex] Do not consider include captures on Regex.split/3 results

v0.14.3

12 Jul 13:08
Compare
Choose a tag to compare
v0.14.3 Pre-release
Pre-release

Enhancements

  • [Access] Allow function access on get_in/2 and get_and_update_in/3
  • [Enum] Add Enum.sort_by/3
  • [ExUnit] Match the line filter by proximity instead of exact match
  • [Float] Support precision in Float.ceil/1 and Float.floor/1
  • [IO] Add IO.(bin)read(device, :all)
  • [Kernel] Print a warning if a dangling @doc clause is found
  • [Mix] Use absolute symbolic links on Windows for _build instead of copying
  • [Mix] Add Mix.compilers that returns all default compilers used by mix tasks
  • [Mix] Issue warning and reset mtime for source files from the future
  • [Mix] Support task aliases in Mix
  • [OptionParser] Add OptionParser.split/1 that splits a string into argv
  • [Record] Allow a record to be converted to a keyword list with record(some_record)
  • [String] Improve performance of String.split/1
  • [Typespec] Allow %Struct{} syntax to be used in typespecs
  • [Typespec] Allow record(:record, fields) syntax to be used in typespecs

Bug fixes

  • [IEx] Do not print ANSI sequences on IEx.Helpers.clear/0 if ANSI sequences are not supported
  • [Inspect] Ensure Inspect.Algebra.to_doc/2 doesn't go into a loop when there is a failure printing a struct
  • [Kernel] |>, <<<, >>> and ^^^ made left associative in operator table
  • [Kernel] <, >, <=, >= given higher precedence than comparison operators (==, !=, etc) in the operator table
  • [Kernel] Run command line and escripts in a process that does not trap exits
  • [Kernel] Fix a bug where Mix paths had higher priority than CLI ones, causing protocol consolidations to not be properly loaded
  • [Kernel] Fix wording on error messages when a check/guard always passes or always fails
  • [Kernel] Fix a bug where an unused function warning was printed even when the function was used via defoverridable
  • [Kernel] Improve typespecs so they don't generate supertype dialyzer warnings
  • [Macro] to_string correctly displays sigils
  • [Mix] Ensure Mix dependencies are not compiled every second time when mix deps.compile is invoked
  • [Mix] Fix a bug where Mix.shell.error/1 and friends choked when printing a map
  • [Mix] Ensure multiple @external_resource entries are read by Mix compilers
  • [Mix] Fix a bug where tasks for umbrella projects were not properly reenabled
  • [Stream] Fix bug when flat_map is used inside another flat_map with an Enumerable
  • [Typespec] Fix a bug where the list typespec was incorrectly rendered as []

Soft deprecations (no warnings emitted)

  • [Kernel] Using a list for bitstring modifiers is deprecated (as in <<x :: [little, utf16]>>), please use - as the separator instead (as in <<x :: little-utf16>>)
  • [System] System.cmd/1 is deprecated in favor of System.cmd/3

Deprecations

  • [Mix] mix escriptize is deprecated in favor of escript.build
  • [Mix] mix local.install and mix local.uninstall have been deprecated in favor of mix archive.install and mix archive.uninstall respectively
  • [Mix] :embed_extra_apps for escripts is deprecated, instead list the dependencies inside def application
  • [System] Giving a char list to System.find_executable/1 is deprecated

Backwards incompatible changes

  • [Access] No longer fill in missing intermediate values with empty maps
  • [Float] Float.ceil/2 and Float.floor/2 now always returns floats and no longer accept integers
  • [Kernel] defstruct no longer automatically defines a type
  • [Kernel] exit(integer) is no longer supported from scripts to configure the exit signal. Use exit({:shutdown, integer}) instead
  • [Kernel] Default argument values have to be defined in a function head if the function has multiple clauses
  • [Mix] mix archive.build replaces the functionality of mix archive, mix archive now lists locally installed archives
  • [Mix] Mix.shell.info/1 no longer automatically escape ANSI sequences. Instead if has to be explicitly enabled with the ansi: true option
  • [OptionParser] --no-SWITCH are only allowed for declared booleans switches

v0.14.2

29 Jun 09:55
Compare
Choose a tag to compare
v0.14.2 Pre-release
Pre-release

Enhancements

  • [Enum] Improve performance of Enum.join/2 and Enum.map_join/3 by using iolists
  • [Kernel] Ensure compatibility with Erlang 17.1
  • [Kernel] Support @external_resource attribute to external dependencies to a module
  • [Mix] Allow built Git dependencies to run on a system without Git by passing --no-deps-check
  • [Mix] Add MIX_ARCHIVES env variable (it is recommended for Elixir build tools to swap this environment)
  • [Task] Set :proc_lib initial call on task to aid debugging
  • [Typespec] Delay typespec compilation to after expansion
  • [URI] Allow parse/1 now accepts %URI{} as argument and return the uri itself

Bug fixes

  • [CLI] Support paths inside archives in -pa and -pz options
  • [IEx] Remove delay when printing data from the an application start callback
  • [IEx] Ensure we show a consistent error when we cannot evaluate .iex.exs
  • [Kernel] Ensure derived protocols are defined with a file
  • [Kernel] Change precedence of & to not special case /
  • [Kernel] Ensure we can only use variables and \\ as arguments of bodyless clause

Soft deprecations (no warnings emitted)

  • [EEx] Using EEx.TransformerEngine and EEx.AssignsEngine are deprecated in favor of function composition with Macro.prewalk/1 (see EEx.SmartEngine for an example)
  • [Kernel] Kernel.xor/2 is deprecated
  • [Mix] Mix.Generator.from_file/1 is deprecated in favor of passing from_file: file option to embed_text/2 and embed_template/2 (note though that from_file/1 expects a path relative to the current file while the from_file: file expects one relative to the current working directory)

Deprecations

  • [Kernel] size/1 is deprecated in favor of byte_size/1 and tuple_size/1 (this change was soft deprecated two releases ago)

Backwards incompatible changes

  • [CLI] Remove support for the --gen-debug option as its usage is not documented by OTP
  • [Kernel] Sigils no longer balance start and end tokens, e.g. the sigil ~s(f(o)o) is no longer valid as it finishes in the first closing )
  • [Kernel] Variables set in cond clause heads are no longer available outside of that particular cond clause (this is the behaviour also found in case, receive and friends)
  • [System] build_info/0 now returns a map

v0.14.1

18 Jun 14:18
Compare
Choose a tag to compare
v0.14.1 Pre-release
Pre-release

Enhancements

  • [Base] Decoding and encoding functions now accept the :case as an option
  • [ExUnit] The test process now exits with :shutdown reason
  • [GenEvent] GenEvent.stream/2 now accepts :sync and :async modes
  • [Node] Add Node.start/3 and Node.stop/0
  • [String] Updated Unicode database to 7.0
  • [Task] Log when tasks crash

Bug fixes

  • [Enum] Enum.slice/2 and Enum.slice/3 always returns a list (and never nil)
  • [Kernel] Disambiguate (w)erl to (w)erl.exe
  • [Mix] Ensure umbrella project is recompiled when a dependency inside an umbrella child changes
  • [OptionParser] Do not allow underscores in option names
  • [Path] Fix path expansion of "/.."
  • [Path] Do not match files starting with . in Path.wildcard/2 by default
  • [Process] Process.info(pid, :registered_name) returns {:registered_name, nil} if there is no registered name
  • [String] String.slice/2 and String.slice/3 always returns a list (and never nil)
  • [URI] encode/1 does not escape reserved/unreserved characters by default nor encodes whitespace as + (check URI.encode_www_form/1 and URI.decode_www_form/1 for previous behaviour)

Deprecations

  • [Mix] :escript_* options were moved into a single :escript group

Backwards incompatible changes

  • [GenEvent] GenEvent.stream/2 defaults to :sync mode
  • [Kernel] Remove get_in/1

v0.14.0

08 Jun 19:19
Compare
Choose a tag to compare
v0.14.0 Pre-release
Pre-release

Enhancements

  • [ExUnit] Add on_exit/1 callbacks that are guaranteed to run once the test process exits and always in another process
  • [Kernel] Store documentation in the abstract code to avoid loading them when the module is loaded
  • [Kernel] Add get_in/2, put_in/3, update_in/3 and get_and_update_in/3 to handle nested data structure operations
  • [Kernel] Add get_in/1, put_in/2, update_in/2 and get_and_update_in/2 to handle nested data structure operations via paths
  • [Mix] Add Mix.Config to ease definition of configuration files
  • [Mix] Add mix loadconfig task that can be called multiple times to load external configs
  • [Mix] Support --config option on mix run
  • [Mix] Support HTTP_PROXY and HTTPS_PROXY on Mix url commands
  • [Mix] Support --names options in mix help which emit only names (useful for autocompletion)
  • [Protocol] Add Protocol.consolidate/2, Protocol.consolidated?/1 and a mix compile.protocols task for protocol consolidation
  • [Protocol] Add Protocol.derive/3 for runtime deriving of a struct
  • [String] Add String.chunk/2
  • [Struct] Add support for @derive before defstruct/2 definitions

Bug fixes

  • [File] File.rm now consistently deletes read-only across operating systems
  • [Kernel] Ensure Mix _build structure works on Windows when copying projects
  • [Kernel] Ensure 1.0E10 (with uppercase E) is also valid syntax
  • [Mix] Fix mix do task for Windows' powershell users
  • [Path] Fix Path.absname("/") and Path.expand("/") to return the absolute path "/".

Soft deprecations (no warnings emitted)

  • [Kernel] size/1 is deprecated, please use byte_size/1 or tuple_size/1 instead
  • [ExUnit] teardown/2 and teardown_all/2 are deprecated in favor of on_exit/1 callbacks

Deprecations

  • [Access] Access.access/2 is deprecated in favor of Access.get/2
  • [Dict] Dict.Behaviour is deprecated in favor of Dict
  • [Kernel] Application.Behaviour, GenEvent.Behaviour, GenServer.Behaviour and Supervisor.Behaviour are deprecated in favor of Application, GenEvent, GenServer and Supervisor
  • [Kernel] defexception/3 is deprecated in favor of defexception/1
  • [Kernel] raise/3 is deprecated in favor of reraise/2
  • [Kernel] set_elem/3 is deprecated in favor of put_elem/3
  • [Kernel] Passing an atom var!/1 is deprecated, variables can be built dynamically with Macro.var/2
  • [Mix] Exceptions that define a :mix_error field to be compatible with Mix are no longer supported. Instead please provide a :mix field and use Mix.raise/1 and Mix.raise/2

Backwards incompatible changes

  • [Access] Kernel.access/2 no longer exists and the Access protocol now requires get/2 (instead of access/2) and get_and_update/3 to be implemented
  • [Kernel] Retrieving docs as module.__info__(:docs) is no longer supported, please use Code.get_docs/2 instead
  • [Kernel] Code.compiler_options/1 no longer accepts custom options, only the ones specified by Elixir (use mix config instead)
  • [Mix] mix new no longer generates a supevision tree by default, please pass --sup instead
  • [Task] Tasks are automatically linked to callers and a failure in the task will crash the caller directly

v0.13.3

24 May 09:03
Compare
Choose a tag to compare
v0.13.3 Pre-release
Pre-release

Enhancements

  • [OptionParser] Add :strict option that only parses known switches
  • [OptionParser] Add next/2 useful for manual parsing of options
  • [Macro] Add Macro.prewalk/2/3 and Macro.postwalk/2/3
  • [Kernel] GenEvent, GenServer, Supervisor, Agent and Task modules added
  • [Kernel] Make deprecations compiler warnings to avoid the same deprecation being printed multiple times

Bug fixes

  • [Enum] Fix Enum.join/2 and Enum.map_join/3 for empty binaries at the beginning of the collection
  • [ExUnit] Ensure the formatter doesn't error when printing :EXITs
  • [Kernel] Rename ELIXIR_ERL_OPTS to ELIXIR_ERL_OPTIONS for consistency with ERL_COMPILER_OPTIONS
  • [OptionParser] Parse - as a plain argument
  • [OptionParser] -- is always removed from argument list on parse/2 and when it is the leading entry on parse_head/2
  • [Regex] Properly escape regex (previously regex controls were double escaped)

Soft deprecations (no warnings emitted)

  • [Dict] Dict.Behaviour is deprecated in favor of Dict
  • [Kernel] Application.Behaviour, GenEvent.Behaviour, GenServer.Behaviour and Supervisor.Behaviour are deprecated in favor of Application, GenEvent, GenServer and Supervisor
  • [Kernel] defexception/3 is deprecated in favor of defexception/1
  • [Kernel] raise/3 is deprecated in favor of reraise/2
  • [Kernel] set_elem/3 is deprecated in favor of put_elem/3

Soft deprecations for conversions (no warnings emitted)

  • [Kernel] atom_to_binary/1 and atom_to_list/1 are deprecated in favor of Atom.to_string/1 and Atom.to_char_list/1
  • [Kernel] bitstring_to_list/1 and list_to_bitstring/1 are deprecated in favor of the :erlang ones
  • [Kernel] binary_to_atom/1, binary_to_existing_atom/1, binary_to_float/1, binary_to_integer/1 and binary_to_integer/2 are deprecated in favor of conversion functions in String
  • [Kernel] float_to_binary/* and float_to_list/* are deprecated in favor of Float.to_string/* and Float.to_char_list/*
  • [Kernel] integer_to_binary/* and integer_to_list/* are deprecated in favor of Integer.to_string/* and Integer.to_char_list/*
  • [Kernel] iodata_to_binary/1 and iodata_length/1 are deprecated IO.iodata_to_binary/1 and IO.iodata_length/1
  • [Kernel] list_to_atom/1, list_to_existing_atom/1, list_to_float/1, list_to_integer/1, list_to_integer/2 and list_to_tuple/1 are deprecated in favor of conversion functions in List
  • [Kernel] tuple_to_list/1 is deprecated in favor of Tuple.to_list/1
  • [List] List.from_char_data/1 and List.from_char_data!/1 deprecated in favor of String.to_char_list/1
  • [String] String.from_char_data/1 and String.from_char_data!/1 deprecated in favor of List.to_string/1

Deprecations

  • [Kernel] is_exception/1, is_record/1 and is_record/2 are deprecated in favor of Exception.exception?1, Record.record?/1 and Record.record?/2
  • [Kernel] defrecord/3 is deprecated in favor of structs
  • [Kernel] :hygiene in quote is deprecated
  • [Mix] Mix.project/0 is deprecated in favor of Mix.Project.config/0
  • [Process] Process.spawn/1, Process.spawn/3, Process.spawn_link/1, Process.spawn_link/3, Process.spawn_monitor/1, Process.spawn_monitor/3, Process.send/2 and Process.self/0 are deprecated in favor of the ones in Kernel

Backwards incompatible changes

  • [Exception] Exceptions now generate structs instead of records
  • [OptionParser] Errors on parsing returns the switch and value as binaries (unparsed)
  • [String] String.to_char_list/1 (previously deprecated) no longer returns a tuple but the char list only and raises in case of failure

v0.13.2

11 May 10:33
Compare
Choose a tag to compare
v0.13.2 Pre-release
Pre-release

Enhancements

  • [Application] Add an Application module with common functions to work with OTP applications
  • [Exception] Add Exception.message/1, Exception.format_banner/1, Exception.format_exit/1 and Exception.format/1
  • [File] Add File.ln_s/1
  • [Mix] mix deps.clean now works accross environments
  • [Mix] Support line numbers in mix test, e.g. test/some/file_test.exs:12
  • [Mix] Use @file attributes to detect dependencies in between .ex and external files. This means changing an .eex file will no longer recompile the whole project only the files that depend directly on it
  • [Mix] Support application configurations in config/config.exs which can be customized by specifying your own :config_path
  • [Mix] Support user-wide configuration with ~/.mix/config.exs
  • [Mix] mix help now uses ANSI formatting to print guides
  • [Regex] Support functions in Regex.replace/4
  • [String] Support :parts in String.split/3

Bug fixes

  • [Code] Ensure we don't lose the caller stacktrace on code evaluation
  • [IEx] Exit signals now exits the IEx evaluator and a new one is spawned on its place
  • [IEx] Ensure we don't prune too much stacktrace when reporting failures
  • [IEx] Fix an issue where iex.bat on Windows was not passing the proper parameters forward
  • [Kernel] Ensure modules defined on root respect defined aliases
  • [Kernel] Do not wrap single lists in :__block__
  • [Kernel] Ensure emitted beam code works nicely with dialyzer
  • [Kernel] Do not allow a module named Elixir to be defined
  • [Kernel] Create remote funs even if mod is a variable in capture &mod.fun/arity
  • [Kernel] Improve compiler message when duplicated modules are detected
  • [Mix] Generate .gitignore for --umbrella projects
  • [Mix] Verify if a git dependency in deps has a proper git checkout and clean it automatically when it doesn't
  • [Mix] Ensure mix test works with IEx.pry/0
  • [System] Convert remaining functions in System to rely on char data

Soft deprecations (no warnings emitted)

  • [Application] use Application.Behaviour is deprecated in favor of use Application
  • [Exception] exception.message is deprecated in favor Exception.message/1 for retrieving exception messages
  • [Kernel] is_exception/1, is_record/1 and is_record/2 are deprecated in favor of Exception.exception?1, Record.record?/1 and Record.record?/2
  • [Mix] Mix.project/0 is deprecated in favor of Mix.Project.config/0
  • [Process] Process.spawn/1, Process.spawn/3, Process.spawn_link/1, Process.spawn_link/3, Process.spawn_monitor/1, Process.spawn_monitor/3, Process.send/2 and Process.self/0 are deprecated in favor of the ones in Kernel

Deprecations

  • [IEx] IEx.Options is deprecated in favor of IEx.configure/1 and IEx.configuration/0
  • [Kernel] lc and bc comprehensions are deprecated in favor of for
  • [Macro] Macro.safe_terms/1 is deprecated
  • [Process] Process.delete/0 is deprecated
  • [Regex] Deprecate :global option in Regex.split/3 in favor of parts: :infinity
  • [String] Deprecate :global option in String.split/3 in favor of parts: :infinity

Backwards incompatible changes

  • [ExUnit] ExUnit.Test and ExUnit.TestCase has been converted to structs
  • [ExUnit] The test and callback context has been converted to maps
  • [Kernel] File.Stat, HashDict, HashSet, Inspect.Opts, Macro.Env, Range, Regex and Version.Requirement have been converted to structs. This means is_record/2 checks will no longer work, instead, you can pattern match on them using %Range{} and similar
  • [URI] The URI.Info record has now become the URI struct
  • [Version] The Version.Schema record has now become the Version struct