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

Avoid deprecated http_uri functions for OTP 21+ #86

Merged
merged 3 commits into from
Mar 6, 2020
Merged

Avoid deprecated http_uri functions for OTP 21+ #86

merged 3 commits into from
Mar 6, 2020

Conversation

shino
Copy link
Contributor

@shino shino commented Mar 2, 2020

When compiling with OTP 23-rc1, deprecated warnings are emmited for two http_uri functions, parse and decode.

In this PR:

  • for OTP 21+, parse is replaced by uri_string:parse.
  • decode is replaced by module private hex_decode function which is based on http_uri:decode code, because I can not find alternative in uri_string module.

@seriyps
Copy link
Collaborator

seriyps commented Mar 2, 2020

In PR description you said

for OTP 20+

but in fact you are using it in OTP 21+. I think PR description is wrong, not the code (uri_string was introduced in OTP21).

It looks good for me. Let's wait 1-2 days if anyone else have any comments. Otherwise I will merge it 04 Mar.

@shino
Copy link
Contributor Author

shino commented Mar 3, 2020

but in fact you are using it in OTP 21+. I think PR description is wrong

Oops! I will fix the description ;)

Copy link
Member

@andreineculau andreineculau left a comment

Choose a reason for hiding this comment

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

Thanks a bunch @shino !
Left a few improvement comments, but I don't see any blockers.

rebar.config Outdated Show resolved Hide resolved
src/jesse_json_path.erl Show resolved Hide resolved
%% Absolute file:
{error, {no_default_port, file, Ref}} ->
case parse_ref(RefBin) of
{absolute, Ref} ->
Ref;
%% Relative
Copy link
Member

Choose a reason for hiding this comment

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

remove the %% Relative comment. it is now nicely readable in the returned tuple 👏

@shino
Copy link
Contributor Author

shino commented Mar 4, 2020

@andreineculau Thanks a lot for your comments!!

Copy link
Collaborator

@seriyps seriyps left a comment

Choose a reason for hiding this comment

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

Should I merge it @andreineculau ?

@seriyps seriyps merged commit efe0dca into for-GET:master Mar 6, 2020
@seriyps
Copy link
Collaborator

seriyps commented Mar 6, 2020

Thank you @shino

@shino shino deleted the http-uri-depricated branch March 7, 2020 09:24
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