Skip to content

Mixfile: extra_applications instead of applications #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

mweidner037
Copy link
Collaborator

When attempting to publish from my local machine with Elixir 1.17 (or 1.15), I encountered the issue described here, which is due to the applications: key in the Mixfile. I'm guessing newer versions of mix require applications not listed there.

This PR attempts to fix the issue by using extra_applications instead of applications and eliminating entries that should start automatically (because they are included in deps). The change is per the docs in mix help compile.app:

:extra_applications - a list of OTP applications your application
    depends on which are not included in :deps (usually defined in deps/0 in
    your mix.exs). For example, here you can declare a dependency on
    applications that ship with Erlang/OTP or Elixir, like :crypto or :logger.
    Optional extra applications can be declared as a tuple, such as {:ex_unit,
    :optional}. Mix guarantees all non-optional applications are started before
    your application starts.

With these changes, I am now able to run mix docs locally, which hopefully means that mix hex.publish will work too. However, I am not sure whether the changes will affect consumers of the package, and if so, how to test its effect on them.

Copy link
Collaborator

@scottmessinger scottmessinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great! Thank you!

@mweidner037 mweidner037 merged commit cc8e124 into master Mar 12, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants