diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f964614..09c330e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,197 +1,121 @@ name: CI - -on: - pull_request: - push: - branches: - - main - env: - CACHE_PREFIX_DEPS: v1-deps - CACHE_PREFIX_BUILD: v1-_build - CACHE_PREFIX_DIALYZER: v1-dialyzer - + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +on: + - pull_request + - push jobs: - mix_test: - name: mix test (Erlang/OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}} | Alpine ${{ matrix.alpine }}) + linux: + name: Test on Ubuntu (Elixir ${{ matrix.elixir }}, OTP ${{ matrix.otp }}) runs-on: ubuntu-latest - container: hexpm/elixir:${{ matrix.elixir }}-erlang-${{ matrix.otp }}-alpine-${{ matrix.alpine }} - env: - MIX_ENV: test - VERSION_ALPINE: ${{ matrix.alpine }} - VERSION_ELIXIR: ${{ matrix.elixir }} - VERSION_OTP: ${{ matrix.otp }} strategy: - fail-fast: false matrix: - include: - - alpine: 3.11.6 - elixir: 1.7.4 - otp: 20.3.8.19 - - alpine: 3.11.6 - elixir: 1.8.2 - otp: 20.3.8.19 - - alpine: 3.11.6 - elixir: 1.9.4 - otp: 20.3.8.19 - - alpine: 3.11.6 - elixir: 1.9.4 - otp: 21.3.8.16 - - alpine: 3.11.6 - elixir: 1.10.3 - otp: 21.3.8.16 - - alpine: 3.11.6 - elixir: 1.11.2 - otp: 22.3.4.3 - - alpine: 3.11.6 - elixir: 1.11.2 - otp: 23.0.2 - - alpine: 3.14.0 - elixir: 1.12.3 - otp: 24.1.1 - steps: - - uses: actions/checkout@v2 - - - name: Cache - deps/ - uses: actions/cache@v1 - with: - path: deps/ - key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- - - - name: Install Dependencies - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get --only "$MIX_ENV" - - - name: Cache - _build/ - uses: actions/cache@v1 - with: - path: _build/ - key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- - - - run: mix compile --warnings-as-errors - - run: mix test - - coverage: - name: Collect Test Coverage - runs-on: ubuntu-latest - container: hexpm/elixir:1.11.2-erlang-22.3.4.3-alpine-3.11.6 - env: - MIX_ENV: test - VERSION_ALPINE: 3.11.6 - VERSION_ELIXIR: 1.11.2 - VERSION_OTP: 22.3.4.3 - steps: - - name: Install git (required for mix coveralls.github) - run: apk add --no-cache git - - # mix coveralls.github uses git to fetch the pr head so we ensure the whole history is available - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Cache - deps/ - uses: actions/cache@v1 - with: - path: deps/ - key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP}}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP}}- - - - name: Install Dependencies - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get --only "$MIX_ENV" - - - name: Cache - _build/ - uses: actions/cache@v1 - with: - path: _build/ - key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- - - - run: mix compile --warnings-as-errors - - run: mix coveralls.github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - check_style: - name: Check Style - runs-on: ubuntu-latest - container: hexpm/elixir:1.11.2-erlang-22.3.4.3-alpine-3.11.6 - env: - MIX_ENV: dev - VERSION_ALPINE: 3.11.6 - VERSION_ELIXIR: 1.11.2 - VERSION_OTP: 22.3.4.3 + elixir: + - '1.7.4' + - '1.8.2' + - '1.9.4' + - '1.10.4' + - '1.11.4' + - '1.12.3' + - '1.13.4' + - '1.14.1' + otp: + - '20.3' + - '21.3' + - '22.3' + - '23.3' + - '24.3' + - '25.1' + exclude: + - elixir: '1.7.4' + otp: '23.3' + - elixir: '1.7.4' + otp: '24.3' + - elixir: '1.7.4' + otp: '25.1' + - elixir: '1.8.2' + otp: '23.3' + - elixir: '1.8.2' + otp: '24.3' + - elixir: '1.8.2' + otp: '25.1' + - elixir: '1.9.4' + otp: '23.3' + - elixir: '1.9.4' + otp: '24.3' + - elixir: '1.9.4' + otp: '25.1' + - elixir: '1.10.4' + otp: '20.3' + - elixir: '1.10.4' + otp: '24.3' + - elixir: '1.10.4' + otp: '25.1' + - elixir: '1.11.4' + otp: '20.3' + - elixir: '1.11.4' + otp: '25.1' + - elixir: '1.12.3' + otp: '20.3' + - elixir: '1.12.3' + otp: '21.3' + - elixir: '1.12.3' + otp: '25.1' + - elixir: '1.13.4' + otp: '20.3' + - elixir: '1.13.4' + otp: '21.3' + - elixir: '1.14.1' + otp: '20.3' + - elixir: '1.14.1' + otp: '21.3' + - elixir: '1.14.1' + otp: '22.3' steps: - - uses: actions/checkout@v2 - - - name: Cache - deps/ - uses: actions/cache@v1 + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Elixir + uses: erlef/setup-beam@v1 with: - path: deps/ - key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- - - - name: Install Dependencies - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get --only "$MIX_ENV" - - - name: Cache - _build/ - uses: actions/cache@v1 - with: - path: _build/ - key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- - - - run: mix compile --warnings-as-errors - - run: mix format --check-formatted - - run: mix credo - - check_types: - name: Check Types - runs-on: ubuntu-latest - container: hexpm/elixir:1.11.2-erlang-22.3.4.3-alpine-3.11.6 - env: - MIX_ENV: dev - VERSION_ALPINE: 3.11.6 - VERSION_ELIXIR: 1.11.2 - VERSION_OTP: 22.3.4.3 - steps: - - uses: actions/checkout@v2 - - - name: Cache - deps/ - uses: actions/cache@v1 + elixir-version: ${{ matrix.elixir }} + otp-version: ${{ matrix.otp }} + - name: Restore deps + uses: actions/cache@v3 with: - path: deps/ - key: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_DEPS }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- - - - name: Install Dependencies - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get --only "$MIX_ENV" - - - name: Cache - _build/ - uses: actions/cache@v1 + path: deps + key: deps-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + - name: Restore _build + uses: actions/cache@v3 with: - path: _build/ - key: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ env.CACHE_PREFIX_BUILD }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }}- - - - run: mix compile --warnings-as-errors - - - name: Cache - Dialyzer PLTs - uses: actions/cache@v1 + path: _build + key: _build-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + - name: Restore .dialyzer + uses: actions/cache@v3 with: - path: .dialyzer/ - key: ${{ env.CACHE_PREFIX_DIALYZER }}-env:${{ env.MIX_ENV }}-alpine:${{ env.VERSION_ALPINE }}-elixir:${{ env.VERSION_ELIXIR }}-otp:${{ env.VERSION_OTP }} - - - run: mix dialyzer + path: .dialyzer + key: .dialyzer-${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + if: ${{ contains(matrix.elixir, '1.14.1') && contains(matrix.otp, '25.1') }} + - name: Get dependencies + run: mix deps.get + - name: Compile dependencies + run: MIX_ENV=test mix deps.compile + - name: Compile project + run: MIX_ENV=test mix compile --warnings-as-errors + - name: Check unused dependencies + if: ${{ contains(matrix.elixir, '1.14.1') && contains(matrix.otp, '25.1') }} + run: MIX_ENV=test mix deps.unlock --check-unused + - name: Check code format + if: ${{ contains(matrix.elixir, '1.14.1') && contains(matrix.otp, '25.1') }} + run: MIX_ENV=test mix format --check-formatted + - name: Lint code + if: ${{ contains(matrix.elixir, '1.14.1') && contains(matrix.otp, '25.1') }} + run: MIX_ENV=dev mix credo --strict + - name: Run tests + run: MIX_ENV=test mix test + if: ${{ !(contains(matrix.elixir, '1.14.1') && contains(matrix.otp, '25.1')) }} + - name: Run tests with coverage + run: MIX_ENV=test mix coveralls.github + if: ${{ contains(matrix.elixir, '1.14.1') && contains(matrix.otp, '25.1') }} + - name: Static code analysis + run: mix dialyzer + if: ${{ contains(matrix.elixir, '1.14.1') && contains(matrix.otp, '25.1') }} diff --git a/.tool-versions b/.tool-versions index 3ecd375..e4f68f1 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.12.2 -erlang 23.3.4.5 +elixir 1.14.1-otp-25 +erlang 25.1.1 diff --git a/lib/knigge/options.ex b/lib/knigge/options.ex index a8e5bee..8345173 100644 --- a/lib/knigge/options.ex +++ b/lib/knigge/options.ex @@ -54,9 +54,7 @@ defmodule Knigge.Options do - `[only: ]` - equivalent to the option above - `[except: ]` - only delegates at runtime if the current environment is __not__ contained in the list - __Default__: `Application.get_env(:knigge, :delegate_at_runtime?, #{ - inspect(@defaults[:delegate_at_runtime?]) - })` + __Default__: `Application.get_env(:knigge, :delegate_at_runtime?, #{inspect(@defaults[:delegate_at_runtime?])})` ### `do_not_delegate` A keyword list defining callbacks for which no delegation should happen. @@ -156,9 +154,7 @@ defmodule Knigge.Options do message when is_binary(message) -> IO.warn( - "Knigge encountered the deprecated option `#{key}`, this option is no longer supported; #{ - message - }." + "Knigge encountered the deprecated option `#{key}`, this option is no longer supported; #{message}." ) nil @@ -178,13 +174,7 @@ defmodule Knigge.Options do @doc """ Applies the defaults to the given options: - #{ - @defaults - |> Enum.map(fn {key, value} -> - " - #{key} = #{inspect(value)}" - end) - |> Enum.join("\n") - } + #{Enum.map_join(@defaults, "\n", fn {key, value} -> " - `#{key} = #{inspect(value)}`" end)} """ @spec with_defaults(raw()) :: raw() def with_defaults(opts) do diff --git a/lib/knigge/warnings.ex b/lib/knigge/warnings.ex index 9adf941..bac8848 100644 --- a/lib/knigge/warnings.ex +++ b/lib/knigge/warnings.ex @@ -27,9 +27,7 @@ defmodule Knigge.Warnings do There are two ways to resolve this warning: 1. move the behaviour into a separate module and `use Knigge, behaviour: MyBehaviour`; - this enables to compiler to finish compilation of `#{inspect(implementation)}` before compiling `#{ - inspect(module) - }` + this enables to compiler to finish compilation of `#{inspect(implementation)}` before compiling `#{inspect(module)}` 2. pass `delegate_at_runtime?: true` as option, this will move **all** delegation to runtime """) end diff --git a/lib/mix/tasks/knigge/verify.ex b/lib/mix/tasks/knigge/verify.ex index 9e56a78..f5f7c36 100644 --- a/lib/mix/tasks/knigge/verify.ex +++ b/lib/mix/tasks/knigge/verify.ex @@ -72,10 +72,7 @@ defmodule Mix.Tasks.Knigge.Verify do end defp unknown_switches(errors) do - options = - errors - |> Enum.map(&elem(&1, 0)) - |> Enum.join(", ") + options = Enum.map_join(errors, ", ", &elem(&1, 0)) {:error, {:unknown_options, "Unknown switch(es) received: " <> options}} end diff --git a/mix.exs b/mix.exs index cf5b1fc..38dd562 100644 --- a/mix.exs +++ b/mix.exs @@ -64,7 +64,7 @@ defmodule Knigge.MixProject do # Test {:excoveralls, "~> 0.13", only: :test}, - {:mox, "~> 0.5", only: :test}, + {:mox, "~> 1.0", only: :test}, # Docs {:inch_ex, ">= 0.0.0", only: :docs} @@ -74,7 +74,7 @@ defmodule Knigge.MixProject do defp dialyzer do [ ignore_warnings: ".dialyzer_ignore.exs", - plt_add_apps: [:bunt], + plt_add_apps: [:bunt, :mix], plt_file: {:no_warn, ".dialyzer/dialyzer.plt"} ] end diff --git a/mix.lock b/mix.lock index dc6748c..d86bce1 100644 --- a/mix.lock +++ b/mix.lock @@ -1,25 +1,25 @@ %{ - "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, - "certifi": {:hex, :certifi, "2.5.2", "b7cfeae9d2ed395695dd8201c57a2d019c0c43ecaf8b8bcb9320b40d6662f340", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040"}, - "credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [:mix], [{:bunt, "~> 0.2.0", [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", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"}, - "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"}, - "earmark": {:hex, :earmark, "1.3.3", "5e8be428fcef362692b6dbd7dc55bdc7023da26d995cb3fb19aa4bd682bfd3f9", [:mix], [], "hexpm", "a4f21ad675cd496b4b124b00cd7884add73ef836bbfeaa6a85a818df5690a182"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.11", "94f948c14884dcf34e90fa2026a89d9644fc9a4b4370fe87faa9b1501e0a517e", [:mix], [], "hexpm", "d32b0cea6b5bd009171d5196504a3c2b384b12acba538b206f0d506d26b911bc"}, + "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, + "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, + "credo": {:hex, :credo, "1.6.7", "323f5734350fd23a456f2688b9430e7d517afb313fbd38671b8a4449798a7854", [: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", "41e110bfb007f7eda7f897c10bf019ceab9a0b269ce79f015d54b0dcf4fc7dd3"}, + "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.28", "0bf6546eb7cd6185ae086cbc5d20cd6dbb4b428aad14c02c49f7b554484b4586", [:mix], [], "hexpm", "501cef12286a3231dc80c81352a9453decf9586977f917a96e619293132743fb"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "ex_doc": {:hex, :ex_doc, "0.23.0", "a069bc9b0bf8efe323ecde8c0d62afc13d308b1fa3d228b65bca5cf8703a529d", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "f5e2c4702468b2fd11b10d39416ddadd2fcdd173ba2a0285ebd92c39827a5a16"}, - "excoveralls": {:hex, :excoveralls, "0.13.3", "edc5f69218f84c2bf61b3609a22ddf1cec0fbf7d1ba79e59f4c16d42ea4347ed", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cc26f48d2f68666380b83d8aafda0fffc65dafcc8d8650358e0b61f6a99b1154"}, + "ex_doc": {:hex, :ex_doc, "0.28.6", "2bbd7a143d3014fc26de9056793e97600ae8978af2ced82c2575f130b7c0d7d7", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "bca1441614654710ba37a0e173079273d619f9160cbcc8cd04e6bd59f1ad0e29"}, + "excoveralls": {:hex, :excoveralls, "0.15.0", "ac941bf85f9f201a9626cc42b2232b251ad8738da993cf406a4290cacf562ea4", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "9631912006b27eca30a2f3c93562bc7ae15980afb014ceb8147dc5cdd8f376f1"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, - "hackney": {:hex, :hackney, "1.16.0", "5096ac8e823e3a441477b2d187e30dd3fff1a82991a806b2003845ce72ce2d84", [:rebar3], [{:certifi, "2.5.2", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.1", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.0", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.6", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "3bf0bebbd5d3092a3543b783bf065165fa5d3ad4b899b836810e513064134e18"}, - "idna": {:hex, :idna, "6.0.1", "1d038fb2e7668ce41fbf681d2c45902e52b3cb9e9c77b55334353b222c2ee50c", [:rebar3], [{:unicode_util_compat, "0.5.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a02c8a1c4fd601215bb0b0324c8a6986749f807ce35f25449ec9e69758708122"}, + "hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~>2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"}, + "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, "inch_ex": {:hex, :inch_ex, "2.0.0", "24268a9284a1751f2ceda569cd978e1fa394c977c45c331bb52a405de544f4de", [:mix], [{:bunt, "~> 0.2", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "96d0ec5ecac8cf63142d02f16b7ab7152cf0f0f1a185a80161b758383c9399a8"}, - "jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"}, - "makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"}, - "makeup_elixir": {:hex, :makeup_elixir, "0.15.0", "98312c9f0d3730fde4049985a1105da5155bfe5c11e47bdc7406d88e01e4219b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "75ffa34ab1056b7e24844c90bfc62aaf6f3a37a15faa76b07bc5eba27e4a8b4a"}, + "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, + "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, - "mox": {:hex, :mox, "0.5.1", "f86bb36026aac1e6f924a4b6d024b05e9adbed5c63e8daa069bd66fb3292165b", [:mix], [], "hexpm", "052346cf322311c49a0f22789f3698eea030eec09b8c47367f0686ef2634ae14"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"}, - "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm", "17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960"}, + "mox": {:hex, :mox, "1.0.2", "dc2057289ac478b35760ba74165b4b3f402f68803dd5aecd3bfd19c183815d64", [:mix], [], "hexpm", "f9864921b3aaf763c8741b5b8e6f908f44566f1e427b2630e89e9a73b981fef2"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, + "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, - "unicode_util_compat": {:hex, :unicode_util_compat, "0.5.0", "8516502659002cec19e244ebd90d312183064be95025a319a6c7e89f4bccd65b", [:rebar3], [], "hexpm", "d48d002e15f5cc105a696cf2f1bbb3fc72b4b770a184d8420c8db20da2674b38"}, + "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, } diff --git a/test/behaviour/with_defdefault_for_open_module_test.exs b/test/behaviour/with_defdefault_for_open_module_test.exs index eeabaff..d532754 100644 --- a/test/behaviour/with_defdefault_for_open_module_test.exs +++ b/test/behaviour/with_defdefault_for_open_module_test.exs @@ -54,9 +54,7 @@ defmodule Behaviour.WithDefdefaultForOpenModuleTest do There are two ways to resolve this warning: 1. move the behaviour into a separate module and `use Knigge, behaviour: MyBehaviour`; - this enables to compiler to finish compilation of `#{inspect(implementation)}` before compiling `#{ - inspect(facade) - }` + this enables to compiler to finish compilation of `#{inspect(implementation)}` before compiling `#{inspect(facade)}` 2. pass `delegate_at_runtime?: true` as option, this will move **all** delegation to runtime """ )