Skip to content

Commit

Permalink
Fix compile time deprecation warnings (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacorti authored Oct 22, 2024
1 parent be194d6 commit 3cc45a3
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 34 deletions.
58 changes: 34 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,48 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
otp: [24.x, 25.x, 26.x]
elixir: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x]
otp: [24.x, 25.x, 26.x, 27.x]
elixir: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x]
exclude:
- otp: 27.x
elixir: 1.16.x
- otp: 27.x
elixir: 1.15.x
- otp: 27.x
elixir: 1.14.x
- otp: 27.x
elixir: 1.13.x
- otp: 27.x
elixir: 1.12.x
- otp: 26.x
elixir: 1.13.x
- otp: 26.x
elixir: 1.12.x
- otp: 26.x
elixir: 1.11.x
- otp: 25.x
elixir: 1.12.x
elixir: 1.13.x
- otp: 25.x
elixir: 1.11.x
elixir: 1.12.x
- otp: 24.x
elixir: 1.17.x
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install Dependencies
run: mix deps.get
- name: Install Dependencies
run: mix deps.get

- name: Check format
if: matrix.check_format
run: mix format --check-formatted
- name: Check format
if: matrix.check_format
run: mix format --check-formatted

- name: Run Tests
run: mix test
- name: Run Tests
run: mix test
2 changes: 1 addition & 1 deletion lib/saxy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ defmodule Saxy do
iex> prolog = [version: "1.0"]
iex> Saxy.encode_to_iodata!(root, prolog)
[
['<?xml', [32, 'version', 61, 34, "1.0", 34], [], [], '?>'],
[~c'<?xml', [32, ~c'version', 61, 34, "1.0", 34], [], [], ~c'?>'],
[60, "foo", 32, "foo", 61, 34, "bar", 34],
62,
["bar"],
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Saxy.MixProject do
[
app: :saxy,
version: @version,
elixir: "~> 1.11",
elixir: "~> 1.12",
name: "Saxy",
consolidate_protocols: Mix.env() != :test,
deps: deps(),
Expand Down Expand Up @@ -36,7 +36,7 @@ defmodule Saxy.MixProject do
defp deps() do
[
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:stream_data, "~> 0.5", only: [:dev, :test]}
{:stream_data, "~> 1.0", only: [:dev, :test]}
]
end

Expand Down
11 changes: 5 additions & 6 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
%{
"earmark": {:hex, :earmark, "1.2.5", "4d21980d5d2862a2e13ec3c49ad9ad783ffc7ca5769cf6ff891a4553fbaae761", [:mix], [], "hexpm", "c57508ddad47dfb8038ca6de1e616e66e9b87313220ac5d9817bc4a4dc2257b9"},
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
"ex_doc": {:hex, :ex_doc, "0.32.1", "21e40f939515373bcdc9cffe65f3b3543f05015ac6c3d01d991874129d173420", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "5142c9db521f106d61ff33250f779807ed2a88620e472ac95dc7d59c380113da"},
"makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"},
"earmark_parser": {:hex, :earmark_parser, "1.4.41", "ab34711c9dc6212dda44fcd20ecb87ac3f3fce6f0ca2f28d4a00e4154f8cd599", [:mix], [], "hexpm", "a81a04c7e34b6617c2792e291b5a2e57ab316365c2644ddc553bb9ed863ebefa"},
"ex_doc": {:hex, :ex_doc, "0.34.2", "13eedf3844ccdce25cfd837b99bea9ad92c4e511233199440488d217c92571e8", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "5ce5f16b41208a50106afed3de6a2ed34f4acfd65715b82a0b84b49d995f95c1"},
"makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.5", "e0ff5a7c708dda34311f7522a8758e23bfcd7d8d8068dc312b5eb41c6fd76eba", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "94d2e986428585a21516d7d7149781480013c56e30c6a233534bedf38867a59a"},
"makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"},
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
"stream_data": {:hex, :stream_data, "0.6.0", "e87a9a79d7ec23d10ff83eb025141ef4915eeb09d4491f79e52f2562b73e5f47", [:mix], [], "hexpm", "b92b5031b650ca480ced047578f1d57ea6dd563f5b57464ad274718c9c29501c"},
"stream_data": {:hex, :stream_data, "1.1.1", "fd515ca95619cca83ba08b20f5e814aaf1e5ebff114659dc9731f966c9226246", [:mix], [], "hexpm", "45d0cd46bd06738463fd53f22b70042dbb58c384bb99ef4e7576e7bb7d3b8c8c"},
}
2 changes: 1 addition & 1 deletion test/saxy/encoder_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ defmodule Saxy.EncoderTest do

test "generates deeply nested document" do
{document, xml} =
Enum.reduce(100..1, {"content", "content"}, fn index, {document, xml} ->
Enum.reduce(100..1//-1, {"content", "content"}, fn index, {document, xml} ->
{
Saxy.XML.element("level#{index}", [], document),
"<level#{index}>#{xml}</level#{index}>"
Expand Down

0 comments on commit 3cc45a3

Please sign in to comment.