-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Some Elixir libraries have references to erlang types, like Erlang records.
For example, the OpenTelemetry library has start_opts
type:
https://hexdocs.pm/opentelemetry_api/OpenTelemetry.Tracer.html#t:start_opts/0
If you try to reference it and use Hammox protect, it raises an exception like this:
The following arguments were given to Hammox.TypeEngine.match_type/2:
# 1
{:some_attribute, "somevallue"}
# 2
{:type, 116, :record, [{:atom, 116, :link}]}
Attempted function clauses (showing 10 out of 92):
def match_type(value, {:type, _, :union, union_types} = union) when is_list(union_types)
def match_type(_value, {:type, _, :any, []})
def match_type(value, {:type, _, :none, []} = type)
def match_type(value, {:type, _, :atom, []}) when is_atom(value)
def match_type(value, {:type, _, :atom, []} = type)
def match_type(value, {:type, _, :map, :any}) when is_map(value)
def match_type(value, {:type, _, :pid, []}) when is_pid(value)
def match_type(value, {:type, _, :pid, []} = type)
def match_type(value, {:type, _, :port, []}) when is_port(value)
def match_type(value, {:type, _, :port, []} = type)
It would be very cool if Hammox could verify it.
AlphaHydraemsz
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request