hexpm / hex

Package manager for the Erlang VM

Home Page:https://hex.pm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mix hex.registry build crashes with some tarballs

geib opened this issue · comments

Testing self hosting of registry fails with some packages I try to add, also tried packages downloaded from hex.pm. Other tarballs work fine as you can see. My tarball is built with "rebar3 publish" command.

$mix hex.package fetch rebar3_hex 6.10.3
rebar3_hex v6.10.3 downloaded to /home/name/os-git/hex/rebar3_hex-6.10.3.tar
$cp rebar3_hex-6.10.3.tar public/tarballs/.
$ mix hex.registry build public --name=acme --private-key=private_key.pem

  • updating public/packages/cowboy
  • updating public/packages/decimal
  • updating public/packages/jason
  • updating public/packages/metrics
    ** (MatchError) no match of right hand side value: %{"app" => "hex_core", "optional" => false, "requirement" => "0.7.1"}
    (hex 0.21.2-dev) lib/mix/tasks/hex.registry.ex:157: anonymous fn/3 in Mix.Tasks.Hex.Registry.build_release/2
    (stdlib 3.8) maps.erl:257: :maps.fold_1/3
    (hex 0.21.2-dev) lib/mix/tasks/hex.registry.ex:151: Mix.Tasks.Hex.Registry.build_release/2
    (elixir 1.10.0) lib/enum.ex:1396: Enum."-map/2-lists^map/1-0-"/2
    (hex 0.21.2-dev) lib/mix/tasks/hex.registry.ex:118: anonymous fn/4 in Mix.Tasks.Hex.Registry.build/3
    (elixir 1.10.0) lib/enum.ex:1400: anonymous fn/3 in Enum.map/2
    (stdlib 3.8) maps.erl:257: :maps.fold_1/3
    (elixir 1.10.0) lib/enum.ex:2127: Enum.map/2
    (hex 0.21.2-dev) lib/mix/tasks/hex.registry.ex:115: Mix.Tasks.Hex.Registry.build/3
    (mix 1.10.0) lib/mix/task.ex:330: Mix.Task.run_task/3
    (mix 1.10.0) lib/mix/cli.ex:82: Mix.CLI.run_task/2
    (elixir 1.10.0) lib/code.ex:917: Code.require_file/2

Mark.

Thank you for the report, fix is on its way.