Releases: elixir-lang/elixir
Releases · elixir-lang/elixir
v1.0.5
Enhancements
- [Elixir] Support Erlang 18.0
- [IEx] Rely only on loaded applications for autocompletion on IEx
- [Record] Expand attributes and macros in record extractor
- [String] Optimize
String.rstrip/1
- [String] Optimize
String.downcase/1
- [String] Optimize
String.upcase/1
Bug fixes
- [EEx] Ensure blocks do not clobber EEx buffers
- [Enum] Ensure
Enum.take/2
does not consume one extra item when halting on the last emittable item - [ExUnit] Fix
StringIO
processes leakage in theExUnit.CaptureIO
when there are errors inside thecapture_io
block - [Float] Avoid rounding errors on
Float.parse/1
- [GenEvent] Fix
GenEvent
detection of modules that aren't loaded - [IO] Read 4K blocks instead of lines in
IO.binread/2
. This fixes a bug where CRLF were being ignored and is also going to improve performance - [Logger] Handle
:undefined
arity inLogger.Translator
(we get :undefined when a temporary worker of asimple_one_for_one
supervisor crashes) - [Mix] Ensure config is escaped before being injected into escripts. This fixes a bug where escripts failed to build when containing values like maps in config files
- [Mix] Ensure we properly underscore acronyms followed by paths, for example,
HTTP.Foo
- [Stream] Ensure
Stream.flat_map/2
does not consume more items than necessary when piped to anotherStream.flat_map/2
that halts in the inner stream - [Version] Fix
to_string
for versions with numeric pre releases
v1.0.4
Enhancements
- [Elixir] Support Erlang 17.5 and 18.0
- [Mix] Support "--search PATTERN" in "mix help"
- [Mix] Support
:start_permanent
that starts the application as permanent - [Mix] Support
:build_embedded
that compile protocols, avoid symlinks and ensure protocols are loaded on boot - [Mix] Make "mix app.start" public and support "--permanent" and "--temporary" options
- [URI] Speed decoding operations
Bug fixes
- [Elixir] Produce clearer error messages for syntax errors before a sigil
- [Elixir] Return value when matching on
_
in the last line of a block - [Elixir] Ensure changes in child deps forces the parent to recompile
- [Kernel] Fix a bug where
=~/2
returned false when matching on an empty string. The current behaviour was changed to match the behaviour ofString.contains?/2
- [Mix] Store relative paths in erlang manifests
- [Mix] Fix httpc proxy option profile for downloading hex and other safe packges
- [Mix] Fix missing behaviour warning when compiling Erlang modules
v1.0.3
Enhancements
- [Elixir] Do not show exported vars warning
- [Elixir] Improve error messages when using invalid expressions inside maps
- [Elixir] Skip aliases and import warnings when code cannot compile
- [IEx] Improve autocompletion for Erlang/Elixir based on loaded applications
- [IO] Make
IO.ANSI.Docs
readable on white background - [Mix] Provide clearer error message when updating archives on Windows
- [Mix] Don't go through hex.pm API server to install Hex
Bug fixes
- [Elixir] Ensure all Elixir applications work with code upgrades
- [Elixir] Don't leave spurious processes and stale data when the parallel compiler fails
- [Inspect] Keep original stacktrace on Inspect errors
- [IO] Fix
IO.ANSI.Docs
handling of*
,**
,_
where they would be activated in the middle of words - [Logger] Fix logging with
metadata[:function]
- [Mix] Don't show hex update message on mix
local.hex
- [Mix] Ensure tasks are properly underscored and camelized
- [Mix] Ensure Mix does not use ANSI escapes on Windows unless ANSI is enabled
- [Mix] Only shutdown Logger if the Mix application is being actually started
- [Mix] Ensure priv/include are copied on Windows even if source did not change
- [Mix] Ensure rebar dependencies work when user path has a space on Windows
- [Regex] Fix
Regex.replace/4
failures when the number of substitutions in pattern is more than the number of matches and support\g{...}
patterns - [String] Fix LFCR being treated as a grapheme instead of CRLF
- [URI] Do more strict matching on URI schema
v1.0.2
Bug fixes
- [EEx] Remove invalid warning when attempting to inline code in EEx
- [EEx] Unify syntax errors to always include file:line:
- [IEx] Set null prompt function in dumb term mode
- [Kernel] Do not define an ets table with the same name as the module as it clashes with user code
- [Kernel] Fail compiling try expressions if they lack one of catch/after/rescue/else clauses
- [Kernel] Improve error messages when parsing fails on aliases
- [Kernel] Improve warnings coming from compile-time evaluation of arguments
- [String] Fix String.replace/4 typespec
v1.0.1
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 forcompile.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 inSystem.cmd/3
v1.0.0
v0.15.1
Enhancements
- [GenEvent] Support
:ack
mode for GenEvent streams - [Inspect] Support
:base
option ininspect/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
andremove_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
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 tomix new
- [Mix] Support lowercase
http(s)_proxy
environment variables - [Mix] Allow
elixirc_paths
to also be given through the command line tomix compile.elixir
- [String]
String.slice/2
andString.slice/3
have been optimized
Bug fixes
- [IEx] Ensure functions in
Kernel.SpecialForms
andIEx.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 ofInspect.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 ofIO.ANSI.enabled?
- [IO]
IO.ANSI.escape/2
andIO.ANSI.escape_fragment/2
is deprecated in favor ofIO.ANSI.format/2
andIO.ANSI.format_fragment/2
- [Kernel] Leading
0
for octals is deprecated in favor of0o
- [Kernel]
0X
for hexadecimals is deprecated in favor of0x
- [Kernel]
0B
for binaries is deprecated in favor of0b
- [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
andbinding/2
expecting a list were removed - [Regex] Do not consider include captures on
Regex.split/3
results
v0.14.3
Enhancements
- [Access] Allow function access on
get_in/2
andget_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
andFloat.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 anotherflat_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 ofSystem.cmd/3
Deprecations
- [Mix]
mix escriptize
is deprecated in favor ofescript.build
- [Mix]
mix local.install
andmix local.uninstall
have been deprecated in favor ofmix archive.install
andmix archive.uninstall
respectively - [Mix]
:embed_extra_apps
for escripts is deprecated, instead list the dependencies insidedef 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
andFloat.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. Useexit({: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 ofmix 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 theansi: true
option - [OptionParser]
--no-SWITCH
are only allowed for declared booleans switches
v0.14.2
Enhancements
- [Enum] Improve performance of
Enum.join/2
andEnum.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
andEEx.AssignsEngine
are deprecated in favor of function composition withMacro.prewalk/1
(seeEEx.SmartEngine
for an example) - [Kernel]
Kernel.xor/2
is deprecated - [Mix]
Mix.Generator.from_file/1
is deprecated in favor of passingfrom_file: file
option toembed_text/2
andembed_template/2
(note though thatfrom_file/1
expects a path relative to the current file while thefrom_file: file
expects one relative to the current working directory)
Deprecations
- [Kernel]
size/1
is deprecated in favor ofbyte_size/1
andtuple_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 particularcond
clause (this is the behaviour also found incase
,receive
and friends) - [System]
build_info/0
now returns a map