To our Elixir community members: we owe you an apology. While you’ve been enjoying the benefits of Elixir 1.17 and 1.18 releases, our platforms have been stuck in June 2023. That changes today. Elixir 1.18 is now officially available on both Upsun and Platform.sh.Documentation Index
Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
Use this file to discover all available pages before exploring further.
What’s in Elixir 1.18?
If you haven’t been following the Elixir changelog, version 1.18 brings several significant improvements:Type checking of function calls
The biggest update is expanded type checking capabilities. Elixir’s type system now checks function calls and gradually infers patterns and return types. This means your code gets smarter validation without requiring explicit type annotations. For example, the system can now detect:- Patterns that will never match any argument
- Accessing tuples at invalid indexes
- Branches in a
tryblock that will never match - Attempting to use return values from functions like
raise/2(which by definition never return)
Language Server improvements
Elixir 1.18 introduces compiler locks and listeners that improve how language servers interact with your code. Previously, your project would be compiled once for your use and again for the language server. Now, the compiler lock ensures only one instance compiles your project at a time, while listeners allow different Elixir processes to share compilation results. This means better performance for your language servers, IEx, and Phoenix.Built-in JSON support
Building on Erlang/OTP 27’s additions, Elixir 1.18 includes a nativeJSON module with encoding and decoding functions. The API mirrors the popular Jason library, and includes a JSON.Encoder protocol for customizing how your data types are encoded.
You can even derive the protocol for structs with a simple line:
Parameterized tests and ExUnit groups
Testing gets more powerful with parameterized tests that run your test modules multiple times with different parameters. This is ideal for testing code that behaves differently based on configuration. The new ExUnit groups feature allows more efficient concurrent testing. Tests with shared state can be assigned to the same group (preventing them from running concurrently with each other), while tests in different groups can run in parallel.Using Elixir 1.18 on Platform.sh and Upsun
To start using Elixir 1.18 on your projects, update your.platform.app.yaml or .upsun/config.yaml file with the following runtime configuration: