Repository: jeremyjh/dialyxir
Pull request #436 (2021-08-03 23:40:39)

update CI to the latest Elixir 1.11 and Erlang 23. Add Elixir 1.12 and Erlang 24
Also upgrades the local Elixir version to `1.12.2` and the Erlang version to `24.0.5`. This also includes a `mix format` since Elixir 1.12 made a backwards incompatible formatting change as well as only running the format check in CI on Elixir 1.12+. 


This also changes CI to not fail as soon a single job fails, this is needed for now, since CI fails on Erlang 24. This is probably for the better since you can see if CI fails for just a single Elixir / Erlang combination or for all of them.

jeremyjh: Hi, thanks for working on this! I think to resolve the errors on OTP 24 we could just remove this entire check from the tests: https://github.com/jeremyjh/dialyxir/blob/242c0e89fd08535eedfdb971993bb550b32bdcce/.github/workflows/test.yml#L97; it would be hard to keep broad compatibility and still check this.

Also, I would be fine with dropping the 1.9.4 targets entirely since that is 4 releases ago, my original thought was to support the 3 most recent releases anyway.
baseballlover723: This has been updated
baseballlover723: I have no idea why the tests fail now, but most of them did work when I originally pushed it up, https://github.com/jeremyjh/dialyxir/runs/3248958978

jeremyjh: The problem is we're no longer running any dialyzer check before the output_test, so output_test has to build the PLTs etc. Re-ordering the output tests [like this](https://github.com/jeremyjh/dialyxir/pull/440/commits/9acf8808e276220e4fbe10896f7391c164e02b7e) will fix it. 

Patch:
diff --git a/.tool-versions b/.tool-versions
index 6dc0e9f..a3c95f7 100644
--- a/.tool-versions
+++ b/.tool-versions
@@ -1,2 +1,2 @@
-elixir 1.11.1
-erlang 23.1.1
+elixir 1.12.2
+erlang 24.0.5
diff --git a/lib/dialyxir/warnings/function_application_no_function.ex b/lib/dialyxir/warnings/function_application_no_function.ex
index 4258221..f776f5b 100644
--- a/lib/dialyxir/warnings/function_application_no_function.ex
+++ b/lib/dialyxir/warnings/function_application_no_function.ex
@@ -30,9 +30,7 @@ defmodule Dialyxir.Warnings.FunctionApplicationNoFunction do
     pretty_op = Erlex.pretty_print(op)
     pretty_type = Erlex.pretty_print_type(type)
 
-    "Function application will fail, because #{pretty_op} :: #{pretty_type} is not a function of arity #{
-      arity
-    }."
+    "Function application will fail, because #{pretty_op} :: #{pretty_type} is not a function of arity #{arity}."
   end
 
   @impl Dialyxir.Warning
diff --git a/lib/dialyxir/warnings/opaque_match.ex b/lib/dialyxir/warnings/opaque_match.ex
index 95659be..fb6f9a0 100644
--- a/lib/dialyxir/warnings/opaque_match.ex
+++ b/lib/dialyxir/warnings/opaque_match.ex
@@ -36,9 +36,7 @@ defmodule Dialyxir.Warnings.OpaqueMatch do
   def format_short([_pattern, type | _]) do
     pretty_type = Erlex.pretty_print_type(type)
 
-    "Attempted to pattern match against the internal structure of an opaque term of type #{
-      pretty_type
-    }."
+    "Attempted to pattern match against the internal structure of an opaque term of type #{pretty_type}."
   end
 
   @impl Dialyxir.Warning


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 9aefd58..b2706db 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -30,22 +30,26 @@ jobs:
     if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}
 
     strategy:
+      fail-fast: false
       matrix:
         elixir:
-        - '1.9.4'
         - '1.10.4'
-        - '1.11.1'
+        - '1.11.4'
+        - '1.12.2'
         otp:
-        - '21.3'
         - '22.3'
-        - '23.0'
+        - '23.3'
+        - '24.0'
+        exclude:
+          - elixir: '1.10.4'
+            otp: '24.0'
 
     steps:
     - name: Checkout
       uses: actions/checkout@v2
 
     - name: Set up Elixir
-      uses: erlef/setup-elixir@v1
+      uses: erlef/setup-beam@v1
       with:
         elixir-version: ${{ matrix.elixir }}
         otp-version: ${{ matrix.otp }}
@@ -81,18 +85,9 @@ jobs:
         MIX_ENV: prod
 
     - name: Check source code formatting
+      if: ${{ matrix.elixir > '1.12.0' }}
       run: mix format --check-formatted
 
-    - name: Check source code formatting
-      run: mix dialyzer --list-unused-filters
-      env:
-        MIX_ENV: prod
-
-    - name: Run output tests
-      run: mix test
-      env:
-        OUTPUT_TESTS: true
-
     - name: Get results in short format
       run: mix dialyzer --format short
       env:
@@ -113,6 +108,11 @@ jobs:
       env:
         MIX_ENV: prod
 
+    - name: Run output tests
+      run: mix test
+      env:
+        OUTPUT_TESTS: true
+
     - name: Check examples
       run: mix dialyzer --format short --ignore-exit-status
       env: