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
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
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.. ![]()
Thanks for helping me out!
Last Post!
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.. ![]()
Thanks for helping me out!
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security










