Mix hex.build throw `Excluded dependencies error in hex 1.3.1`

,

Hi there,

Is there proper way to describe depends in mix.exs file for new version hex?

My hex file has a dev and test dependencies described in project.deps

  defp deps do
    [
      {:credo, "~> 0.4", only: :dev},
      {:dialyxir, "~> 0.3.5", only: :dev},
      {:ex_machina, "~> 1.0.2", only: :test},
      {:ex_doc, "~> 0.13.0", only: :dev},
      {:postgrex, "~> 0.12", optional: true},
      {:ecto, "~> 2.0"}
    ]
  end

Few hours ago I updated hex as mix suggest to me, then I tried to run mix hex.build and got a error:

** (Mix) Stopping package build due to errors.
Excluded dependencies (not part of the Hex package):
    credo
    dialyxir
    ex_machina
    ex_doc

the question is how have to look new deps function for properly work with new hex version?

I do not think, that the deps are related to your build failure. mix hex.build has excluded non-prod deps ever since and told you about that fact after the run.

Therefore I do think that the error is somewhere else. Since you build for hex, I assume your project is open to the public, can you link the source?

A hotfix for Hex has been released. It was only supposed to error on non-Hex dependencies that are not in the prod environment.

1 Like