Skip to content
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

Merged
merged 8 commits into from
Aug 9, 2023
Merged

Replace hackney with httpc #311

merged 8 commits into from
Aug 9, 2023

Conversation

whatyouhide
Copy link
Contributor

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 🙃

@parroty
Copy link
Owner

parroty commented Jun 20, 2023

Thanks. It's a little hectic week for me, but try to send message on the weekend / next week.

@whatyouhide
Copy link
Contributor Author

@parroty hello! Any news on this? 🙃

@whatyouhide
Copy link
Contributor Author

@parroty ping 🙃 Would love to get an email and chat! 😉

@whatyouhide
Copy link
Contributor Author

@parroty ping 🏓 🙃

@whatyouhide
Copy link
Contributor Author

@parroty I added SSL support here too, based on esbuild.

@parroty
Copy link
Owner

parroty commented Jul 27, 2023

Sorry being slow to respond. I am seeing actions errors, but haven't been able look into it. Do you have any idea?

@whatyouhide
Copy link
Contributor Author

@parroty let's start out with #316 😄

@whatyouhide
Copy link
Contributor Author

@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')) }}
Copy link
Contributor Author

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.

@whatyouhide
Copy link
Contributor Author

@parroty any news on this? 🙃

@whatyouhide
Copy link
Contributor Author

Tested this out in Xandra, works good 🙃

@parroty parroty merged commit e41649c into parroty:master Aug 9, 2023
2 checks passed
@whatyouhide whatyouhide deleted the httpc branch August 9, 2023 05:53
@whatyouhide
Copy link
Contributor Author

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)
Copy link
Contributor

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 🤔

Copy link
Contributor Author

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 😉

Copy link
Owner

@parroty parroty Aug 9, 2023

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parroty httpc is not an app. Just merge #318 before releasing 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants