hex_tarball:unpack/2, create/2 API changes
Nobody has claimed this yet.
- Dominant language
- Erlang
- Stars
- 105
- Forks
- 34
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 6
Description
Currently the API is:
-type contents() :: #{filename() => binary()}.
-type tarball() :: binary().
%% ...
-spec unpack(tarball(), memory) ->
{ok, #{checksum => checksum(), metadata => metadata(), contents => contents()}} |
{error, term()};
(tarball(), filename()) ->
{ok, #{checksum => checksum(), metadata => metadata()}} |
{error, term()}.
so we are only able to accept binaries. I'm wondering if we should accept filenames too, so instead of binary() we accept {binary, binary()} | filename:filename() and deprecate the former? Eventually, at say v1.0, we'd accept {binary, binary()} | filename:filename_all().
This is a low-level library so I'm ok with pretty low level interface but I think this change would make it more convenient to use and I wish I'd have started with that.
Thoughts? cc @ferd @tsloughter
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the hex_tarball:unpack/2 and create/2 APIs described in the issue, along with their current specifications and callers. The issue needs a decided input representation, deprecation plan, and version target before implementation can be considered complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100