-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace hackney with httpc #311
Conversation
Thanks. It's a little hectic week for me, but try to send message on the weekend / next week. |
@parroty hello! Any news on this? 🙃 |
@parroty ping 🙃 Would love to get an email and chat! 😉 |
@parroty ping 🏓 🙃 |
Sorry being slow to respond. I am seeing actions errors, but haven't been able look into it. Do you have any idea? |
@parroty finally fixed tests in CI on the supported versions, so this is ready to merge!!! Exciting times ahead. 💟 |
@@ -25,8 +25,8 @@ jobs: | |||
- uses: actions/cache@v3 | |||
with: | |||
path: deps | |||
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |||
key: ${{ runner.os }}-${{ matrix.elixir }}-otp${{ matrix.otp }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parroty having a single cache for all OTP versions causes issues when testing across different versions. Most projects I've used actually go with a per-version cache, so this is what this change is.
@parroty any news on this? 🙃 |
Tested this out in Xandra, works good 🙃 |
Woohooo! Thanks @parroty. Looking forward to a release 😉 |
Application.ensure_all_started(:hackney) | ||
defp upload_zipped_json(content, options) do | ||
Application.ensure_all_started(:ssl) | ||
Application.ensure_all_started(:httpc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why does :httpc
needs to be started explicitly? Starting :inets.start()
and :ssl.start()
typically was sufficient for me in the past 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably is sufficient, I just overlooked this. PRs welcome 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment. Do you see specific negative implication for this extra start logic? (Just a small overhead?).
I'll be publishing the release later today (after going back home), but wondering whether to update this before the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are passing, but CI is failing due to the old excoveralls issue seen before in parroty/excoveralls#254 However, the latest workarounds noted on that issue are for earlier versions of excoveralls that still used hackney instead of httpc (cf. parroty/excoveralls#311). So it's not clear that there are any good/known workarounds, as in the old issue. In particular, we should be running the latest castore version, and I don't think installing/updating certifi is going to do anything. The tests seem to pass on the other Elixir versions in the matrix, but they're all running at least OTP 23. So I'm wondering if OTP 23 would unstick Elixir 1.12 & 1.13. Not ideal, but worth a shot.
* Cobertura now handles defprotocol and defimpl definitions (parroty#306) * Cobertura now handles defprotocol and defimpl definitions * Cobertura, catch all if module type is unknown * Bump version and update CHANGELOG * Add Cobertura docs to README.md (parroty#312) * Update Elixir requirement to 1.11+ (parroty#316) * Update Elixir requirement to 1.11+ * Update deps * Replace hackney with httpc (parroty#311) * Replace hackney with httpc * SSL options * FIXUP * Cache fixed * Aaaah, caching again * FIXUP * Add missing apps to :extra_applications * Add better check for :public_key * Bump version and update CHANGELOG * Fix lcov 2.0 source file handling (parroty#315) Prior to 2.0 being released, `genhtml` was much better about handling source files from the following paths: * `test/support/some_helper.ex` * `lib/foo/bar.ex` But after 2.0 was released, when rendering with `genhtml` the paths would be mangled and look like the following: * `test/support/test/support/some_helper.ex` * `lib/foo/lib/foo/bar.ex` I have tried in vain with many permutations of `--prefix` when running `genhtml` but the ultimate fix that made all of this go away was using the absolute path for the source file (`SF`). * Update CHANGELOG * Remove erroneous line in ExCoveralls.poster (parroty#318) * Import `.coverdata` after test run and improve documentation (parroty#309) * Import `.coverdata` after test run and improve docs * Update README table of contents * Update README based on review suggestion Co-authored-by: Alberto Sartori <[email protected]> --------- Co-authored-by: Alberto Sartori <[email protected]> * Update CHANGELOG * Accept custom http options (parroty#319) * Accept custom http options * Add HTTP options docs to README * Bump version and update CHANGELOG * Always floor coverage instead of rounding (parroty#310) * Always floor coverage instead of rounding We do not want to report a 100% coverage when there are lines that are not covered. * Add option to restore previous ceil coverage behaviour * Bump version and update CHANGELOG * Update README examples (parroty#320) * Use explicit steps to remove 1.16 deprecation warning (parroty#322) * Update CHANGELOG and bump version * Detect and warn about incorrectly used ignore-comments (parroty#325) * Detect and warn about incorrectly used ignore-comments Resolves parroty#197. * Keep existing ignoring behavior * Improve formatting * Test more ignore-related warnings * Remove warning in the case of ignore-next-line at the EOF * Test the warning output * Add a changelog entry * Adjust test descriptions --------- Co-authored-by: Roman <[email protected]> * Fix Elixir 1.17 single-quoted string warning (parroty#327) * Bump version and update CHANGELOG * add missing step for Cobertura's range (parroty#329) Without this change, the output is full of warnings such as ``` warning: negative steps are not supported in String.slice/2, pass 44..-1//1 instead ``` * Update CHANGELOG and version * Revert "add missing step for Cobertura's range (parroty#329)" (parroty#330) This reverts commit 00a96c4. * Revert version change * Update Range to use function syntax (parroty#332) * add missing step for Cobertura's range * Update Range to use function syntax * run tests in elixir 1.17 * fix test with relative path --------- Co-authored-by: parroty <[email protected]> * Update CHANGELOG and version --------- Co-authored-by: Rodrigue Villetard <[email protected]> Co-authored-by: parroty <[email protected]> Co-authored-by: Artem Solomatin <[email protected]> Co-authored-by: Andrea Leopardi <[email protected]> Co-authored-by: Matthew Johnston <[email protected]> Co-authored-by: Zach Allaun <[email protected]> Co-authored-by: Alberto Sartori <[email protected]> Co-authored-by: Victor Rodrigues <[email protected]> Co-authored-by: gitneko <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: Hans Krutzer <[email protected]> Co-authored-by: Juan Peri <[email protected]> Co-authored-by: Kenta Nakase <[email protected]>
This is the start of the work proposed in #231.
The main missing thing is Security™, that is, I need to add all the right SSL options to make the
:httpc
request secure. I'll work on that this afternoon if there is interest in this, @parroty?Btw @parroty, also feel free to send me an email (email is on my GitHub profile) or write me a DM on Twitter to chat about helping out with maintaining this library 🙃