Closed SteffenDE closed 6 months ago
here is a smaller repro: https://github.com/josevalim/test_umbrella
Thank you very much for the quick fix. Will this be backported to a future 1.16 release?
Unfortunately it won’t. Changes to the converger are too delicate to backport. Maybe it works if you also add Floki as only test at the root? It may also work if you use LV as a git dep for now.
All good, we'll use only: [:test, :e2e]
for floki until Elixir 1.17 is out.
Elixir and Erlang/OTP versions
Elixir 1.17.0-dev (4631784) (compiled with Erlang/OTP 26)
Operating system
macOS
Current behavior
Another minimal reproduction is here https://github.com/SteffenDE/mix_optional_deps_umbrella_bug
The structure: We have an umbrella application
app_umbrella
that depends on dependency bdep_b
in its applicationmy_app
, but also includesdep_b
as dependency in the umbrella root.dep_b
depends ondep_a
withoptional: true
.my_app
depends ondep_a
withonly: :test
. The issue occurs when fetching dependencies for another env, for examplemix deps.get --only e2e
.In a real application
dep_b
would be phoenix_live_view anddep_a
floki.Expected behavior
It should work, so either
mix should not include optional dependencies of apps added in the umbrella root if they are not required for an env given with
--only
.or
hex shouldn't fail.
Please feel free to close this if it's not a mix, but a hex issue instead.