Skip to content

feat: update Erlang OTP and Elixir - #2057

Open
leandrocp wants to merge 4 commits into
mainfrom
lp-up-otp-elixir
Open

feat: update Erlang OTP and Elixir#2057
leandrocp wants to merge 4 commits into
mainfrom
lp-up-otp-elixir

Conversation

@leandrocp

Copy link
Copy Markdown
Member

Ref REAL-926

Comment thread Dockerfile
Comment on lines +1 to +2
ARG ELIXIR_VERSION=1.19.5
ARG OTP_VERSION=28.5.0.4

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using exact version (major.minor.patch) everywhere because it's safer, more predictable, and easier to grep/replace.

Comment thread Dockerfile
ARG DEBIAN_VERSION=bookworm-20250929-slim
ARG ELIXIR_VERSION=1.19.5
ARG OTP_VERSION=28.5.0.4
ARG DEBIAN_VERSION=trixie-20260713-slim

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating from oldstable to stable because Debian trixie is well.. very stable even tho oldstable still gets security patches.

Comment thread lib/realtime/application.ex Outdated
Comment thread config/runtime.exs
@blacksmith-sh

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

CRAP Score Report

==> typed_struct
Compiling 2 files (.ex)
Generated typed_struct app
==> boundary
Compiling 15 files (.ex)
Generated boundary app
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> floki
Compiling 2 files (.erl)
Compiling 30 files (.ex)
Generated floki app
==> eternal
Compiling 5 files (.ex)
Generated eternal app
==> mime
Compiling 1 file (.ex)
Generated mime app
==> nimble_options
Compiling 3 files (.ex)
Generated nimble_options app
==> bunt
Compiling 2 files (.ex)
Generated bunt app
==> recon
Compiling 6 files (.erl)
Generated recon app
==> statistex
Compiling 4 files (.ex)
Generated statistex app
==> ham
Compiling 6 files (.ex)
Generated ham app
==> plug_crypto
Compiling 5 files (.ex)
Generated plug_crypto app
==> hpax
Compiling 4 files (.ex)
Generated hpax app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/sleeplocks/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling sleeplocks
==> jose
Compiling 112 files (.erl)
Compiling 8 files (.ex)
Generated jose app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/ranch/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling ranch
==> ssl_verify_fun
Compiling 7 files (.erl)
Generated ssl_verify_fun app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/snabbkaffe/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling snabbkaffe
==> observer_cli
Compiling 13 files (.erl)
Generated observer_cli app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/ctx/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling ctx
==> table_rex
Compiling 7 files (.ex)
Generated table_rex app
==> jumper
Compiling 1 file (.ex)
Generated jumper app
==> ex_hash_ring
Compiling 7 files (.ex)
Generated ex_hash_ring app
==> bertex
Compiling 1 file (.ex)
Generated bertex app
==> ex_crap
Compiling 8 files (.ex)
Generated ex_crap app
==> castore
Compiling 1 file (.ex)
Generated castore app
==> mint
Compiling 1 file (.erl)
Compiling 19 files (.ex)
Generated mint app
==> mint_web_socket
Compiling 7 files (.ex)
     warning: a struct for Mint.WebSocket.Extension is expected on struct update:

         %Mint.WebSocket.Extension{client_extension | params: server_extension.params}

     but got type:

         dynamic()

     where "client_extension" was given the type:

         # type: dynamic()
         # from: lib/mint/web_socket/extension.ex:219:34
         {:ok, client_extension} <- Map.fetch(client_extension_mapping, server_extension.name)

     when defining the variable "client_extension", you must also pattern match on "%Mint.WebSocket.Extension{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 221 │          extension = %__MODULE__{client_extension | params: server_extension.params},
     │                      ~
     │
     └─ (mint_web_socket 1.0.4) lib/mint/web_socket/extension.ex:221:22: Mint.WebSocket.Extension.accept_extensions/3

Generated mint_web_socket app
==> octo_fetch
Compiling 3 files (.ex)
Generated octo_fetch app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/cowlib/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling cowlib
===> Failed to restore /home/runner/_work/realtime/realtime/deps/syn/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling syn
===> Failed to restore /home/runner/_work/realtime/realtime/deps/gen_rpc/_build/prod/plugins/.rebar3/rebar_compiler_erl/source_apps.dag file. Discarding it.

===> Analyzing applications...
===> Compiling verl
===> Compiling hex_core
===> Compiling rebar3_hex
===> Failed to restore /home/runner/_work/realtime/realtime/deps/gen_rpc/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling gen_rpc
==> opentelemetry_semantic_conventions
Compiling 2 files (.erl)
Compiling 79 files (.ex)
Generated opentelemetry_semantic_conventions app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/otel_http/_build/prod/plugins/.rebar3/rebar_compiler_erl/source_apps.dag file. Discarding it.

===> Analyzing applications...
===> Compiling rebar3_ex_doc
===> Failed to restore /home/runner/_work/realtime/realtime/deps/otel_http/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling otel_http
==> deep_merge
Compiling 2 files (.ex)
Generated deep_merge app
==> benchee
Compiling 44 files (.ex)
warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/output/benchmark_printer.ex: Benchee.Output.BenchmarkPrinter.benchmarking/3

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/output/benchmark_printer.ex: Benchee.Output.BenchmarkPrinter.benchmarking/3

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/output/benchmark_printer.ex: Benchee.Output.BenchmarkPrinter.benchmarking/3

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/output/benchmark_printer.ex: Benchee.Output.BenchmarkPrinter.benchmarking/3

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/relative_statistics.ex: Benchee.RelativeStatistics.zero_safe_division/2

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/relative_statistics.ex: Benchee.RelativeStatistics.zero_safe_division/2

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/relative_statistics.ex: Benchee.RelativeStatistics.zero_safe_division/2

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/statistics.ex: Benchee.Statistics.add_ips/1

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/benchmark/runner.ex: Benchee.Benchmark.Runner.run_reductions_benchmark/2

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/benchmark/runner.ex: Benchee.Benchmark.Runner.run_memory_benchmark/2

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ (benchee 1.1.0) lib/benchee/benchmark/runner.ex: Benchee.Benchmark.Runner.measure_runtimes/4

    warning: a struct for Benchee.Scenario is expected on struct update:

        %Benchee.Scenario{scenario | name: Benchee.Scenario.display_name(scenario)}

    but got type:

        dynamic()

    where "scenario" was given the type:

        # type: dynamic()
        # from: lib/benchee/formatters/tagged_save.ex:73:20
        scenario

    when defining the variable "scenario", you must also pattern match on "%Benchee.Scenario{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 74 │     %Scenario{scenario | name: Scenario.display_name(scenario)}
    │     ~
    │
    └─ (benchee 1.1.0) lib/benchee/formatters/tagged_save.ex:74:5: Benchee.Formatters.TaggedSave.update_name/1

    warning: a struct for Benchee.Benchmark.ScenarioContext is expected on struct update:

        %Benchee.Benchmark.ScenarioContext{
          scenario_context
          | function_call_overhead: function_call_overhead
        }

    but got type:

        dynamic()

    where "scenario_context" was given the type:

        # type: dynamic()
        # from: lib/benchee/benchmark/runner.ex:35:32
        scenario_context

    when defining the variable "scenario_context", you must also pattern match on "%Benchee.Benchmark.ScenarioContext{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 47 │     scenario_context = %ScenarioContext{
    │                        ~
    │
    └─ (benchee 1.1.0) lib/benchee/benchmark/runner.ex:47:24: Benchee.Benchmark.Runner.run_scenarios/2

     warning: a struct for Benchee.Benchmark.ScenarioContext is expected on struct update:

         %Benchee.Benchmark.ScenarioContext{scenario_context | scenario_input: scenario_input}

     but got type:

         dynamic()

     where "scenario_context" was given the type:

         # type: dynamic()
         # from: lib/benchee/benchmark/runner.ex:99:35
         scenario_context

     when defining the variable "scenario_context", you must also pattern match on "%Benchee.Benchmark.ScenarioContext{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 101 │     scenario_context = %ScenarioContext{scenario_context | scenario_input: scenario_input}
     │                        ~
     │
     └─ (benchee 1.1.0) lib/benchee/benchmark/runner.ex:101:24: Benchee.Benchmark.Runner.measure_scenario/2

     warning: a struct for Benchee.Benchmark.ScenarioContext is expected on struct update:

         %Benchee.Benchmark.ScenarioContext{
           scenario_context
           | current_time: current_time(),
             end_time: end_time,
             num_iterations: num_iterations
         }

     but got type:

         dynamic()

     where "scenario_context" was given the type:

         # type: dynamic()
         # from: lib/benchee/benchmark/runner.ex:221:35
         scenario_context

     when defining the variable "scenario_context", you must also pattern match on "%Benchee.Benchmark.ScenarioContext{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 228 │     new_context = %ScenarioContext{
     │                   ~
     │
     └─ (benchee 1.1.0) lib/benchee/benchmark/runner.ex:228:19: Benchee.Benchmark.Runner.measure_runtimes/4

    warning: a struct for Benchee.Suite is expected on struct update:

        %Benchee.Suite{suite | scenarios: scenarios}

    but got type:

        dynamic()

    where "suite" was given the type:

        # type: dynamic()
        # from: lib/benchee/relative_statistics.ex:24:27
        suite

    when defining the variable "suite", you must also pattern match on "%Benchee.Suite{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 30 │     %Suite{suite | scenarios: scenarios}
    │     ~
    │
    └─ (benchee 1.1.0) lib/benchee/relative_statistics.ex:30:5: Benchee.RelativeStatistics.relative_statistics/1

    warning: a struct for Benchee.Statistics is expected on struct update:

        %Benchee.Statistics{
          statistics
          | relative_more: zero_safe_division(statistics.average, reference_statistics.average),
            relative_less: zero_safe_division(reference_statistics.average, statistics.average),
            absolute_difference: statistics.average - reference_statistics.average
        }

    but got type:

        dynamic()

    where "statistics" was given the type:

        # type: dynamic()
        # from: lib/benchee/relative_statistics.ex:89:32
        statistics

    when defining the variable "statistics", you must also pattern match on "%Benchee.Statistics{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 90 │     %Statistics{
    │     ~
    │
    └─ (benchee 1.1.0) lib/benchee/relative_statistics.ex:90:5: Benchee.RelativeStatistics.add_relative_statistics/2

     warning: a struct for Benchee.Scenario is expected on struct update:

         %Benchee.Scenario{
           scenario
           | run_time_data: %Benchee.CollectionData{scenario.run_time_data | statistics: run_time_stats},
             memory_usage_data: %Benchee.CollectionData{
               scenario.memory_usage_data
               | statistics: memory_stats
             },
             reductions_data: %Benchee.CollectionData{
               scenario.reductions_data
               | statistics: reductions_stats
             }
         }

     but got type:

         dynamic()

     where "scenario" was given the type:

         # type: dynamic()
         # from: lib/benchee/statistics.ex:174:38
         scenario

     when defining the variable "scenario", you must also pattern match on "%Benchee.Scenario{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 183 │     %Scenario{
     │     ~
     │
     └─ (benchee 1.1.0) lib/benchee/statistics.ex:183:5: Benchee.Statistics.calculate_scenario_statistics/2

     warning: a struct for Benchee.Statistics is expected on struct update:

         %Benchee.Statistics{statistics | ips: ips, std_dev_ips: standard_dev_ips}

     but got type:

         dynamic()

     where "statistics" was given the type:

         # type: dynamic()
         # from: lib/benchee/statistics.ex:229:16
         statistics

     when defining the variable "statistics", you must also pattern match on "%Benchee.Statistics{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 233 │     %__MODULE__{
     │     ~
     │
     └─ (benchee 1.1.0) lib/benchee/statistics.ex:233:5: Benchee.Statistics.add_ips/1

     warning: a struct for Benchee.Benchmark.ScenarioContext is expected on struct update:

         %Benchee.Benchmark.ScenarioContext{scenario_context | current_time: current_time()}

     but got type:

         dynamic()

     where "scenario_context" was given the type:

         # type: dynamic()
         # from: lib/benchee/benchmark/runner.ex:259:31
         scenario_context

     when defining the variable "scenario_context", you must also pattern match on "%Benchee.Benchmark.ScenarioContext{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 261 │     updated_context = %ScenarioContext{scenario_context | current_time: current_time()}
     │                       ~
     │
     └─ (benchee 1.1.0) lib/benchee/benchmark/runner.ex:261:23: Benchee.Benchmark.Runner.do_benchmark/4

    warning: a struct for Benchee.Suite is expected on struct update:

        %Benchee.Suite{suite | scenarios: scenarios ++ loaded}

    but got type:

        dynamic(%{..., configuration: %{..., load: term()}, scenarios: term()})

    where "suite" was given the type:

        # type: dynamic(%{..., configuration: %{..., load: term()}, scenarios: term()})
        # from: lib/benchee/scenario_loader.ex:18:18
        suite = %{configuration: %{load: load_path}, scenarios: scenarios}

    when defining the variable "suite", you must also pattern match on "%Benchee.Suite{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 20 │     %Suite{suite | scenarios: scenarios ++ loaded}
    │     ~
    │
    └─ (benchee 1.1.0) lib/benchee/scenario_loader.ex:20:5: Benchee.ScenarioLoader.load/1

    warning: a struct for Benchee.Benchmark.ScenarioContext is expected on struct update:

        %Benchee.Benchmark.ScenarioContext{scenario_context | scenario_input: scenario_input}

    but got type:

        dynamic()

    where "scenario_context" was given the type:

        # type: dynamic()
        # from: lib/benchee/benchmark/run_once.ex:12:21
        scenario_context

    when defining the variable "scenario_context", you must also pattern match on "%Benchee.Benchmark.ScenarioContext{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 14 │     scenario_context = %ScenarioContext{scenario_context | scenario_input: scenario_input}
    │                        ~
    │
    └─ (benchee 1.1.0) lib/benchee/benchmark/run_once.ex:14:24: Benchee.Benchmark.RunOnce.run/3

     warning: a struct for Benchee.Configuration is expected on struct update:

         %Benchee.Configuration{config | formatters: formatters}

     but got type:

         dynamic(%{..., save: term()})

     where "config" was given the type:

         # type: dynamic(%{..., save: term()})
         # from: lib/benchee/configuration.ex:356:38
         config = %{save: save_values}

     when defining the variable "config", you must also pattern match on "%Benchee.Configuration{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 360 │     %__MODULE__{config | formatters: formatters}
     │     ~
     │
     └─ (benchee 1.1.0) lib/benchee/configuration.ex:360:5: Benchee.Configuration.save_option_conversion/1

     warning: :code.lib_dir/2 is deprecated. This functionality will be removed in a future release
     │
 183 │     path = :code.lib_dir(:elixir, :ebin)
     │                  ~
     │
     └─ (benchee 1.1.0) lib/benchee/system.ex:183:18: Benchee.System.all_protocols_consolidated?/0

Generated benchee app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/poolboy/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling poolboy
==> decimal
Compiling 4 files (.ex)
Generated decimal app
==> jason
Compiling 10 files (.ex)
Generated jason app
==> esbuild
Compiling 4 files (.ex)
Generated esbuild app
==> sobelow
Compiling 51 files (.ex)
Generated sobelow app
==> ex_json_schema
Compiling 40 files (.ex)
Generated ex_json_schema app
==> excoveralls
Compiling 29 files (.ex)
Generated excoveralls app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/gproc/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling gproc
===> Failed to restore /home/runner/_work/realtime/realtime/deps/telemetry/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling telemetry
==> db_connection
Compiling 18 files (.ex)
Generated db_connection app
==> telemetry_metrics
Compiling 7 files (.ex)
Generated telemetry_metrics app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/telemetry_poller/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling telemetry_poller
==> libcluster
Compiling 13 files (.ex)
Generated libcluster app
==> ecto
Compiling 56 files (.ex)
Generated ecto app
==> telemetry_metrics_prometheus_core
Compiling 9 files (.ex)
warning: first..last inside match is deprecated, you must always match on the step: first..last//var or first..last//_ if you want to ignore it
  (telemetry_metrics_prometheus_core 1.2.1) lib/core/registry.ex:87: TelemetryMetricsPrometheus.Core.Registry.validate_distribution_buckets!/1

Generated telemetry_metrics_prometheus_core app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/cowboy/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling cowboy
==> logflare_etso
Compiling 12 files (.ex)
    warning: function delete/5 required by behaviour Ecto.Adapter.Schema is not implemented (in module Etso.Adapter)
    │
  1 │ defmodule Etso.Adapter do
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ lib/etso/adapter.ex:1: Etso.Adapter (module)

    warning: got "@impl Ecto.Adapter.Schema" for function delete/4 but this behaviour does not specify such callback. The known callbacks are:

      * Ecto.Adapter.__before_compile__/1 (macro)
      * Ecto.Adapter.Schema.autogenerate/1 (function)
      * Ecto.Adapter.checked_out?/1 (function)
      * Ecto.Adapter.checkout/3 (function)
      * Ecto.Adapter.Schema.delete/5 (function)
      * Ecto.Adapter.dumpers/2 (function)
      * Ecto.Adapter.ensure_all_started/2 (function)
      * Ecto.Adapter.Queryable.execute/5 (function)
      * Ecto.Adapter.init/1 (function)
      * Ecto.Adapter.Schema.insert/6 (function)
      * Ecto.Adapter.Schema.insert_all/8 (function)
      * Ecto.Adapter.loaders/2 (function)
      * Ecto.Adapter.Queryable.prepare/2 (function)
      * Ecto.Adapter.Queryable.stream/5 (function)
      * Ecto.Adapter.Schema.update/6 (function)

    │
 65 │       def unquote(name)(unquote_splicing(args)) do
    │       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ lib/etso/adapter.ex:65: Etso.Adapter (module)

    warning: function delete/5 required by behaviour Ecto.Adapter.Schema is not implemented (in module Etso.Adapter.Behaviour.Schema)
    │
  1 │ defmodule Etso.Adapter.Behaviour.Schema do
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ lib/etso/adapter/behaviour/schema.ex:1: Etso.Adapter.Behaviour.Schema (module)

    warning: got "@impl Ecto.Adapter.Schema" for function delete/4 but this behaviour does not specify such callback. The known callbacks are:

      * Ecto.Adapter.Schema.autogenerate/1 (function)
      * Ecto.Adapter.Schema.delete/5 (function)
      * Ecto.Adapter.Schema.insert/6 (function)
      * Ecto.Adapter.Schema.insert_all/8 (function)
      * Ecto.Adapter.Schema.update/6 (function)

    │
 42 │   def delete(%{repo: repo}, %{schema: schema}, filters, _) do
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ lib/etso/adapter/behaviour/schema.ex:42: Etso.Adapter.Behaviour.Schema (module)

Generated logflare_etso app
==> expo
Compiling 2 files (.erl)
Compiling 22 files (.ex)
    warning: a struct for Expo.Messages is expected on struct update:

        %Expo.Messages{po | file: Keyword.get(opts, :file)}

    but got type:

        dynamic()

    where "po" was given the type:

        # type: dynamic()
        # from: lib/expo/po/parser.ex:17:20
        {:ok, po} <- check_for_duplicates(po)

    when defining the variable "po", you must also pattern match on "%Expo.Messages{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 18 │       {:ok, %Messages{po | file: Keyword.get(opts, :file)}}
    │             ~
    │
    └─ (expo 1.1.0) lib/expo/po/parser.ex:18:13: Expo.PO.Parser.parse/2

     warning: a struct for Expo.Messages is expected on struct update:

         %Expo.Messages{po | file: path}

     but got type:

         dynamic()

     where "po" was given the type:

         # type: dynamic()
         # from: lib/expo/mo.ex:132:20
         {:ok, po} <- Expo.MO.Parser.parse(contents, Keyword.put_new(options, :file, path))

     when defining the variable "po", you must also pattern match on "%Expo.Messages{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 133 │       {:ok, %Messages{po | file: path}}
     │             ~
     │
     └─ (expo 1.1.0) lib/expo/mo.ex:133:13: Expo.MO.parse_file/2

Generated expo app
==> gettext
Compiling 18 files (.ex)
Generated gettext app
==> phoenix_pubsub
Compiling 11 files (.ex)
    warning: a struct for Phoenix.Tracker.Replica is expected on struct update:

        %Phoenix.Tracker.Replica{replica | status: :permdown}

    but got type:

        dynamic()

    where "replica" was given the type:

        # type: dynamic()
        # from: lib/phoenix/tracker/replica.ex:72:17
        replica

    when defining the variable "replica", you must also pattern match on "%Phoenix.Tracker.Replica{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 72 │   defp permdown(replica), do: %Replica{replica | status: :permdown}
    │                               ~
    │
    └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/replica.ex:72:31: Phoenix.Tracker.Replica.permdown/1

    warning: a struct for Phoenix.Tracker.Replica is expected on struct update:

        %Phoenix.Tracker.Replica{replica | status: :down}

    but got type:

        dynamic()

    where "replica" was given the type:

        # type: dynamic()
        # from: lib/phoenix/tracker/replica.ex:74:13
        replica

    when defining the variable "replica", you must also pattern match on "%Phoenix.Tracker.Replica{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 74 │   defp down(replica), do: %Replica{replica | status: :down}
    │                           ~
    │
    └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/replica.ex:74:27: Phoenix.Tracker.Replica.down/1

    warning: a struct for Phoenix.Tracker.Replica is expected on struct update:

        %Phoenix.Tracker.Replica{replica | last_heartbeat_at: now_ms()}

    but got type:

        dynamic()

    where "replica" was given the type:

        # type: dynamic()
        # from: lib/phoenix/tracker/replica.ex:76:29
        replica

    when defining the variable "replica", you must also pattern match on "%Phoenix.Tracker.Replica{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 77 │     %Replica{replica | last_heartbeat_at: now_ms()}
    │     ~
    │
    └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/replica.ex:77:5: Phoenix.Tracker.Replica.touch_last_heartbeat/1

    warning: a struct for Phoenix.Tracker.State is expected on struct update:

        %Phoenix.Tracker.State{state | clouds: pruned_clouds, delta: new_delta}

    but got type:

        dynamic()

    where "state" was given the type:

        # type: dynamic()
        # from: lib/phoenix/tracker/state.ex:92:18
        state

    when defining the variable "state", you must also pattern match on "%Phoenix.Tracker.State{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 97 │     state = bump_clock(%State{state | clouds: pruned_clouds, delta: new_delta})
    │                        ~
    │
    └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/state.ex:97:24: Phoenix.Tracker.State.leave_join/5

     warning: a struct for Phoenix.Tracker.State is expected on struct update:

         %Phoenix.Tracker.State{local | clouds: clouds, delta: delta}

     but got type:

         dynamic()

     where "local" was given the type:

         # type: dynamic()
         # from: lib/phoenix/tracker/state.ex:310:14
         local

     when defining the variable "local", you must also pattern match on "%Phoenix.Tracker.State{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 339 │       %State{local | clouds: clouds, delta: delta}
     │       ~
     │
     └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/state.ex:339:7: Phoenix.Tracker.State.merge/3

     warning: a struct for Phoenix.Tracker.State is expected on struct update:

         %Phoenix.Tracker.State{delta | values: Map.put(delta.values, tag, {pid, topic, key, meta})}

     but got type:

         dynamic()

     where "delta" was given the type:

         # type: dynamic()
         # from: lib/phoenix/tracker/state.ex:506:36
         %Phoenix.Tracker.State{delta: delta} = state

     when defining the variable "delta", you must also pattern match on "%Phoenix.Tracker.State{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 510 │     new_delta = %State{delta | values: Map.put(delta.values, tag, {pid, topic, key, meta})}
     │                 ~
     │
     └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/state.ex:510:17: Phoenix.Tracker.State.do_add/5

     warning: a struct for Phoenix.Tracker.State is expected on struct update:

         %Phoenix.Tracker.State{delta | clouds: put_tag(delta.clouds, {rep, new_clock})}

     but got type:

         dynamic()

     where "delta" was given the type:

         # type: dynamic()
         # from: lib/phoenix/tracker/state.ex:586:99
         %Phoenix.Tracker.State{mode: :normal, replica: rep, clouds: clouds, context: ctx, delta: delta} =
           state

     when defining the variable "delta", you must also pattern match on "%Phoenix.Tracker.State{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 592 │            delta: %State{delta | clouds: put_tag(delta.clouds, {rep, new_clock})}}
     │                   ~
     │
     └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/state.ex:592:19: Phoenix.Tracker.State.bump_clock/1

     warning: a struct for Phoenix.Tracker.State is expected on struct update:

         %Phoenix.Tracker.State{delta | range: {start_clock, new_end}}

     but got type:

         dynamic()

     where "delta" was given the type:

         # type: dynamic()
         # from: lib/phoenix/tracker/state.ex:595:55
         %Phoenix.Tracker.State{delta: delta, replica: rep} = state

     when defining the variable "delta", you must also pattern match on "%Phoenix.Tracker.State{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 600 │            delta: %State{delta | range: {start_clock, new_end}}}
     │                   ~
     │
     └─ (phoenix_pubsub 2.1.3) lib/phoenix/tracker/state.ex:600:19: Phoenix.Tracker.State.put_context/2

Generated phoenix_pubsub app
==> mix_test_watch
Compiling 8 files (.ex)
Generated mix_test_watch app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/acceptor_pool/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling acceptor_pool
    ┌─ src/acceptor_pool.erl:
    │
 56 │  -behaviour(gen_server).
    │   ╰── Warning: the callback gen_server:format_status(_,_) is deprecated; use format_status/1 instead


===> Failed to restore /home/runner/_work/realtime/realtime/deps/hpack/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling hpack
===> Failed to restore /home/runner/_work/realtime/realtime/deps/tls_certificate_check/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling tls_certificate_check
==> credo
Compiling 251 files (.ex)
Generated credo app
==> plug
Compiling 1 file (.erl)
Compiling 42 files (.ex)
Generated plug app
==> phoenix_html
Compiling 9 files (.ex)
    warning: comparison between distinct types found:

        h <= 255

    given types:

        dynamic(empty_list() or non_empty_list(term(), term())) <= integer()

    where "h" was given the type:

        # type: dynamic(empty_list() or non_empty_list(term(), term()))
        # from: lib/phoenix_html/safe.ex:62:17
        h

    While Elixir can compare across all types, you are comparing across types which are always disjoint, and the result is either always true or always false

    typing violation found at:
    │
 62 │   def to_iodata(h) when is_integer(h) and h <= 255 do
    │                                             ~
    │
    └─ (phoenix_html 3.3.4) lib/phoenix_html/safe.ex:62:45: Phoenix.HTML.Safe.List.to_iodata/1

    warning: the 1st pattern in clause will never match:

        60

    because it is expected to receive type:

        dynamic(empty_list() or non_empty_list(term(), term()))

    hint: defimpl for List requires its callbacks to match exclusively on empty_list() or non_empty_list(term(), term())

    typing violation found at:
    │
 56 │   def to_iodata(?<), do: "&lt;"
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ (phoenix_html 3.3.4) lib/phoenix_html/safe.ex:56: Phoenix.HTML.Safe.List.to_iodata/1

    warning: the 1st pattern in clause will never match:

        62

    because it is expected to receive type:

        dynamic(empty_list() or non_empty_list(term(), term()))

    hint: defimpl for List requires its callbacks to match exclusively on empty_list() or non_empty_list(term(), term())

    typing violation found at:
    │
 57 │   def to_iodata(?>), do: "&gt;"
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ (phoenix_html 3.3.4) lib/phoenix_html/safe.ex:57: Phoenix.HTML.Safe.List.to_iodata/1

    warning: the 1st pattern in clause will never match:

        38

    because it is expected to receive type:

        dynamic(empty_list() or non_empty_list(term(), term()))

    hint: defimpl for List requires its callbacks to match exclusively on empty_list() or non_empty_list(term(), term())

    typing violation found at:
    │
 58 │   def to_iodata(?&), do: "&amp;"
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ (phoenix_html 3.3.4) lib/phoenix_html/safe.ex:58: Phoenix.HTML.Safe.List.to_iodata/1

    warning: the 1st pattern in clause will never match:

        34

    because it is expected to receive type:

        dynamic(empty_list() or non_empty_list(term(), term()))

    hint: defimpl for List requires its callbacks to match exclusively on empty_list() or non_empty_list(term(), term())

    typing violation found at:
    │
 59 │   def to_iodata(?"), do: "&quot;"
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ (phoenix_html 3.3.4) lib/phoenix_html/safe.ex:59: Phoenix.HTML.Safe.List.to_iodata/1

    warning: the 1st pattern in clause will never match:

        39

    because it is expected to receive type:

        dynamic(empty_list() or non_empty_list(term(), term()))

    hint: defimpl for List requires its callbacks to match exclusively on empty_list() or non_empty_list(term(), term())

    typing violation found at:
    │
 60 │   def to_iodata(?'), do: "&#39;"
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ (phoenix_html 3.3.4) lib/phoenix_html/safe.ex:60: Phoenix.HTML.Safe.List.to_iodata/1

    warning: the 1st pattern in clause will never match:

        {:safe, data}

    because it is expected to receive type:

        dynamic(empty_list() or non_empty_list(term(), term()))

    hint: defimpl for List requires its callbacks to match exclusively on empty_list() or non_empty_list(term(), term())

    typing violation found at:
    │
 76 │   def to_iodata({:safe, data}) do
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ (phoenix_html 3.3.4) lib/phoenix_html/safe.ex:76: Phoenix.HTML.Safe.List.to_iodata/1

Generated phoenix_html app
==> phoenix_ecto
Compiling 7 files (.ex)
Generated phoenix_ecto app
==> phoenix_template
Compiling 4 files (.ex)
Generated phoenix_template app
==> phoenix_view
Compiling 1 file (.ex)
Generated phoenix_view app
==> open_api_spex
Compiling 80 files (.ex)
Generated open_api_spex app
==> postgrex
Compiling 70 files (.ex)
Generated postgrex app
==> ecto_sql
Compiling 25 files (.ex)
Generated ecto_sql app
==> ecto_psql_extras
Compiling 43 files (.ex)
Generated ecto_psql_extras app
==> libcluster_postgres
Compiling 1 file (.ex)
Generated libcluster_postgres app
==> postgres_replication
Compiling 7 files (.ex)
Generated postgres_replication app
==> forum
Compiling 12 files (.ex)
Generated forum app
==> joken
Compiling 8 files (.ex)
Generated joken app
==> peep
Compiling 19 files (.ex)
Generated peep app
==> unsafe
Compiling 3 files (.ex)
Generated unsafe app
==> cachex
Compiling 61 files (.ex)
Generated cachex app
==> nimble_pool
Compiling 2 files (.ex)
Generated nimble_pool app
==> finch
Compiling 23 files (.ex)
Generated finch app
==> req
Compiling 21 files (.ex)
Generated req app
==> nimble_zta
Compiling 7 files (.ex)
Generated nimble_zta app
==> tesla
Compiling 57 files (.ex)
Generated tesla app
==> logflare_api_client
Compiling 2 files (.ex)
Generated logflare_api_client app
==> logflare_logger_backend
Compiling 13 files (.ex)
Generated logflare_logger_backend app
==> tailwind
Compiling 3 files (.ex)
Generated tailwind app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/cowboy_telemetry/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling cowboy_telemetry
==> plug_cowboy
Compiling 5 files (.ex)
Generated plug_cowboy app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/chatterbox/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling chatterbox
===> Failed to restore /home/runner/_work/realtime/realtime/deps/grpcbox/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling grpcbox
==> websock
Compiling 1 file (.ex)
Generated websock app
==> websock_adapter
Compiling 4 files (.ex)
Generated websock_adapter app
==> phoenix
Compiling 71 files (.ex)
     warning: comparison between distinct types found:

         merge_all != []

     given types:

         dynamic(non_empty_list(term(), term())) != empty_list()

     where "merge_all" was given the type:

         # type: dynamic(non_empty_list(term(), term()))
         # from: lib/phoenix/router/route.ex:121:15
         merge_all = merge_params ++ merge_private ++ merge_assigns

     While Elixir can compare across all types, you are comparing across types which are always disjoint, and the result is either always true or always false

     typing violation found at:
     │
 123 │     if merge_all != [] do
     │                  ~
     │
     └─ (phoenix 1.7.19) lib/phoenix/router/route.ex:123:18: Phoenix.Router.Route.build_prepare/1

    warning: a struct for Plug.Conn is expected on struct update:

        %Plug.Conn{conn | state: :sent}

    but got type:

        dynamic()

    where "conn" was given the type:

        # type: dynamic()
        # from: lib/phoenix/endpoint/render_errors.ex:55:17
        conn

    when defining the variable "conn", you must also pattern match on "%Plug.Conn{}".

    hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

        user = some_function()
        %User{user | name: "John Doe"}

    it is enough to write:

        %User{} = user = some_function()
        %{user | name: "John Doe"}

    typing violation found at:
    │
 60 │           %Plug.Conn{conn | state: :sent}
    │           ~
    │
    └─ (phoenix 1.7.19) lib/phoenix/endpoint/render_errors.ex:60:11: Phoenix.Endpoint.RenderErrors.__catch__/5

     warning: a struct for Plug.Conn is expected on struct update:

         %Plug.Conn{conn | query_params: %{}, params: %{}}

     but got type:

         dynamic()

     where "conn" was given the type:

         # type: dynamic()
         # from: lib/phoenix/endpoint/render_errors.ex:129:33
         conn

     when defining the variable "conn", you must also pattern match on "%Plug.Conn{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 134 │         %Plug.Conn.Unfetched{} -> %Plug.Conn{conn | query_params: %{}, params: %{}}
     │                                   ~
     │
     └─ (phoenix 1.7.19) lib/phoenix/endpoint/render_errors.ex:134:35: Phoenix.Endpoint.RenderErrors.maybe_fetch_query_params/1

      warning: a struct for Plug.Conn is expected on struct update:

          %Plug.Conn{conn | params: params}

      but got type:

          dynamic()

      where "conn" was given the type:

          # type: dynamic()
          # from: lib/phoenix/controller.ex:1326:20
          conn

      when defining the variable "conn", you must also pattern match on "%Plug.Conn{}".

      hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

          user = some_function()
          %User{user | name: "John Doe"}

      it is enough to write:

          %User{} = user = some_function()
          %{user | name: "John Doe"}

      typing violation found at:
      │
 1334 │     %Plug.Conn{conn | params: params}
      │     ~
      │
      └─ (phoenix 1.7.19) lib/phoenix/controller.ex:1334:5: Phoenix.Controller.scrub_params/2

     warning: a struct for Plug.Conn is expected on struct update:

         %Plug.Conn{conn | query_params: %{}, params: params}

     but got type:

         dynamic()

     where "conn" was given the type:

         # type: dynamic()
         # from: lib/phoenix/endpoint/render_errors.ex:129:33
         conn

     when defining the variable "conn", you must also pattern match on "%Plug.Conn{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 135 │         params -> %Plug.Conn{conn | query_params: %{}, params: params}
     │                   ~
     │
     └─ (phoenix 1.7.19) lib/phoenix/endpoint/render_errors.ex:135:19: Phoenix.Endpoint.RenderErrors.maybe_fetch_query_params/1

Generated phoenix app
==> phoenix_live_view
Compiling 39 files (.ex)
     warning: a struct for Phoenix.LiveView.UploadEntry is expected on struct update:

         %Phoenix.LiveView.UploadEntry{
           entry
           | preflighted?:
               case entry.preflighted? do
                 x when x === false or x === nil -> Enum.member?(refs, entry.ref)
                 x -> x
               end
         }

     but got type:

         dynamic()

     where "entry" was given the type:

         # type: dynamic()
         # from: lib/phoenix_live_view/upload_config.ex:362:17
         entry <- conf.entries

     when defining the variable "entry", you must also pattern match on "%Phoenix.LiveView.UploadEntry{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 363 │         %UploadEntry{entry | preflighted?: entry.preflighted? || entry.ref in refs}
     │         ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/upload_config.ex:363:9: Phoenix.LiveView.UploadConfig.mark_preflighted/2

     warning: a struct for Phoenix.LiveView.UploadEntry is expected on struct update:

         %Phoenix.LiveView.UploadEntry{entry | valid?: true, uuid: generate_uuid()}

     but got type:

         dynamic()

     where "entry" was given the type:

         # type: dynamic()
         # from: lib/phoenix_live_view/upload_config.ex:572:30
         entry

     when defining the variable "entry", you must also pattern match on "%Phoenix.LiveView.UploadEntry{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 573 │     entry = %UploadEntry{entry | valid?: true, uuid: generate_uuid()}
     │             ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/upload_config.ex:573:13: Phoenix.LiveView.UploadConfig.put_valid_entry/2

     warning: a struct for Phoenix.LiveView.UploadEntry is expected on struct update:

         %Phoenix.LiveView.UploadEntry{entry | valid?: false}

     but got type:

         dynamic()

     where "entry" was given the type:

         # type: dynamic()
         # from: lib/phoenix_live_view/upload_config.ex:585:32
         entry

     when defining the variable "entry", you must also pattern match on "%Phoenix.LiveView.UploadEntry{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 586 │     entry = %UploadEntry{entry | valid?: false}
     │             ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/upload_config.ex:586:13: Phoenix.LiveView.UploadConfig.put_invalid_entry/3

     warning: a struct for Phoenix.LiveView.UploadEntry is expected on struct update:

         %Phoenix.LiveView.UploadEntry{entry | cancelled?: true}

     but got type:

         dynamic()

     where "entry" was given the type:

         # type: dynamic()
         # from: lib/phoenix_live_view/upload_config.ex:669:42
         entry

     when defining the variable "entry", you must also pattern match on "%Phoenix.LiveView.UploadEntry{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 669 │         update_entry(conf, entry.ref, fn entry -> %UploadEntry{entry | cancelled?: true} end)
     │                                                   ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/upload_config.ex:669:51: Phoenix.LiveView.UploadConfig.cancel_entry/2

     warning: a struct for Phoenix.LiveView.Socket is expected on struct update:

         %Phoenix.LiveView.Socket{
           socket
           | assigns: Map.merge(temp_assigns, socket.assigns),
             private:
               Map.update(
                 socket.private,
                 :temporary_assigns,
                 temp_assigns,
                 &Map.merge(&1, temp_assigns)
               )
         }

     but got type:

         dynamic()

     where "socket" was given the type:

         # type: dynamic()
         # from: lib/phoenix_live_view/utils.ex:415:28
         socket

     when defining the variable "socket", you must also pattern match on "%Phoenix.LiveView.Socket{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 422 │     %Socket{
     │     ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/utils.ex:422:5: Phoenix.LiveView.Utils.handle_mount_option/3

     warning: a struct for Phoenix.LiveViewTest.ClientProxy is expected on struct update:

         %Phoenix.LiveViewTest.ClientProxy{view | rendered: rendered}

     but got type:

         dynamic()

     where "view" was given the type:

         # type: dynamic()
         # from: lib/phoenix_live_view/test/client_proxy.ex
         {:ok, view}

     when defining the variable "view", you must also pattern match on "%Phoenix.LiveViewTest.ClientProxy{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 728 │           new_view = %ClientProxy{view | rendered: rendered}
     │                      ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/test/client_proxy.ex:728:22: Phoenix.LiveViewTest.ClientProxy.merge_rendered/3

     warning: a struct for Phoenix.LiveView.Socket is expected on struct update:

         %Phoenix.LiveView.Socket{
           socket
           | assigns: %Phoenix.LiveView.Socket.AssignsNotInSocket{__assigns__: assigns}
         }

     but got type:

         dynamic(%{..., assigns: term()})

     where "socket" was given the type:

         # type: dynamic(%{..., assigns: term()})
         # from: lib/phoenix_live_view/renderer.ex:121:43
         %{assigns: assigns} = socket

     when defining the variable "socket", you must also pattern match on "%Phoenix.LiveView.Socket{}".

     hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:

         user = some_function()
         %User{user | name: "John Doe"}

     it is enough to write:

         %User{} = user = some_function()
         %{user | name: "John Doe"}

     typing violation found at:
     │
 122 │     socket = %Socket{socket | assigns: %Socket.AssignsNotInSocket{__assigns__: assigns}}
     │              ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/renderer.ex:122:14: Phoenix.LiveView.Renderer.render_assigns/1

     warning: incompatible types given to String.to_atom/1:

         String.to_atom(template)

     given types:

         -dynamic(false or {term(), binary()})-

     but expected one of:

         binary()

     where "template" was given the type:

         # type: dynamic(false or {term(), binary()})
         # from: lib/phoenix_live_view/router.ex:300:18
         template = Phoenix.LiveView.Utils.normalize_layout(template)

     typing violation found at:
     │
 301 │         Map.put(acc, :root_layout, {mod, String.to_atom(template)})
     │                                                 ~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/router.ex:301:49: Phoenix.LiveView.Router.validate_live_session_opts/3

     warning: the 1st pattern in clause will never match:

         nil

     because it is expected to receive type:

         dynamic(%Phoenix.LiveView.Rendered{})

     hint: defimpl for Phoenix.LiveView.Rendered requires its callbacks to match exclusively on %Phoenix.LiveView.Rendered{}

     typing violation found at:
     │
 156 │     def to_iodata(nil) do
     │     ~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (phoenix_live_view 0.20.17) lib/phoenix_live_view/engine.ex:156: Phoenix.HTML.Safe.Phoenix.LiveView.Rendered.to_iodata/1

Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 36 files (.ex)
Generated phoenix_live_dashboard app
==> prom_ex
Compiling 40 files (.ex)
Generated prom_ex app
==> corsica
Compiling 3 files (.ex)
Generated corsica app
==> mimic
Compiling 10 files (.ex)
Generated mimic app
==> uuid
Compiling 1 file (.ex)
    warning: use Bitwise is deprecated. import Bitwise instead
    │
  2 │   use Bitwise, only_operators: true
    │   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ lib/uuid.ex:2: UUID (module)

Generated uuid app
==> opentelemetry_api
Compiling 19 files (.erl)
src/opentelemetry.erl:377:5: Warning: ambiguous call of overridden auto-imported BIF link/2 --
use erlang:link/2 or "-compile({no_auto_import,[link/2]})." to resolve name clash
%  377|     link(SpanCtx, []).
%     |     ^

Compiling 5 files (.ex)
Generated opentelemetry_api app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/opentelemetry/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling opentelemetry
===> Failed to restore /home/runner/_work/realtime/realtime/deps/opentelemetry_exporter/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling opentelemetry_exporter
==> opentelemetry_process_propagator
Compiling 1 file (.erl)
Compiling 4 files (.ex)
Generated opentelemetry_process_propagator app
==> opentelemetry_ecto
Compiling 1 file (.ex)
Generated opentelemetry_ecto app
==> opentelemetry_telemetry
Compiling 1 file (.erl)
Compiling 1 file (.ex)
Generated opentelemetry_telemetry app
==> opentelemetry_phoenix
Compiling 1 file (.ex)
Generated opentelemetry_phoenix app
==> realtime
===> Failed to restore /home/runner/_work/realtime/realtime/deps/opentelemetry_cowboy/_build/prod/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.

===> Analyzing applications...
===> Compiling opentelemetry_cowboy
Compiling 258 files (.ex)
Generated realtime app
xxxxxxxxxxxxxxxxxxxxxxxxxxxx✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓
Summary: files=229 functions=1122 scored=1122 worst_score=15944.76

** (Mix) CRAP threshold failed: max_score=30.00
High scores: 28
  lib/extensions/postgres_cdc_rls/subscription_manager.ex Extensions.PostgresCdcRls.SubscriptionManager.handle_info/2 score=37.16
  lib/realtime/adapters/postgres/oid_database.ex Realtime.Adapters.Postgres.OidDatabase.name_for_type_id/1 score=15944.76
  lib/realtime/application.ex Realtime.Application.setup_region_mapping/0 score=47.11
  lib/realtime/nodes.ex Realtime.Nodes.default_region_mapping/1 score=157.20
  lib/realtime/operations.ex Realtime.Operations.rebalance/0 score=42.00
  lib/realtime/operations.ex Realtime.Operations.kill_connections_to_tenant_id/2 score=90.00
  lib/realtime_web/channels/auth/jwt_verification.ex RealtimeWeb.JwtVerification.generate_signer/3 score=31.09
  lib/realtime_web/channels/realtime_channel.ex RealtimeWeb.RealtimeChannel.handle_info/2 score=62.45
  lib/realtime_web/channels/realtime_channel.ex RealtimeWeb.RealtimeChannel.handle_in/3 score=136.64
  lib/realtime_web/dashboard/feature_flags.ex RealtimeWeb.Dashboard.FeatureFlags.handle_event/3 score=702.00
  lib/realtime_web/dashboard/node_info.ex RealtimeWeb.Dashboard.NodeInfo.fetch_node_data/2 score=42.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.handle_event/3 score=552.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.handle_info/2 score=210.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.render_value/2 score=42.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.load_module_functions/1 score=42.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.parse_and_start/2 score=110.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.format_value/1 score=702.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.sort_entries/2 score=42.00
  lib/realtime_web/dashboard/recon_trace.ex RealtimeWeb.Dashboard.ReconTrace.parse_module/1 score=90.00
  lib/realtime_web/dashboard/sql_inspector.ex RealtimeWeb.Dashboard.SqlInspector.handle_event/3 score=72.00
  lib/realtime_web/dashboard/sql_inspector.ex RealtimeWeb.Dashboard.SqlInspector.execute_read_only/1 score=72.00
  lib/realtime_web/dashboard/sql_inspector.ex RealtimeWeb.Dashboard.SqlInspector.mask_sensitive_columns/1 score=42.00
  lib/realtime_web/dashboard/sql_inspector.ex RealtimeWeb.Dashboard.SqlInspector.compare_cells/2 score=42.00
  lib/realtime_web/dashboard/sql_inspector.ex RealtimeWeb.Dashboard.SqlInspector.format_cell/1 score=72.00
  lib/realtime_web/dashboard/tenant_migrations.ex RealtimeWeb.Dashboard.TenantMigrations.handle_info/2 score=118.65
  lib/realtime_web/dashboard/tenant_migrations.ex RealtimeWeb.Dashboard.TenantMigrations.run_pgdelta/2 score=61.39
  lib/realtime_web/live/inspector_live/event_log_component.ex RealtimeWeb.InspectorLive.EventLogComponent.category_variant/1 score=50.88
  lib/realtime_web/live/status_live/index.ex RealtimeWeb.StatusLive.Index.handle_event/3 score=42.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants