Verification hangs with `:telemetry` specific case on main
Closed this issue · 1 comments
Gladear commented
Elixir and Erlang/OTP versions
Erlang/OTP 27 [erts-15.2.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Elixir 1.20.0-dev (811767f) (compiled with Erlang/OTP 27)
Operating system
MacOS 15.6
Current behavior
When compiling this, either using Mix or in IEx, the compilation hangs, displaying message Verifying NoVerify (it's taking more than 10s) after ten seconds.
If I modify the code by removing the call to :telemetry, removing any of the clauses of handle_event/4, or modify the pattern-matching (for example, modify key2 by key1 in the third clause's metadata), it compiles correctly.
Mix.install(telemetry: "~> 1.3")
defmodule NoVerify do
def hello do
:telemetry.attach_many("id", [], &__MODULE__.handle_event/4, [])
end
def handle_event([:event, _event], _measure, _meta, _opts), do: :ok
def handle_event([:event, :event1], _measure, %{key1: _value1}, _opts), do: :ok
def handle_event([:event, :event2], _measure, %{key2: _value2}, _opts), do: :ok
def handle_event([:event, :event3], _measure, _meta, _opts), do: :ok
endExpected behavior
This should compile fine 👌