From 9e4f23291a5fc91c653ea9656fd9a58f404df16f Mon Sep 17 00:00:00 2001 From: Brett Bruschke Date: Fri, 21 Nov 2025 14:14:20 -0600 Subject: [PATCH 1/2] Fix Enum.slice deprecation warning in parse_udp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace deprecated Enum.slice(0..-2//-1) syntax with Enum.slice(0..-2//1) to fix warning in Elixir 1.18: warning: negative steps are not supported in Enum.slice/2, pass 0..-2//1 instead This warning appears in lib/tds/protocol.ex:394 when connecting to SQL Server instances via UDP for instance discovery. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- lib/tds/protocol.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tds/protocol.ex b/lib/tds/protocol.ex index 44c1057..612a916 100644 --- a/lib/tds/protocol.ex +++ b/lib/tds/protocol.ex @@ -391,7 +391,7 @@ defmodule Tds.Protocol do server = data |> String.split(";;") - |> Enum.slice(0..-2//-1) + |> Enum.slice(0..-2//1) |> Enum.reduce([], fn str, acc -> server = str From b495bfce458ac6e54557f43a86a7c9ef13504604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 24 Nov 2025 15:46:58 +0100 Subject: [PATCH 2/2] Update lib/tds/protocol.ex --- lib/tds/protocol.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tds/protocol.ex b/lib/tds/protocol.ex index 612a916..d0b0a7f 100644 --- a/lib/tds/protocol.ex +++ b/lib/tds/protocol.ex @@ -391,7 +391,7 @@ defmodule Tds.Protocol do server = data |> String.split(";;") - |> Enum.slice(0..-2//1) + |> Enum.drop(-1) |> Enum.reduce([], fn str, acc -> server = str