parroty / excoveralls

Coverage report tool for Elixir with coveralls.io integration.
MIT License
821 stars 178 forks source link

Moving Away from Hackney #115

Open BenMorganIO opened 6 years ago

BenMorganIO commented 6 years ago

Hey there,

The team that I'm working with is interested in lowering a number of dependencies that we have inside of a project. For ExCoveralls, we noticed that you're using Hackney which depends upon idna. If we can remove Hackney, we can also remove idna. Why is this beneficial?

  1. Two fewer dependencies.
  2. Two less intense CPU compile-time dependencies (I'm referring more to you, idna).

@parroty, would you be interested in a PR to begin using, perhaps, erlangs HTTP client?

http://erlang.org/doc/apps/inets/http_client.html


From searching around, I can see that Hackney is only used in two locations. Once in the tests and twice in the ExCoveralls.Poster.

https://github.com/parroty/excoveralls/blob/738ca9aae5d044ba32b30106975e4f62cb05b950/lib/excoveralls/poster.ex#L27

https://github.com/parroty/excoveralls/blob/738ca9aae5d044ba32b30106975e4f62cb05b950/lib/excoveralls/poster.ex#L40

parroty commented 6 years ago

Thanks for the suggestion, it would be better to use native library as http access is not heavily used. When initially implemented, it was easier to send multipart-post request using the library, but it seems inets/http_client can do the same.