Optional umbrella deps in release

It seems that the :optional flag is broken for umbrella dependencies in Elixir 1.15. For example, there’s an umbrella project https://github.com/Ellocsys/optional_deps with a dependency graph like this:

app_3
└── app_2
    └── app_1 (optional)

When building a release with the command mix release app_3, the optional dependency app_1 will be included in the release with a launch type of :permanent. However, in version 1.14, the same optional dependency would be added to the release with a launch type of :load, which is consistent with the documentation:

https://hexdocs.pm/mix/1.15.7/Mix.Tasks.Deps.html#module-dependency-definition-options

“Optional dependencies will not be started by the application.”

Can you please advise if this is a bug or if managing the startup of optional dependencies should be done differently now?

1 Like

According to Optional umbrella deps starts in mix release · Issue #13399 · elixir-lang/elixir · GitHub .
In this configuration, the optional flag will no longer work.
In any case, I was able to solve my problem with such a release config

[
  app_3: [
    applications: [app_1: :none],
    skip_mode_validation_for: [:app_1]
  ]
]