westmark

westmark

Compilation error with ExVCR and Finch in 1.19

Hi! Trying to upgrade our project to 1.19.3 and OTP 28.1. Having deleted deps and build dirs, reinstalling everything and running mix test, I get the following compilation error

== Compilation error in file test/test.exs ==
** (RuntimeError) Missing dependency: Finch
(exvcr 0.15.2) lib/exvcr/adapter/finch.ex:113: ExVCR.Adapter.Finch.module_name/0

Looking at the code for the ExVCR Finch adaptor, there is this:

if Code.ensure_loaded?(Finch) do
  defmodule ExVCR.Adapter.Finch do
    <truncated impl for brevity>  
  end
else
  defmodule ExVCR.Adapter.Finch do
    def module_name, do: raise("Missing dependency: Finch")
    def target_methods, do: raise("Missing dependency: Finch")
  end
end

So it seems that during compile time, Finch is not available at all (?) Running Code.ensure_loaded?(Finch) in the test before the above comes into play returns true. I have no idea how to go about this. Any suggestions?

Marked As Solved

phcurado

phcurado

great! I could replicate the error on your repository. I think the problem might be the exvcr version.
I managed to make it work by changing exvcr version:

{:exvcr, "~> 0.17", only: :test},

And running on the terminal:

mix deps.update exvcr

After this the tests work, maybe it have a bug on old versions of exvcr but I don’t know the cause.

Also Liked

westmark

westmark

Ah of course. I couldn’t test with the latest as I have a lot of issues with other downstream libs that conflict with each other and I had to make my own temporary version of them. I should have tested 0.17 in my repro.. :man_facepalming:

Thanks for helping me out!

Last Post!

westmark

westmark

Ah of course. I couldn’t test with the latest as I have a lot of issues with other downstream libs that conflict with each other and I had to make my own temporary version of them. I should have tested 0.17 in my repro.. :man_facepalming:

Thanks for helping me out!

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs &amp; Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement