hexpm / hex_core

Reference implementation of Hex specifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roadmap

wojtekmach opened this issue · comments

v0.1.0:

  • Add script to vendor hex_erl into other builds tools (rewrite vendor_hex_erl task in bash or something; include hex_erl version in generated files) (#7)
  • Add ETag support to hex_repo (#8)
  • Add hex_api client per https://github.com/hexpm/specifications/blob/master/http_api.md
    • public endpoints (get package, get release etc) (#11)
    • search endpoint
    • private endpoints (keys, owners etc) (#26)
    • organizations support (#26)
    • create user endpoint (#26)
    • publish package endpoint (#26)
    • Add ETag support
    • Rate limit headers support (no longer applies, we return all headers)
    • URI.encode (in Erlang) URLs (#26)

v0.2.0:

regarding "ETag" support I think we can do the following; change:

-spec get_tarball(name(), version(), options()) -> {ok, tarball()}.

to:

  1. -spec get_tarball(name(), version(), etag(), options()) -> {ok, tarball()} | {ok, cached}.

alternatively, we could also pass it in options, I guess the users would then call it as e.g. hex_repo:get_tarball(Name, Version, [{etag, ETag} | hex_repo:default_options()])

  1. Add cache_dir to options hex_repo.erl:14, and on 304 Not Modified we read from cache; this way the successful return value is always {ok, tarball()}

I think we could start with 1. and later maybe add 2

I'd like to work on this, unless you've already started.

Go for it