exvcr icon indicating copy to clipboard operation
exvcr copied to clipboard

ExVCR.IEx not working with adapter: ExVCR.Adapter.Hackney

Open bryanhuntesl opened this issue 4 years ago • 2 comments

https://github.com/parroty/exvcr#iex-helper

I try running the example from the README :

% iex -S mix   
Erlang/OTP 22 [erts-10.7.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]

Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> require ExVCR.IEx                                 
ExVCR.IEx
iex(2)> ExVCR.IEx.print(adapter: ExVCR.Adapter.Hackney) do
...(2)> HTTPoison.get!("http://example.com").body         
...(2)> end
** (ArgumentError) you attempted to apply :module_name on {:__aliases__, [line: 2], [:ExVCR, :Adapter, :Hackney]}. If you are using apply/3, make sure the module is an atom. If you are using the dot syntax, such as map.field or module.function, make sure the left side of the dot is an atom or a map
    :erlang.apply({:__aliases__, [line: 2], [:ExVCR, :Adapter, :Hackney]}, :module_name, [])
    (exvcr 0.11.1) expanding macro: ExVCR.IEx.print/2
    iex:2: (file)

bryanhuntesl avatar Jun 24 '20 16:06 bryanhuntesl

Same issue too

Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]

Interactive Elixir (1.10.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> require ExVCR.IEx
ExVCR.IEx
iex(2)> ExVCR.IEx.print(adapter: ExVCR.Adapter.Hackney) do
...(2)> HTTPoison.get!("http://example.com").body
...(2)> end
** (ArgumentError) you attempted to apply :module_name on {:__aliases__, [line: 2], [:ExVCR, :Adapter, :Hackney]}. If you are using apply/3, make sure the module is an atom. If you are using the dot syntax, such as map.field or module.function, make sure the left side of the dot is an atom or a map
    :erlang.apply({:__aliases__, [line: 2], [:ExVCR, :Adapter, :Hackney]}, :module_name, [])
    (exvcr 0.11.1) expanding macro: ExVCR.IEx.print/2
    iex:2: (file)
iex(2)> 

andyduong1920 avatar Jul 15 '20 10:07 andyduong1920

It's a pretty simple fix - maybe one of the maintainers could take a look at #157 ? @parroty ?

ghost avatar Jul 16 '20 10:07 ghost