From 9852d414c3546e52cefc8060e64a741ecedaf161 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Sun, 24 Aug 2025 21:54:30 -0500 Subject: [PATCH 01/15] Clean up some references to elixirkoans.io that was let go --- CNAME | 1 - LICENSE.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index adedccf5..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -elixirkoans.io diff --git a/LICENSE.md b/LICENSE.md index 21701bcb..5d2a478b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2015 http://elixirkoans.io +Copyright (c) 2015 Elixir Koans Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 311801f4c897a275cbf5eddff419d91ad5ba9dbb Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Sun, 24 Aug 2025 21:56:53 -0500 Subject: [PATCH 02/15] Bump dependencies in CI --- .github/workflows/elixir.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 08ca75da..e532943b 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -11,7 +11,7 @@ jobs: build: name: Build and test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 @@ -22,8 +22,8 @@ jobs: - name: Set up Elixir uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f with: - elixir-version: '1.12.3' # Define the elixir version [required] - otp-version: '24.1' # Define the OTP version [required] + elixir-version: '1.18.4' # Define the elixir version [required] + otp-version: '28.0.2' # Define the OTP version [required] - name: Restore dependencies cache uses: actions/cache@v2 with: From 4ac75dd645164bbc37fc9563e05cd7e4571ca648 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Sun, 24 Aug 2025 21:57:53 -0500 Subject: [PATCH 03/15] $ mix deps.update --all --- mix.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mix.lock b/mix.lock index 3acd1054..11335934 100644 --- a/mix.lock +++ b/mix.lock @@ -1,6 +1,6 @@ %{ - "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, - "credo": {:hex, :credo, "1.7.1", "6e26bbcc9e22eefbff7e43188e69924e78818e2fe6282487d0703652bc20fd62", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e9871c6095a4c0381c89b6aa98bc6260a8ba6addccf7f6a53da8849c748a58a2"}, + "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, + "credo": {:hex, :credo, "1.7.12", "9e3c20463de4b5f3f23721527fcaf16722ec815e70ff6c60b86412c695d426c1", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8493d45c656c5427d9c729235b99d498bd133421f3e0a683e5c1b561471291e5"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, - "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, + "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, } From 539e11fd2182726cde7300ae6bd91739a78b48df Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Sun, 24 Aug 2025 21:58:28 -0500 Subject: [PATCH 04/15] $ mix format --- lib/display.ex | 3 ++- lib/display/progress_bar.ex | 4 +++- mix.exs | 21 ++++++++++++--------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/display.ex b/lib/display.ex index 1f57c16f..95d8f427 100644 --- a/lib/display.ex +++ b/lib/display.ex @@ -22,7 +22,7 @@ defmodule Display do end def handle_call(:clear_screen, _from, %{clear_screen: true} = state) do - ANSI.clear <> ANSI.home |> IO.puts() + (ANSI.clear() <> ANSI.home()) |> IO.puts() {:reply, :ok, state} end @@ -58,6 +58,7 @@ defmodule Display do defp format(failure, module, name) do progress_bar = ProgressBar.progress_bar(Tracker.summarize()) progress_bar_underline = String.duplicate("-", String.length(progress_bar)) + """ #{Intro.intro(module, Tracker.visited())} Now meditate upon #{format_module(module)} diff --git a/lib/display/progress_bar.ex b/lib/display/progress_bar.ex index 71c1cdc0..5fd81a04 100644 --- a/lib/display/progress_bar.ex +++ b/lib/display/progress_bar.ex @@ -6,7 +6,9 @@ defmodule Display.ProgressBar do arrow = calculate_progress(current, total) |> build_arrow progress_percentage = calculate_percentage(current, total) - "|" <> String.pad_trailing(arrow, @progress_bar_length) <> "| #{current} of #{total} -> #{progress_percentage}% complete" + "|" <> + String.pad_trailing(arrow, @progress_bar_length) <> + "| #{current} of #{total} -> #{progress_percentage}% complete" end defp calculate_progress(current, total) do diff --git a/mix.exs b/mix.exs index de880795..720c4dfa 100644 --- a/mix.exs +++ b/mix.exs @@ -2,21 +2,24 @@ defmodule Koans.Mixfile do use Mix.Project def project do - [app: :elixir_koans, - version: "0.0.1", - elixir: ">= 1.3.0 and < 2.0.0", - elixirc_paths: elixirc_path(Mix.env), - deps: deps()] + [ + app: :elixir_koans, + version: "0.0.1", + elixir: ">= 1.3.0 and < 2.0.0", + elixirc_paths: elixirc_path(Mix.env()), + deps: deps() + ] end def application do - [mod: {ElixirKoans, []}, - applications: [:file_system, :logger]] + [mod: {ElixirKoans, []}, applications: [:file_system, :logger]] end defp deps do - [{:file_system, "~> 0.2"}, - {:credo, "~> 1.7", only: [:dev, :test], runtime: false}] + [ + {:file_system, "~> 0.2"}, + {:credo, "~> 1.7", only: [:dev, :test], runtime: false} + ] end defp elixirc_path(:test), do: ["lib/", "test/support"] From 62b4e62486d0502f1078686e3badd43221e0a0aa Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Sun, 24 Aug 2025 21:59:36 -0500 Subject: [PATCH 05/15] Bump file_system dependency --- mix.exs | 2 +- mix.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mix.exs b/mix.exs index 720c4dfa..4c852a21 100644 --- a/mix.exs +++ b/mix.exs @@ -17,7 +17,7 @@ defmodule Koans.Mixfile do defp deps do [ - {:file_system, "~> 0.2"}, + {:file_system, "~> 1.1"}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false} ] end diff --git a/mix.lock b/mix.lock index 11335934..004414be 100644 --- a/mix.lock +++ b/mix.lock @@ -1,6 +1,6 @@ %{ "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, "credo": {:hex, :credo, "1.7.12", "9e3c20463de4b5f3f23721527fcaf16722ec815e70ff6c60b86412c695d426c1", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8493d45c656c5427d9c729235b99d498bd133421f3e0a683e5c1b561471291e5"}, - "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, + "file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, } From 93b17b7791d8f1ce9eb0ed97ee7636d38446a573 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Sun, 24 Aug 2025 22:19:32 -0500 Subject: [PATCH 06/15] Bump cache action dep version --- .github/workflows/elixir.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index e532943b..816ad378 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -25,7 +25,7 @@ jobs: elixir-version: '1.18.4' # Define the elixir version [required] otp-version: '28.0.2' # Define the OTP version [required] - name: Restore dependencies cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: deps key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} From e268e74ffb4aaa2932b5f9c930534dd7e2a62a0b Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 07:56:55 -0500 Subject: [PATCH 07/15] Modernize CI action config --- .github/workflows/elixir.yml | 54 +++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 816ad378..4863bc3d 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -8,31 +8,35 @@ on: branches: [ master ] jobs: - build: + test: + runs-on: ubuntu-latest - name: Build and test - runs-on: ubuntu-22.04 + env: + MIX_ENV: test + + strategy: + matrix: + elixir: [1.18.4] + otp: [28.0.2] steps: - - uses: actions/checkout@v2 - - name: System dependencies - run: | - sudo apt update - sudo apt install -y inotify-tools - - name: Set up Elixir - uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f - with: - elixir-version: '1.18.4' # Define the elixir version [required] - otp-version: '28.0.2' # Define the OTP version [required] - - 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: Run tests - run: mix test - - name: Run static analytics - run: mix credo suggest --all --strict + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + elixir-version: ${{ matrix.elixir }} + - uses: actions/cache@v4 + with: + path: | + deps + _build + key: mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}- + + - run: mix deps.get + - run: mix format --check-formatted + - run: mix credo --strict + - run: mix compile --force --warnings-as-errors + - run: mix deps.unlock --check-unused + - run: mix test From 504651bd6f18c1a93c8572e75fd3ab75e59dfbc2 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 07:57:45 -0500 Subject: [PATCH 08/15] All hail, credo! --- lib/koans/03_numbers.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/koans/03_numbers.ex b/lib/koans/03_numbers.ex index 9fb3ab23..d7d73e14 100644 --- a/lib/koans/03_numbers.ex +++ b/lib/koans/03_numbers.ex @@ -124,11 +124,11 @@ defmodule Numbers do assert 0 in range == ___ end - def is_range?(%Range{}), do: true - def is_range?(_), do: false + def range?(%Range{}), do: true + def range?(_), do: false koan "Is this a range?" do - assert is_range?(1..10) == ___ - assert is_range?(0) == ___ + assert range?(1..10) == ___ + assert range?(0) == ___ end end From 17152cb8f94b94461a9841d87c8f51ce22f8bfea Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 07:58:23 -0500 Subject: [PATCH 09/15] Change build step order --- .github/workflows/elixir.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 4863bc3d..a196629c 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -35,8 +35,8 @@ jobs: mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}- - run: mix deps.get + - run: mix compile --force --warnings-as-errors - run: mix format --check-formatted - run: mix credo --strict - - run: mix compile --force --warnings-as-errors - run: mix deps.unlock --check-unused - run: mix test From a9538d366e12bc5e6d2dcb26bf3165d024b314ec Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 07:58:50 -0500 Subject: [PATCH 10/15] Remove warnings check due to repo's purpose (it will warn) --- .github/workflows/elixir.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index a196629c..5dbe94a4 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -35,7 +35,6 @@ jobs: mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}- - run: mix deps.get - - run: mix compile --force --warnings-as-errors - run: mix format --check-formatted - run: mix credo --strict - run: mix deps.unlock --check-unused From 87637c5c8ea16640fb6a319bc59568c4b2cdecc4 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 08:00:35 -0500 Subject: [PATCH 11/15] Add back required system dep --- .github/workflows/elixir.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 5dbe94a4..2f3b16ca 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -21,6 +21,9 @@ jobs: steps: - uses: actions/checkout@v4 + - run: | + sudo apt update + sudo apt install -y inotify-tools - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp }} From 70132bc41230e83ea425e86bed5084b17032a8f0 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 08:04:59 -0500 Subject: [PATCH 12/15] Add names back to build steps --- .github/workflows/elixir.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 2f3b16ca..f2e97e33 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -8,7 +8,7 @@ on: branches: [ master ] jobs: - test: + build: runs-on: ubuntu-latest env: @@ -21,14 +21,17 @@ jobs: steps: - uses: actions/checkout@v4 - - run: | + - name: System Dependencies + run: | sudo apt update sudo apt install -y inotify-tools - - uses: erlef/setup-beam@v1 + - name: Setup Elixir + uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp }} elixir-version: ${{ matrix.elixir }} - - uses: actions/cache@v4 + - name: Restore dependencies cache + uses: actions/cache@v4 with: path: | deps @@ -37,8 +40,13 @@ jobs: restore-keys: | mix-${{ runner.os }}-${{matrix.elixir}}-${{matrix.otp}}- - - run: mix deps.get - - run: mix format --check-formatted - - run: mix credo --strict - - run: mix deps.unlock --check-unused - - run: mix test + - name: Install dependencies + run: mix deps.get + - name: Check code format + run: mix format --check-formatted + - name: Run static analysis + run: mix credo --strict + - name: Check for unneeded dependencies + run: mix deps.unlock --check-unused + - name: Run tests + run: mix test From b4e2f6c8b44ec5d7e9665a79159807df11d0941c Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 08:21:18 -0500 Subject: [PATCH 13/15] Fix a bunch of deprecation warnings --- lib/display/intro.ex | 2 +- lib/execute.ex | 3 ++- lib/koans/03_numbers.ex | 2 +- lib/tracker.ex | 2 +- test/test_helper.exs | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/display/intro.ex b/lib/display/intro.ex index 32ce92d2..85a1c2cb 100644 --- a/lib/display/intro.ex +++ b/lib/display/intro.ex @@ -6,7 +6,7 @@ defmodule Display.Intro do if module in modules do "" else - show_intro(module.intro) + module.intro() |> show_intro() end end diff --git a/lib/execute.ex b/lib/execute.ex index 6c462738..aa8af363 100644 --- a/lib/execute.ex +++ b/lib/execute.ex @@ -1,7 +1,8 @@ defmodule Execute do @moduledoc false def run_module(module, callback \\ fn _result, _module, _koan -> nil end) do - Enum.reduce_while(module.all_koans, :passed, fn koan, _ -> + module.all_koans() + |> Enum.reduce_while(:passed, fn koan, _ -> module |> run_koan(koan) |> hook(module, koan, callback) diff --git a/lib/koans/03_numbers.ex b/lib/koans/03_numbers.ex index d7d73e14..274923d7 100644 --- a/lib/koans/03_numbers.ex +++ b/lib/koans/03_numbers.ex @@ -110,7 +110,7 @@ defmodule Numbers do end koan "I want the first and last in the range" do - first..last = Range.new(1, 10) + first..last//_step = Range.new(1, 10) assert first == ___ assert last == ___ diff --git a/lib/tracker.ex b/lib/tracker.ex index 018dd83b..79c36df8 100644 --- a/lib/tracker.ex +++ b/lib/tracker.ex @@ -18,7 +18,7 @@ defmodule Tracker do def set_total(modules) do total = modules - |> Enum.flat_map(& &1.all_koans) + |> Enum.flat_map(& &1.all_koans()) |> Enum.count() Agent.update(__MODULE__, fn _ -> %Tracker{total: total} end) diff --git a/test/test_helper.exs b/test/test_helper.exs index b7c383e4..bad94561 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -6,7 +6,7 @@ defmodule TestHarness do import ExUnit.Assertions def test_all(module, answers) do - module.all_koans + module.all_koans() |> check_answer_count(answers, module) |> Enum.zip(answers) |> run_all(module) From c5d770effa6fda6f94717f44c9a55af467571287 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 08:32:33 -0500 Subject: [PATCH 14/15] Fix more deprecation warnings --- lib/display/failure.ex | 2 +- lib/elixir_koans.ex | 10 ++++------ test/executor_test.exs | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/display/failure.ex b/lib/display/failure.ex index 57f1e627..88845a1f 100644 --- a/lib/display/failure.ex +++ b/lib/display/failure.ex @@ -50,7 +50,7 @@ defmodule Display.Failure do end defp format_error(error) do - trace = System.stacktrace() |> Enum.take(2) + trace = Process.info(self(), :current_stacktrace) |> Enum.take(2) Paint.red(Exception.format(:error, error, trace)) end diff --git a/lib/elixir_koans.ex b/lib/elixir_koans.ex index dcf857f7..e1dbffa1 100644 --- a/lib/elixir_koans.ex +++ b/lib/elixir_koans.ex @@ -3,13 +3,11 @@ defmodule ElixirKoans do use Application def start(_type, _args) do - import Supervisor.Spec - children = [ - worker(Display, []), - worker(Tracker, []), - worker(Runner, []), - worker(Watcher, []) + %{id: Display, start: {Display, :start_link, []}}, + %{id: Tracker, start: {Tracker, :start_link, []}}, + %{id: Runner, start: {Runner, :start_link, []}}, + %{id: Watcher, start: {Watcher, :start_link, []}} ] opts = [strategy: :one_for_one, name: ElixirKoans.Supervisor] diff --git a/test/executor_test.exs b/test/executor_test.exs index 629c1eea..7248f8f7 100644 --- a/test/executor_test.exs +++ b/test/executor_test.exs @@ -7,7 +7,7 @@ defmodule ExecuteTest do test "stops at the first failing koan" do {:failed, %{file: file, line: line}, SampleKoan, _name} = Execute.run_module(SampleKoan) - assert file == 'test/support/sample_koan.ex' + assert file == ~c'test/support/sample_koan.ex' assert line == 9 end From 4bb42069a4585b9891b7df18d4e967afe792e486 Mon Sep 17 00:00:00 2001 From: Jay Hayes Date: Mon, 25 Aug 2025 08:32:42 -0500 Subject: [PATCH 15/15] Remove some old, backwards-compat code that was warning --- lib/watcher.ex | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/watcher.ex b/lib/watcher.ex index eadb9a38..bbef3e89 100644 --- a/lib/watcher.ex +++ b/lib/watcher.ex @@ -36,15 +36,8 @@ defmodule Watcher do end end - # Elixir 1.7 deprecates Code.load_file in favor of Code.compile_file. In - # order to avoid the depecation warnings while maintaining backwards - # compatibility, we check the sytem version and execute conditionally. defp portable_load_file(file) do - if Version.match?(System.version(), "~> 1.7") do - Code.compile_file(file) - else - Code.load_file(file) - end + Code.compile_file(file) end defp normalize(file) do