build: require Elixir 1.19.5 or newer - #5507
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Thanks, not sure if this is the right direction. Older Elixir versions complain, newer versions are fine. |
|
Yep, you’re right ; my wording there was backwards. The warning happens on Elixir 1.18.4; 1.19.5 is fine. This came from the Inspect implementation I added in #5475.
So this PR is restoring the currently stated compatibility rather than fixing newer Elixir. I’ve corrected the PR description as well. If the intended direction is to require 1.19.5 everywhere instead, then I agree the cleaner option is to close this and tighten |
There was a problem hiding this comment.
Pull request overview
This PR updates how TeslaApi.Error values are rendered via the Inspect protocol to avoid calling the private Inspect.Map.inspect_as_struct/4, which causes warnings-as-errors failures on Elixir 1.18.4+ / OTP 28. It switches to the public Inspect.Algebra.container_doc/6 API while keeping struct-shaped output and preserving credential redaction behavior.
Changes:
- Replaced
Inspect.Map.inspect_as_struct/4usage withInspect.Algebra.container_doc/6inTeslaApi.Error’sInspectimplementation. - Kept output limited to
reason,message, andenvfields while ensuring redaction is applied before formatting. - Strengthened the redaction test to assert the inspected output remains struct-shaped (
%TeslaApi.Error{...}).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/tesla_api/error.ex | Switches error inspection to Inspect.Algebra.container_doc/6 to eliminate private API usage while preserving redaction and struct-like formatting. |
| test/tesla_api/error_test.exs | Adds an assertion ensuring the inspected error remains %TeslaApi.Error{...} while still verifying secrets are redacted. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
That's my thinking, but we need to check if Debian and FreeBSD from the manual installation support it. Yes they are marked as unsupported but hard to drop atm. |
9eeb107 to
e9561fb
Compare
|
Yep, checked both and changed the PR to that direction. Debian Trixie's stock package is Elixir 1.18.3 on OTP 27, so it already does not meet the current OTP 28 requirement. FreeBSD 14 with the latest package repository provides Elixir 1.19.5 and OTP 28, while older and quarterly repositories can lag. I removed the Inspect workaround completely. The PR now tightens Full |
e9561fb to
1567e28
Compare
|
Looks good for the Elixir-related changes. teslamate/lib/teslamate/database_check.ex Lines 11 to 17 in 4e11474 |
Summary
mix.exs, matching the current official image and CI runtime.Package check
Checked on 2026-07-15:
The previous Inspect compatibility workaround has been removed completely. This does not add a version matrix.
Validation
mix cion Elixir 1.19.5 / Erlang/OTP 28 with PostgreSQL 18.4: 361 tests, 0 failuresnpm run buildinwebsiteCloses #5505