Elixir

Elixir

Elixir Core Team

Elixir v1.16.0 released

Official announcement: Elixir v1.16 released - The Elixir programming language

1. Enhancements

EEx

  • [EEx] Include relative file information in diagnostics

Elixir

  • [Code] Add :emit_warnings for Code.string_to_quoted/2
  • [Code] Automatically include columns in parsing options
  • [Code] Introduce MismatchedDelimiterError for handling mismatched delimiter exceptions
  • [Code.Fragment] Handle anonymous calls in fragments
  • [Code.Formatter] Trim trailing whitespace on heredocs with \r\n
  • [File] Add :offset option to File.stream!/2
  • [Kernel] Auto infer size of matched variable in bitstrings
  • [Kernel] Preserve column information when translating typespecs
  • [Kernel] Suggest module names based on suffix and casing errors when the module does not exist in UndefinedFunctionError
  • [Kernel.ParallelCompiler] Introduce Kernel.ParallelCompiler.pmap/2 to compile multiple additional entries in parallel
  • [Kernel.SpecialForms] Warn if True/False/Nil are used as aliases and there is no such alias
  • [Macro] Add Macro.compile_apply/4
  • [Module] Add support for @nifs annotation from Erlang/OTP 25
  • [Module] Add support for missing @dialyzer configuration
  • [String] Update to Unicode 15.1.0
  • [String] Add String.replace_invalid/2
  • [Task] Add :limit option to Task.yield_many/2

Logger

  • [Logger] Add Logger.levels/0

Mix

  • [mix] Add MIX_PROFILE to profile a list of comma separated tasks
  • [mix archive.install] Support --sparse option
  • [mix compile.app] Warn if both :applications and :extra_applications are used
  • [mix compile.elixir] Pass original exception down to diagnostic :details when possible
  • [mix compile.elixir] Optimize scenario where there are thousands of files in lib/ and one of them is changed
  • [mix deps.clean] Emit a warning instead of crashing when a dependency cannot be removed
  • [mix escript.install] Support --sparse option
  • [mix release] Include include/ directory in releases
  • [mix test] Allow testing multiple file:line at once, such as mix test test/foo_test.exs:13 test/bar_test.exs:27

2. Bug fixes

Elixir

  • [Code] Keep quotes for atom keys in formatter
  • [Code.Fragment] Fix crash in Code.Fragment.surround_context/2 when matching on ->
  • [IO] Raise when using IO.binwrite/2 on terminated device (mirroring IO.write/2)
  • [Kernel] Do not expand aliases recursively (the alias stored in Macro.Env is already expanded)
  • [Kernel] Ensure dbg module is a compile-time dependency
  • [Kernel] Warn when a private function or macro uses unquote/1 and the function/macro itself is unused
  • [Kernel] Re-enabled compiler optimizations for top level functions in scripts (disabled in v1.14.0 but shouldn’t impact most programs)
  • [Kernel] Do not define an alias for nested modules starting with Elixir. in their definition
  • [Kernel.ParallelCompiler] Consider a module has been defined in @after_compile callbacks to avoid deadlocks
  • [Macro] Address exception on Macro.to_string/1 for certain ASTs
  • [Path] Lazily evaluate File.cwd!/0 in Path.expand/1 and Path.absname/1
  • [Path] Ensure Path.relative_to/2 returns a relative path when the given argument does not share a common prefix with cwd

ExUnit

  • [ExUnit] Raise on incorrectly dedented doctests

IEx

  • [IEx.Pry] Fix prying functions with only literals in their body

Mix

  • [mix archive.install] Restore code paths after mix archive.install
  • [mix compile] Ensure files with duplicate modules are recompiled whenever any of the files change
  • [mix compile] Update Mix compiler diagnostics documentation and typespecs to match the Elixir compiler behaviour where both lines and columns start from one (before it inaccurately said that columns started from zero)
  • [mix escript.install] Restore code paths after mix escript.install

3. Soft deprecations (no warnings emitted)

Elixir

  • [File] Deprecate File.stream!(file, options, line_or_bytes) in favor of keeping the options as last argument, as in File.stream!(file, line_or_bytes, options)
  • [Kernel.ParallelCompiler] Deprecate Kernel.ParallelCompiler.async/1 in favor of Kernel.ParallelCompiler.pmap/2
  • [Path] Deprecate Path.safe_relative_to/2 in favor of Path.safe_relative/2

Mix

  • [mix compile] Returning a four-element tuple as a position in Mix.Task.Compiler.Diagnostic

4. Hard deprecations

Elixir

  • [Date] Deprecate inferring a range with negative step, call Date.range/3 with a negative step instead
  • [Enum] Deprecate passing a range with negative step on Enum.slice/2, give first..last//1 instead
  • [Kernel] ~R/.../ is deprecated in favor of ~r/.../. This is because ~R/.../ still allowed escape codes, which did not fit the definition of uppercase sigils
  • [String] Deprecate passing a range with negative step on String.slice/2, give first..last//1 instead

ExUnit

  • [ExUnit.Formatter] Deprecate format_time/2, use format_times/1 instead

Mix

  • [mix compile.leex] Require :leex to be added as a compiler to run the leex compiler
  • [mix compile.yecc] Require :yecc to be added as a compiler to run the yecc compiler

Most Liked

code-shoily

code-shoily

I know y’all get this a lot but… Thank You :folded_hands:

14
Post #3
sanswork

sanswork

Thank you everyone involved, this looks like a huge release for dev QOL.

PragTob

PragTob

Great release. I especially appreciate the work of putting the anti-patterns guides together and keeping them with the language docs. That’s such a game changer to me. It’s essentially a small book with elixir anti-patterns and solutions, only it will be kept up-to-date by the community. Of course thanks also goes to the researchers, having it in the official docs gives it a whole lot more visibility and authority though. Well done, team.

I just happily sent a link to a friend of mine who is working with elixir their first time and DM’ed me some weeks back going “Tobi, is it normal in elixir that there are like 16 clauses for functions all matching on things doing entirely different things?!?!?!” - so sending them the “unrelated multi clause function” doc now was great :grin: (and hopefully helps convince their colleagues more than “my friend Tobi said”).

Where Next?

Popular in News Top

josevalim
Hi everyone, We are glad to announce that the second release candidate for Elixir v1.6.0 is out. Check out the CHANGELOG and give the r...
New
Elixir
This release includes type inference of patterns to provide warnings for an initial set of constructs (binaries, maps, and atoms). It al...
New
josevalim
Hi everyone, I am really happy to announce Plug v1.4.0-rc.0. It has many improvements and bug fixes: Multipart support is now implemen...
New
Elixir
Release: Release v1.11.2 · elixir-lang/elixir · GitHub 1. Bug fixes Elixir [Code] Do not crash when getting docs for missing erts appdi...
New
whatyouhide
Hello folks, the Elixir team (well me, but I got a thumbs up from the others :P) is looking for contributors and potentially maintainers...
New
josevalim
Official announcement: Elixir v1.6 released - The Elixir programming language Thanks everyone who gave the release candidate a try and g...
New
josevalim
See the release notes: https://github.com/elixir-ecto/ecto/releases/tag/2.2.0-rc.0 To try it in your projects: {:ecto, "~> 2.2.0-rc",...
New
Elixir
Release: Release v1.9.0-rc.0 · elixir-lang/elixir · GitHub Releases The main feature in Elixir v1.9 is the addition of releases. A relea...
New
Elixir
1. Enhancements Elixir [Code] Emit :defmodule tracing event on module definition Mix [Mix] Add Mix.install_project_dir/0 [Mix] Add env...
New
Elixir
1. Enhancements [Code] Code.string_to_quoted/2 honors :static_atoms_encoder for multi-letter sigils 2. Bug fixes ExUnit [ExUnit.Captur...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New

We're in Beta

About us Mission Statement