hexpm / hex_core

Reference implementation of Hex specifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix typespec for hex_tarball:create/2

wojtekmach opened this issue · comments

The specs are:

-spec create(metadata(), files()) -> {ok, {tarball(), checksum()}}.
-type contents() :: #{filename() => binary()}.
-type filename() :: string().
-type files() :: [filename() | {filename(), filename()}] | contents().

but we don't actually accept a map as files on create, we're incorrectly re-using contents type that is only for unpack.