(RuntimeError) found error while checking types for Cachex.Services.Overseer.transaction/2
Closed this issue · 2 comments
AbhiPrasad commented
Elixir and Erlang/OTP versions
Erlang/OTP 27 [erts-15.2.7] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.17.3 (compiled with Erlang/OTP 27)
Operating system
MacOS 15.5 (24F74)
Current behavior
Clone https://github.com/Logflare/logflare
Run make setup. This error occurs.
Compiling 61 files (.ex)
** (EXIT from #PID<0.101.0>) an exception was raised:
** (RuntimeError) found error while checking types for Cachex.Services.Overseer.transaction/2:
** (MatchError) no match of right hand side value: {:EXIT, {:badarg, [{:erlang, :binary_to_atom, [<<115, 108, 101, 101, 112, 108, 111, 99, 107, 115, 48, 110, 101, 119, 64, 110, 97, 109, 101, 144, 112, 114, 111, 112, 108, 105, 115, 116, 115, 144, 103, 101, 116, 95, 118, 97, 108, 117, 101, 144, 117, ...>>, :utf8], [error_info: %{module: :erl_erts_errors}]}, {:beam_lib, :extract_atom, 2, [file: ~c"beam_lib.erl", line: 1217]}, {:beam_lib, :get_atom_data, 8, [file: ~c"beam_lib.erl", line: 981]}, {:beam_lib, :scan_beam1, 2, [file: ~c"beam_lib.erl", line: 942]}, {:beam_lib, :scan_beam, 4, [file: ~c"beam_lib.erl", line: 927]}, {:beam_lib, :read_chunk_data, 3, [file: ~c"beam_lib.erl", line: 899]}, {:beam_lib, :read_chunk_data, 2, [file: ~c"beam_lib.erl", line: 890]}, {Module.ParallelChecker, :cache_module, 2, [file: ~c"lib/module/parallel_checker.ex", line: 376]}]}}
The exception happened while checking this code:
def transaction(name, fun)
when :erlang.andalso(:erlang.is_atom(name), :erlang.is_function(fun, 0)) do
:sleeplocks.execute(:cachex_overseer_manager, fun)
end
Please report this bug at: https://github.com/elixir-lang/elixir/issues
(stdlib 6.2.2) beam_lib.erl:899: :beam_lib.read_chunk_data/3
(stdlib 6.2.2) beam_lib.erl:890: :beam_lib.read_chunk_data/2
(elixir 1.17.3) lib/module/parallel_checker.ex:376: Module.ParallelChecker.cache_module/2
(elixir 1.17.3) lib/module/types/of.ex:323: Module.Types.Of.remote/6
(elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
(elixir 1.17.3) lib/module/types/of.ex:304: Module.Types.Of.remote/8
(elixir 1.17.3) lib/module/types/expr.ex:333: Module.Types.Expr.of_expr/3
(elixir 1.17.3) lib/module/types.ex:56: Module.Types.warnings_from_clause/6
make: *** [setup] Error 1
Expected behavior
No error
AbhiPrasad commented
Hmm it seems like it was a stale build, not sure how that happened though 🤔. I've been running on the same elixir version. Strange, anyway doesn't appear anymore so closing for now!
josevalim commented
It is a bug when you use more recent OTP versions and roleback. So make sure to have the OTP version as cache key. But we have also fixed this in more recent Elixir releases.