Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Remove hackney dependency - #172

Merged
ericmj merged 5 commits into
mainfrom
worktree-remove-hackney
Jun 1, 2026
Merged

ericmj merged 5 commits into
mainfrom
worktree-remove-hackney

Conversation

@ericmj

@ericmj ericmj commented May 29, 2026

Copy link
Copy Markdown
Member

Migrate Diff.HTTP and Diff.Hex.Adapter from hackney to Finch and drop hackney from mix.exs.

  • Add {:finch, "~> 0.22.0"} as an explicit dep and start Diff.Finch in the supervisor.
  • Replace :hackney.get/put in Diff.HTTP with Finch; delete the unused get_stream/put_stream (no callers anywhere in the project).
  • Rewrite Diff.Hex.Adapter (:hex_http callback) using Finch — manual redirect following (301/302/303/307/308, max 5 hops, 303 switches to GET, relative location resolved via URI.merge) and Finch.stream for tarball downloads to file.
  • Remove :hackney from mix.exs. Drop unused :inets from extra_applications.
  • Add {:bypass, "~> 2.1", only: :test} plus tests for the new HTTP code paths (status passthrough, error handling, redirect chain, tarball-to-file, 404 body skip).

@ericmj
ericmj marked this pull request as ready for review May 29, 2026 19:34
ericmj added 5 commits June 1, 2026 11:50
Delete get_stream/2, put_stream/3, and the read_response/1 helper.
Reimplement get/2 and put/3 against Finch. Add Bypass + tests.
Rewrites both :hex_http behaviour callbacks to use Finch with manual
redirect following (up to 5 hops, preserving method/body except on 303),
and adds ExUnit tests using Bypass covering the main HTTP flows.
@ericmj
ericmj force-pushed the worktree-remove-hackney branch from ecb6bcc to 83f920e Compare June 1, 2026 09:52
@ericmj
ericmj merged commit 7df333a into main Jun 1, 2026
31 of 44 checks passed
@ericmj
ericmj deleted the worktree-remove-hackney branch June 1, 2026 10:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant