From 67bc96f0a6ce964ab8c555588393f0b81836696b Mon Sep 17 00:00:00 2001 From: Patrick Olsen Date: Fri, 5 Jun 2026 17:59:20 +0700 Subject: [PATCH] Replace deprecated xref: [exclude:] with elixirc_options: [no_warn_undefined:] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Elixir 1.20 deprecates the project-level `xref: [exclude: ...]` option in favor of `elixirc_options: [no_warn_undefined: ...]`, which has been the canonical compiler option since Elixir 1.7. mint requires `~> 1.12`, so the new option is valid across the entire supported range — no version gating needed. Behavior is identical: the same modules/MFAs are excluded from undefined-function warnings. Verified `mix compile --warnings-as-errors` stays clean with castore (optional) absent. Co-Authored-By: Claude Opus 4.8 (1M context) --- mix.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mix.exs b/mix.exs index 41f520d6..e2674699 100644 --- a/mix.exs +++ b/mix.exs @@ -13,9 +13,9 @@ defmodule Mint.MixProject do elixirc_paths: elixirc_paths(Mix.env()), deps: deps(), - # Xref - xref: [ - exclude: [ + # Suppress "undefined function" warnings for optional/runtime deps. + elixirc_options: [ + no_warn_undefined: [ {:ssl, :cipher_suites, 1}, {:public_key, :cacerts_get, 0}, CAStore