mod.__info__(:struct) missing `:required` key in elixir 1.18-rc.0
Closed this issue · 1 comments
MrYawe commented
Elixir and Erlang/OTP versions
Erlang/OTP 27 [erts-15.1.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Elixir 1.18.0-rc.0 (66c5908) (compiled with Erlang/OTP 27)
Operating system
macOS 14.7 (23H124)
Current behavior
In elixir 1.18-rc.0:
iex> Goth.__info__(:struct)
[
%{default: nil, field: :name},
%{default: nil, field: :source},
%{default: nil, field: :retry_delay},
%{default: nil, field: :http_client},
%{default: nil, field: :retry_after},
%{default: nil, field: :refresh_before},
%{default: 10, field: :max_retries},
%{default: 0, field: :retries}
]
Expected behavior
In elixir 1.17:
iex> Goth.__info__(:struct)
[
%{field: :name, required: false},
%{field: :source, required: false},
%{field: :retry_delay, required: false},
%{field: :http_client, required: false},
%{field: :retry_after, required: false},
%{field: :refresh_before, required: false},
%{field: :max_retries, required: false},
%{field: :retries, required: false}
]
This is breaking the mimic library edgurgel/mimic#87
josevalim commented
mimic
should be fixed. I believe the library is "mocking" Elixir internals and it will continue to break while it continues to mock the internals :) Thank you for the report!