Description
This is a follow-up to #2498 (comment).
Rebar3 currently attempts to fetch and compile optional transitive dependencies, even when:
- they are only declared as optional in
mix.exs,
- they are not listed in
rebar.config,
- and they are Mix-only packages.
This causes build failures because Rebar3 does not understand Mix deps out of the box and should be ignoring them entirely.
Example
Repo: https://github.com/erlef/purl
rebar.config: no deps
mix.exs: stream_data listed as optional
- Expected: Rebar3 ignores it
- Actual: Rebar3 tries to compile
stream_data and fails
Expected behavior
Optional dependencies not present in rebar.config should be ignored by Rebar3, even if they appear in mix.exs. This is needed for cross-tool compatibility when a library supports both build tools.