v1.4.2

@josevalim josevalim released this Feb 16, 2017 · 504 commits to master since this release

1. Bug fixes

EEx

  • [EEx] Support middle expressions on trim mode

Elixir

  • [Calendar] Correct typo on Calendar types
  • [Kernel] Ensure redefined functions point to the proper source
  • [OptionParser] Add :allow_nonexistent_atoms to support unsafe behaviour prior to v1.4
  • [Stream] Allow consuming multiple items from suspended enumerable in Stream.transform/3
  • [String] Incorporate new grapheme rules in Unicode 9

IEx

  • [IEx.Autocomplete] Do not crash on aliases which are not known at compile time

Mix

  • [Mix.Umbrella] Ensure umbrella projects can depend on other umbrella projects
  • [Mix.Archive] Ensure previous archives with .ez extension are deleted

Downloads

v1.4.1

@josevalim josevalim released this Jan 26, 2017 · 504 commits to master since this release

1. Bug fixes

Elixir

  • [Kernel] Remove warning when making private functions overridable
  • [Path] Ensure Path.join/1 returns strings for lists of one element
  • [Regex] Ensure Regex.escape/1 also escapes -

IEx

  • [IEx] Disable ANSI detection for powershell to avoid false positives

Mix

  • [Mix.Make] Run make clean for erlang.mk
  • [Mix.Rebar] Support all of rebar3 dependency package declaration
  • [Mix.Rebar] Only pass overrides from parent to child in Rebar dep

Downloads

v1.4.0

@josevalim josevalim released this Jan 4, 2017 · 504 commits to master since this release

1. Enhancements

Elixir

  • [Calendar] Add Date.compare/2, Time.compare/2, NaiveDateTime.compare/2 and DateTime.compare/2
  • [Calendar] Support NaiveDateTime.add/3 and NaiveDateTime.diff/3 for adding seconds (up to microseconds) as well as the difference between two NaiveDateTimes in seconds (up to microseconds)
  • [Calendar] Add Date.leap_year?/1 and Date.day_of_week/1
  • [Calendar] Ensure Date, Time and NaiveDateTime APIs work with any struct that provides the same set of fields as their respective struct. For example, a NaiveDateTime can be given to Date since it contains a superset of the fields in the Date struct
  • [Enum] Add Enum.map_every/2 that invokes the given function with every nth item
  • [Enum] Add min/2, max/2, min_max/2, min_by/3, max_by/3, and min_max_by/3 that allow a function specifying the default value when the enumerable is empty
  • [Enum] Introduce Enum.zip/1 to zip multiple entries at once
  • [Float] Introduce Float.ratio/1 that returns a tuple with the numerator and denominator as integers to retrieve the given float
  • [GenServer] Log warn on default handle_info/2 implementation
  • [Inspect] Support syntax coloring via the :syntax_color option
  • [Integer] Integer.digits/2 now accepts negative integers
  • [Integer] Add Integer.mod/2 and Integer.floor_div/2
  • [IO] Add :label option to IO.inspect/2 to help distinguish multiple IO.inspect/2 calls.
  • [Kernel] Recognize merge conflict markers in source and provide a readable error message
  • [Kernel] Warn on unused module attributes
  • [Kernel] Improve compiler message on unexpected end of line
  • [Kernel] Raise BadBooleanError when a non-boolean is given on the left-hand side of and/or
  • [List] Add List.pop_at/3
  • [List] Add List.myers_difference/2
  • [OptionParser] Expand multi-letter aliases in OptionParser
  • [Process] Add Process.send_after/4
  • [Process] Improve error messages on Process.register/2 errors
  • [Registry] Add a local, decentralized and scalable key-value process storage
  • [Stream] Add Stream.map_every/2 that invokes the given function with every nth item
  • [Stream] Introduce Stream.zip/1 to lazily zip multiple entries at once
  • [String] Update to Unicode 9.0.0
  • [Task] Add Task.async_stream/3 and Task.async_stream/5 as well as the supervised versions Task.Supervisor.async_stream/4 and Task.Supervisor.async_stream/6
  • [URI] Allow 0 as URI scheme default port

ExUnit

  • [ExUnit.Diff] Use red or green background for whitespace-only diffs
  • [ExUnit.Doctest] Allow inspected structures with multiples lines and unicode characters in the doctest result
  • [ExUnit.Formatter] Replace lhs/rhs with left/right in the formatter for clarity

IEx

  • [IEx.Autocomplete] Stop appending a trailing dot when autocompleting modules in IEx
  • [IEx.Autocomplete] Support autocompletion for structs
  • [IEx.Autocomplete] Improve IEx autocomplete to support navigating map atom keys
  • [IEx.Helpers] c/1 now compiles in memory by default to avoid common issue where .beam files remain at projects root directory
  • [IEx.Helpers] Add info about protocols in i/1
  • [IEx.Server] Support interrupting IEx evaluation through the Ctrl+G prompt

Mix

  • [mix archive] Compress archive files built by mix archive as they are now unzipped during installation
  • [mix archive] Install from SCM
  • [mix compile] Automatically infer the list of applications for Mix projects
  • [mix cmd] Add the ability to specify one or more apps in mix cmd
  • [mix deps] Warn if there are non-applications in the apps directory for umbrella projects
  • [mix deps] Add warning for invalid paths on mix deps.clean
  • [mix deps] Add Mix.Project.apps_paths that returns the paths to children applications in umbrella projects
  • [mix deps] Add MIX_REBAR environment variable for overriding local rebar
  • [mix escript] Install from SCM
  • [mix new] Check directory existence in mix new and ask how to proceed if one exists
  • [mix new] Applications built with the --sup flag now have an individual module to work as application callback
  • [mix test] Add --formatter option to mix test
  • [mix xref] Provide "did you mean?" suggestions for mix xref

2. Bug fixes

Elixir

  • [Access] Do not accept nils in Access.key/1 and Access.key/2 in favor of explicit default values (or Access.key!/1 if you expect the key to always be available)
  • [Float] Avoid multiple roundings in Float.ceil/2, Float.floor/2 and Float.round/2
  • [Kernel] Don't crash in macro_exported?/3 when dealing with Erlang modules
  • [Kernel] Ensure locals calls are rewritten when calling a local function or macro from inside a module
  • [Kernel] Annotate the context for variables as zero-arity funs in quotes
  • [Kernel.SpecialForms] Ensure comprehensions with guards and filters keep proper ordering,
  • [Kernel.SpecialForms] Produce meaningful warning when with's else clauses have no effect
  • [Macro] Wrap fn calls in parens in Macro.to_string/2
  • [Macro] Do not print aliases as keys inside keyword lists in Macro.to_string/2
  • [OptionParser] Support options in OptionParser.to_argv/2 to ensure :count switches are correctly encoded
  • [Stream] Ensure Stream.take/2 does not consume next element on :suspend
  • [String] Fix infinite recursion in String.replace_leading/3 and String.replace_trailing/3 when given an empty string
  • [Task] Fix Task.shutdown/1,2 infinite block when task has no monitor
  • [Task] Ensure task cannot link after parents unlinks

ExUnit

  • [ExUnit] Fix a race condition in assert_receive where we would assert a message was not received but show it in the list of messages when the message is delivered right after the timeout value

IEx

  • [IEx.Helpers] Purge consolidated protocols before and after recompile/0

Mix

  • [Mix.Dep] Use gmake on FreeBSD instead of make when compiling make dependencies
  • [Mix.Project] Only copy files from source when they're newer than destination (for Windows machines)
  • [Mix.Task] Ensure non-recursive tasks inside umbrella are reenabled

3. Soft deprecations (no warnings emitted)

Elixir

  • [Enum] Enum.partition/2 has been deprecated in favor of Enum.split_with/2
  • [System] Deprecate plural time units in favor of singular ones to align with future Erlang releases

ExUnit

  • [ExUnit] Using GenEvent to implement ExUnit formatters is deprecated. Please use the new GenServer based formatters instead

4. Deprecations

Elixir

  • [Access] Access.key/1 is deprecated due to erratic behaviour for missing keys, please use Access.key/2 instead with proper default values
  • [Behaviour] The Behaviour module is deprecated. Callbacks may now be defined directly via the @callback attribute
  • [Enum] Deprecate Enum.uniq/2 in favor of Enum.uniq_by/2
  • [Float] Float.to_char_list/2 and Float.to_string/2 are deprecated (use the :erlang functions if such conversions are desired)
  • [Kernel] Deprecate support for making private functions overridable. Overridable functions must always be public as they must be contracts
  • [Kernel] Warn if variable is used as a function call
  • [OptionParser] Deprecate aliases with multiple letters, such as -abc
  • [Set] Deprecate the Set module
  • [Stream] Deprecate Stream.uniq/2 in favor of Stream.uniq_by/2

IEx

  • [IEx.Helpers] import_file/2 is deprecated in favor of import_file_if_available/1

Mix

  • [Mix.Utils] underscore/1 and camelize/1 are deprecated

Downloads

v1.4.0-rc.1

@josevalim josevalim released this Dec 5, 2016 · 504 commits to master since this release

Release v1.4.0-rc.1

Downloads

v1.4.0-rc.0

@josevalim josevalim released this Nov 28, 2016 · 506 commits to master since this release

Release v1.4.0-rc.0

Downloads

v1.3.4

@josevalim josevalim released this Oct 9, 2016 · 1277 commits to master since this release

1. Bug fixes

Elixir

  • [Kernel] Ensure the compiler does not generate unecessary variable bindings inside case statements. This improves the code emitted and make sure "unused variable warnings" are not mistakenly silenced
  • [Kernel] Move raise checks to runtime to avoid crashing cover on Erlang 19.1
  • [Protocol] Do not emit warnings when using protocols on opaque types

ExUnit

  • [ExUnit.CaptureLog] Flush Erlang's :error_logger before capturing to avoid mixed messages

Downloads

v1.3.3

@josevalim josevalim released this Sep 17, 2016 · 1277 commits to master since this release

1. Enhancements

Elixir

  • [DateTime] Support negative integer in DateTime.from_unix/2
  • [Kernel.LexicalTracker] Do not consider remote typespecs as a compile-time dependency
  • [Kernel.ParallelCompiler] Do not emit deadlock messages when the process is waiting on itself
  • [Kernel.Typespec] Mark struct update syntax as generated to avoid false positives from dialyzer

ExUnit

  • [ExUnit] Make ExUnit server timeout configurable

Logger

  • [Logger] Use :ansi_color if one is available in metadata

Mix

  • [Mix] Add support for the :sparse option in Mix.SCM.Git
  • [Mix] Skip dependendency loading if MIX_NO_DEPS is set to 1

2. Bug fixes

Elixir

  • [System] Use NUL instead of /dev/null on Windows when building System.build_info

IEx

  • [IEx.Autocomplete] Resolves issue with autocompletion on structs not working

Mix

  • [Mix] Also store external resources that are not part of the current working directory in compilation manifest
  • [Mix] Always include the compiled file source in manifests

Downloads

v1.3.2

@josevalim josevalim released this Jul 15, 2016 · 1277 commits to master since this release

1. Enhancements

Elixir

  • [Kernel] Support guards in else clauses in with

Mix

  • [Mix] Add MIX_NO_DEPS env var for disabling dep loading. Used for third-party scripts and tools like Nix package manager
  • [Mix] Add mix test --listen-on-stdin that automatically reruns tests on stdin
  • [Mix] Disable --warnings-as-errors when compiling dependencies
  • [Mix] Add --filter option to mix deps.unlock to unlock only matching dependencies

2. Bug fixes

Elixir

  • [Enum] Return nil if enumerable halts in Enum.find_index/3
  • [Kernel] Do not attempt to load modules that have not been required when invoking regular functions, otherwise this invalidates the @compile {:autoload, false} directive.

Mix

  • [Mix] Ensure missing protocol dependencies are discarded in umbrella projects with shared build

ExUnit

  • [ExUnit.Diff] Ensure no leading or trailing when diffing some maps

Downloads

v1.3.1

@josevalim josevalim released this Jun 28, 2016 · 1277 commits to master since this release

1. Enhancements

IEx

  • [IEx.Helpers] Add import_file_if_available for importing files only if they are available
  • [IEx.Helpers] Add import_if_available for importing modules only if they are available

2. Bug fixes

Elixir

  • [Kernel] Ensure structs can be expanded in dynamic module names
  • [Kernel] Ensure aliases warnings are not accidentally discarded when the same module is imported
  • [Kernel.ParallelCompiler] Ensure two modules with cyclic struct dependencies cannot run into a deadlock when compiling
  • [Kernel.Typespec] Support module attributes in remote types
  • [Module] Do not expect stacktraces to be always present when dispatching to locals during the module compilation

IEx

  • [IEx.Helpers] Fix h helper for operators

Mix

  • [Mix] Do not load modules for xref purposes, instead use BEAM info
  • [Mix] Ensure deps.check does not check archives (that's done in loadpaths)
  • [Mix] Validate application properties before traversing them
  • [Mix] Check for proper Makefile when compiling on Windows
  • [Mix] Enforce space after comma in mix do

Downloads

v1.3.0

@josevalim josevalim released this Jun 21, 2016 · 1277 commits to master since this release

1. Enhancements

EEx

  • [EEx.Engine] Support an init/1 function in engines that will return the initial buffer (defaults to an empty string)

Elixir

  • [Access] Add support for Access.all/0, Access.elem/1, Access.key/2 and Access.key!/1 for traversing nested data structures
  • [Calendar] Add Calendar and Date, Time, NaiveDateTime and DateTime types
  • [CLI] Add --logger-otp-reports BOOL and --logger-sasl-reports BOOL switches
  • [Compiler] Emit a summary of compilation errors when modules are missing
  • [Enum] Add Enum.group_by/3 that allows developers to map on the value being grouped
  • [Enum] 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.
  • [Enum] Add Enum.drop_every/2 that drops every nth, including the first one
  • [Exception] Suggest possible functions on UndefinedFunctionError for existing modules
  • [Exception] Warn if unknown fields are given to raise/2
  • [File] Support IO devices in File.copy/3
  • [GenServer] Raise a more meaningful exit if you try to GenServer.call/3 yourself
  • [Inspect] Support :base option when inspecting binaries
  • [IO] 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)
  • [Kernel] Support generated: true in quote
  • [Kernel] Support Kernel.pop_in/1 and Kernel.pop_in/2 for yanking a value from a nested data structure
  • [Kernel] Allow variable struct names when matching, for example, %module{key: "value"} = struct
  • [Kernel] Allow guards on the left side of <- in for and with special forms
  • [Kernel] Support else chunks in with
  • [Kernel] Track {module, function, arity} imports and warn on unused ones when such are specified in :only
  • [Kernel] Add keyword/0 and keyword/1 built-in types to typespecs
  • [Kernel] Add sigils for date (~D[2015-04-17]), time (~T[08:00:00]) and naive date times ~N[2015-04-17 08:00:00]
  • [Kernel] Support @enforce_keys on defstruct/1 to guarantee some keys are explicitly given when building structs
  • [OptionParser] Add support for :count switch type
  • [OptionParser] Add parse!/2 and parse_head!/2 that raise OptionParser.ParseError in case of errors
  • [Process] Add Process.sleep/1
  • [Range] Range.range?/1 now checks the validity of a range.
  • [Regex] Support :include_captures in Regex.split/3
  • [String] Add String.myers_difference/2 for calculating the difference between two strings
  • [System] Add System.os_time/0 and System.os_time/1
  • [Typespec] Add support for %{required(foo) => bar} and %{optional(foo) => bar} forms (Erlang 19 only)
  • [Typespec] Add support for @optional_callbacks to mark certain that certain callbacks may be optionally implemented
  • [Typespec] Introduce %{...} to mean any map (Erlang 19 only)
  • [URI] Add URI.merge/2
  • [Version] Add Version.parse!/1

ExUnit

  • [ExUnit] Show pinned variables on failed assert ^left = right and assert match?(^left, right) assertions
  • [ExUnit] Add ExUnit.Case.register_attribute which allow attributes to be cleaned up whenever a test is defined
  • [ExUnit] 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"
  • [ExUnit] Support diffing of values when using == in assert
  • [ExUnit] Start running tests as soon as cases are loaded. This feature is enabled by default when running tests through Mix
  • [ExUnit] Raise a straight-forward error message in case a duplicate test name is defined
  • [ExUnit] Bump the default number of max cases to double of schedulers to support both IO and CPU bound tests
  • [ExUnit] Support for named setups in setup and setup_all
  • [ExUnit] Support for bundling tests together with describe/2

IEx

  • [IEx] Add nl/2 that loads a given module on a list of nodes
  • [IEx.Helpers] No longer restart applications on recompile/1
  • [IEx.Autocomplete] Improve IEx expand to handle functions after &

Logger

  • [Logger] Introduce Logger.reset_metadata/0,1

Mix

  • [Mix] Add mix xref and mix compile.xref that runs cross-reference checks, with the latter running after compilation by default
  • [Mix] Add mix app.tree and mix deps.tree
  • [Mix] Add Mix.Task.rerun/2 that reenables and re-runs a task
  • [Mix] Integrate OptionParser.ParseError into Mix, automatically converting such exceptions into Mix.Error and embedding the task information
  • [Mix] Support @preferred_cli_env attribute when defining tasks
  • [Mix] Support mix test --raise that will raise when a test suite fails (instead of setting the exit code to 1)
  • [Mix] Enable rebar3 manager by default for Hex dependencies
  • [Mix] Add mix escript.install to install escripts
  • [Mix] Print stacktraces for Mix.Error when MIX_DEBUG=1 is set
  • [Mix] Add a user friendly error for merge conflicts on mix.lock
  • [Mix] 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
  • [Mix] 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
  • [Mix] 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

2. Bug fixes

Elixir

  • [Application] Ensure Application.spec/2 returns nil for unknown applications
  • [GenServer] Ensures cast/2 returns :ok if locally registered process is not found
  • [Inspect] Ensure binaries break into new lines when inspected
  • [Kernel] Do not choke on capture operator with argument above &191
  • [Kernel] Raise if defstruct is called multiple times
  • [Kernel] Ensure Module.create/3 respects var/alias hygiene
  • [Kernel] Support non-literal ranges on the right side of in/2
  • [Macro] Fix Macro.to_string/1 on a call of a capture argument, for example &(&1).(:x)
  • [OptionParser] Allow OptionParser to parse negative numbers
  • [Record] Fix Record.is_record/2 when dealing with non-record tuples
  • [String] Ensure strip also removes non-breaking whitespaces (and ensure split still does not split on them)
  • [URI] Use square brackets for IPv6 in URI.to_string/1

Mix

  • [Mix] Improve task not found message when Mix would include the not found task as a suggestion due to different casing
  • [Mix] Ignore lock revision when the lock is out of date when updating Mix dependencies. Before this fix, Git tags and branches in the lock file would erroneously take higher precedence than the one in mix.exs
  • [Mix] Only recompile empty Elixir files if they change instead of recompiling them on every run
  • [Mix] Ensure .app file is written in UTF-8 (this allows app descriptions to contain UTF-8 characters)
  • [Mix.Dep] Always specify the :env option internally for dependencies to avoid false positives in the dependency resolution
  • [Mix.Dep] Correctly detect conflict from cousin optional dependencies in the dependency resolution algorithm

3. Soft deprecations (no warnings emitted)

  • [Float] 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
  • [Kernel] to_char_list functions have been soft-deprecated in favor of to_charlist. This aligns with the naming conventions in both Erlang and Elixir
  • [String] 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
  • [String] 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
  • [Typespec] char_list is soft-deprecated in favor of charlist

4. Deprecations

This release deprecates many APIs that have been soft-deprecated in previous Elixir versions.

Elixir

  • [Dict] Dict is no longer a behaviour and its functions will be deprecated in upcoming releases
  • [Enum] Passing a dictionary to Enum.group_by/3 is deprecated
  • [Kernel] \x{H*} in strings/sigils/charlists is deprecated
  • [Kernel] Add deprecation for defdelegate list arguments and :append_first option. The previously undocumented and deprecated support for matching has been removed
  • [Kernel] Warn if a variable is assigned inside case/if/etc and used outside the block
  • [Keyword] Keyword.size/1 is deprecated in favor of Kernel.length/1
  • [Map] Map.size/1 is deprecated in favor of Kernel.map_size/1
  • [Regex] The option /r (for ungreedy) has been deprecated in favor of /U
  • [Set] Set is no longer a behaviour and its functions will be deprecated in upcoming releases
  • [String] String.valid_character?/1 is deprecated in favor of String.valid?/1 with pattern matching
  • [Task] Task.find/2 is deprecated in favor of explicit message matching
  • [URI] Passing a non-map to URI.decode_query/2 is deprecated

Downloads