CrabMan
CrabMan

Reputation: 1738

What does it mean: WARNING! Excluded dependencies (not part of the Hex package)?

When I try to publish a new version of my package on hex, it prints the following warning:

  WARNING! Excluded dependencies (not part of the Hex package):
    ex_doc

Full text of me running the command:

$ mix hex.publish
Publishing usefulness 0.0.5
  Dependencies:
    earmark >= 0.0.0 
  Files:
    lib/usefulness.ex
    lib/usefulness/stream.ex
    lib/usefulness/string.ex
    config/config.exs
    test/test_helper.exs
    test/usefulness_test.exs
    mix.exs
    README.md
    LICENSE
  App: usefulness
  Name: usefulness
  Description: Useful things
  Version: 0.0.5
  Build tools: mix
  Licenses: Apache 2.0
  Maintainers: afasdasd
  Links: 
    Github: https://github.com/b-filip/usefulness
  Elixir: ~> 1.2
  WARNING! Excluded dependencies (not part of the Hex package):
    ex_doc
Before publishing, please read Hex Code of Conduct: https://hex.pm/docs/codeofconduct
Proceed? [Yn]

I have no idea what this warning means

Here is what my project.deps in mix.exs consists of:

defp deps do
  [
    {:ex_doc, "~> 0.11", only: :dev},
    {:earmark, ">= 0.0.0"}
  ]
end

Upvotes: 0

Views: 227

Answers (1)

Martin Svalin
Martin Svalin

Reputation: 2267

It means you have a dependency in your project that will not be a dependency of your package that you publish to hex. This is normal, projects often have development dependencies for testing, static analysis, generating documentation etc.

Hex lists them so you can have a quick look and make sure you didn't leave out an actual dependency of your code, that would result in a broken package.

ExDoc should most likely not be a dependency of your package. You're good to go. Good work creating your hex package!

Upvotes: 5

Related Questions