Skip to content

Instantly share code, notes, and snippets.

@ollien
Created December 8, 2024 22:48
Show Gist options
  • Select an option

  • Save ollien/22c65c77cf94c1ad0fdf37aea1dc4c80 to your computer and use it in GitHub Desktop.

Select an option

Save ollien/22c65c77cf94c1ad0fdf37aea1dc4c80 to your computer and use it in GitHub Desktop.
** (MatchError) no match of right hand side value: {:error, {:abstract_forms_invalid, [{:attribute, {1, 1}, :file, {~c"erlang.erl", 1}}, {:attribute, [generated: true], :module, :"Elixir.Patch.Mock.Original.For.erlang"}, {:attribute, [generated: true], :export, [badarg_with_cause: 2, badarg_with_info: 1, error_with_info: 2, error_with_inherited_info: 3, ensure_tracer_module_loaded: 2, gc_info: 3, gather_gc_info_result: 1, receive_allocator: 3, insert_info: 2, insert_instance: 3, mk_res_list: 1, get_alloc_info: 2, alloc_sizes: 1, alloc_info: 1, aa_mem_data: 1, aa_mem_data: 2, receive_emd: 1, receive_emd: 3, au_mem_data: 1, au_mem_data: 2, au_mem_current: 3, au_mem_blocks_1: 2, au_mem_blocks: 2, acc_blocks_size: 2, au_mem_acc: 3, au_mem_fix: 2, fix_proc: 2, get_fix_proc: 2, get_memval: 2, memory_1: 2, memory: 1, memory: 0, rvrs: 2, rvrs: 1, cput_i2e_tag: 2, cput_i2e_tag_map: 0, cput_i2e: 6, cput_i2e: 4, cput_i2e: 1, ...]}, {:attribute, {57, 2}, :deprecated, [{:now, 0, ~c"see the \"Time and Time Correction in Erlang\" chapter of the ERTS User's Guide for more information"}]}, {:attribute, {60, 2}, :deprecated, [{:phash, 2, ~c"use erlang:phash2/2 instead"}]}, {:attribute, {61, 2}, :removed, [{:hash, 2, ~c"use erlang:phash2/2 instead"}]}, {:attribute, {62, 2}, :removed, [{:get_stacktrace, 0, ~c"use the new try/catch syntax for retrieving the stack backtrace"}]}, {:attribute, {67, 2}, :compile, {:no_auto_import, [spawn_link: 1]}}, {:attribute, {68, 2}, :compile, {:no_auto_import, [spawn_link: 4]}}, {:attribute, {69, 2}, :compile, {:no_auto_import, [spawn_opt: 2]}}, {:attribute, {70, 2}, :compile, {:no_auto_import, [spawn_opt: 4]}}, {:attribute, {71, 2}, :compile, {:no_auto_import, [spawn_opt: 5]}}, {:attribute, {75, 2}, :compile, {:inline, [badarg_with_info: 1, error_with_info: 2, error_with_inherited_info: 3, badarg_with_cause: 2]}}, {:attribute, {77, 2}, :compile, :no_auto_import_types}, {:attribute, {80, 2}, :type, {:any, {:type, {80, 16}, :any, []}, []}}, {:attribute, {81, 2}, :type, {:arity, {:type, {81, 18}, :arity, []}, []}}, {:attribute, {82, 2}, :type, {:atom, {:type, {82, 17}, :atom, []}, []}}, {:attribute, {83, 2}, :type, {:binary, {:type, {83, 19}, :binary, [{:integer, 83, 0}, {:integer, {83, 25}, 8}]}, []}}, {:attribute, {84, 2}, :type, {:bitstring, {:type, {84, 22}, :binary, [{:integer, 84, 0}, {:integer, {84, 28}, 1}]}, []}}, {:attribute, {85, 2}, :type, {:bool, {:type, {85, 17}, :boolean, []}, []}}, {:attribute, {86, 2}, :type, {:boolean, {:type, {86, 20}, :union, [{:atom, {86, 20}, true}, {:atom, {86, 27}, false}]}, []}}, {:attribute, {87, 2}, :type, {:byte, {:type, {87, 17}, :range, [{:integer, {87, 17}, 0}, {:integer, {87, 20}, 255}]}, []}}, {:attribute, {88, 2}, :type, {:char, {:type, {88, 17}, :range, [{:integer, {88, 17}, 0}, {:integer, {88, 20}, 1114111}]}, []}}, {:attribute, {89, 2}, :type, {:dynamic, {:type, {89, 20}, :dynamic, []}, []}}, {:attribute, {90, 2}, :type, {:float, {:type, {90, 18}, :float, []}, []}}, {:attribute, {91, 2}, :type, {:function, {:type, {91, 21}, :fun, []}, []}}, {:attribute, {92, 2}, :type, {:identifier, {:type, {92, 23}, :union, [{:type, {92, 23}, :pid, []}, {:type, {92, 31}, :port, []}, {:type, {92, 40}, :reference, []}]}, []}}, {:attribute, {93, 2}, :type, {:integer, {:type, {93, 20}, :integer, []}, []}}, {:attribute, {94, 2}, :type, {:iodata, {:type, {94, 19}, :union, [{:type, {94, 19}, :iolist, []}, {:type, {94, 30}, :binary, []}]}, []}}, {:attribute, {95, 2}, :type, {:iolist, {:type, {95, 19}, :maybe_improper_list, [{:type, {95, 39}, :union, [{...}, ...]}, {:type, {95, 69}, :union, [...]}]}, []}}, {:attribute, {96, 2}, :type, {:list, {:type, {96, 17}, :list, [{:type, {96, 18}, :any, []}]}, []}}, {:attribute, {97, 2}, :type, {:list, {:type, {97, 28}, :list, [{:var, {97, ...}, :ContentType}]}, [{:var, {97, 12}, :ContentType}]}}, {:attribute, {98, 2}, :type, {:map, {:type, {98, 16}, :map, [{:type, {...}, ...}]}, []}}, {:attribute, {99, 2}, :type, {:maybe_improper_list, {:type, {99, 32}, :maybe_improper_list, [{:type, ...}, {...}]}, []}}, {:attribute, {100, 2}, :type, {:maybe_improper_list, {:type, {100, 60}, :maybe_improper_list, [{...}, ...]}, [{:var, {100, ...}, :ContentType}, {:var, {...}, ...}]}}, {:attribute, {101, 2}, :type, {:mfa, {:type, {101, 16}, :tuple, [...]}, []}}, {:attribute, {102, 2}, :type, {:module, {:type, {102, ...}, :atom, ...}, []}}, {:attribute, {103, 2}, :type, {:neg_integer, {:type, {...}, ...}, []}}, {:attribute, {104, 2}, :type, {nil, {:type, ...}, []}}, {:attribute, {105, 2}, :type, {:no_return, {...}, ...}}, {:attribute, {106, 2}, :type, {:node, ...}}, {:attribute, {107, 2}, :type, {...}}, {:attribute, {108, ...}, :type, ...}, {:attribute, {...}, ...}, {:attribute, ...}, {...}, ...], {:error, [{~c"erlang.erl", [{{57, 2}, :erl_lint, {:bad_deprecated, {:now, 0}}}, {{60, 2}, :erl_lint, {:bad_deprecated, {:phash, 2}}}, {{1411, 2}, :erl_lint, {:undefined_function, {:halt, 2}}}]}], [{~c"erlang.erl", [{{156, 2}, :erl_lint, {:unused_type, {:ext_binary, 0}}}, {{157, 2}, :erl_lint, {:unused_type, {:ext_iovec, 0}}}, {{319, 2}, :erl_lint, {:unused_type, {:fun_info_item, 0}}}, {{331, 2}, :erl_lint, {:unused_type, {:seq_trace_info_returns, 0}}}, {{337, 2}, :erl_lint, {:unused_type, {:system_profile_option, 0}}}, {{346, 2}, :erl_lint, {:unused_type, {:system_monitor_option, 0}}}, {{353, 2}, :erl_lint, {:unused_type, {:raise_stacktrace, 0}}}, {{357, 2}, :erl_lint, {:unused_type, {:bitstring_list, 0}}}, {{360, 2}, :erl_lint, {:unused_type, {:trace_flag, 0}}}, {{386, 2}, :erl_lint, {:unused_type, {:trace_info_item_result, 0}}}, {{396, 2}, :erl_lint, {:unused_type, {:trace_info_flag, 0}}}, {{412, 2}, :erl_lint, {:unused_type, {:trace_info_return, 0}}}, {{1401, 2}, :erl_lint, {:unused_type, {:halt_options, 0}}}, {{1685, 2}, :erl_lint, {:unused_type, {:registered_name, 0}}}, {{1686, 2}, :erl_lint, {:unused_type, {:registered_process_identifier, 0}}}, {{1687, 2}, :erl_lint, {:unused_type, {:monitor_process_identifier, 0}}}, {{1688, 2}, :erl_lint, {:unused_type, {:monitor_port_identifier, 0}}}, {{2416, 2}, :erl_lint, {:unused_type, {:module_info_key, 0}}}, {{2684, 2}, :erl_lint, {:unused_type, {:process_info_item, 0}}}, {{2722, 2}, :erl_lint, {:unused_type, {:process_info_result_item, 0}}}, {{2772, 2}, :erl_lint, {:unused_type, {:stack_item, 0}}}, {{2896, 2}, :erl_lint, {:unused_type, {:scheduler_bind_type, 0}}}, {{3008, 2}, :erl_lint, {:unused_type, {:match_variable, 0}}}, {{3009, 2}, :erl_lint, {:unused_type, {:trace_pattern_mfa, 0}}}, {{3011, 2}, :erl_lint, {:unused_type, {:trace_match_spec, 0}}}, {{3027, 2}, :erl_lint, {:unused_type, {:trace_pattern_flag, 0}}}, {{3062, 2}, :erl_lint, {:unused_type, {:cpu_topology, 0}}}, {{3064, 2}, :erl_lint, {:unused_type, {:level_entry, 0}}}, {{3069, 2}, :erl_lint, {:unused_type, {:level_tag, 0}}}, {{3070, 2}, :erl_lint, {:unused_type, {:sub_level, 0}}}, {{3072, 2}, :erl_lint, {:unused_type, {:info_list, 0}}}, {{4280, 2}, :erl_lint, {:unused_type, {:memory_type, 0}}}]}]}}}
code: patch(:erlang, :node, :me@localhost)
stacktrace:
(patch 0.14.0) lib/patch.ex:492: Patch.patch/3
(patch 0.14.0) lib/patch.ex:507: Patch.patch/3
test/user/patch/erlang_test.exs:28: (test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment