-
Notifications
You must be signed in to change notification settings - Fork 519
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
Introduce rebar_uri to avoid deprecation warnings on OTP 23 [master] #2195
Introduce rebar_uri to avoid deprecation warnings on OTP 23 [master] #2195
Conversation
@@ -322,6 +322,7 @@ is_list_of_strings(_Config) -> | |||
?assert(rebar_utils:is_list_of_strings("foo") == false). | |||
|
|||
url_append_path(_Config) -> | |||
?assertEqual({ok, "https://repo.hex.pm:443/repos/org"}, rebar_utils:url_append_path("https://repo.hex.pm", "/repos/org")), | |||
?assertEqual({ok, "https://repo.hex.pm:443/repos/org?foo=bar"}, rebar_utils:url_append_path("https://repo.hex.pm", |
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.
I think this test case is wrong. /repos/org?key=value
is not a path segment. The new module will correctly encode the question mark but previous string concatenation one would leave it unencoded. So the test was updated to use a more sensible path "extension".
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.
Agreed. Hopefully we just didn't have a thing that relied on that behaviour in a critical way.
ba1e5cf
to
7057cbe
Compare
@@ -322,6 +322,7 @@ is_list_of_strings(_Config) -> | |||
?assert(rebar_utils:is_list_of_strings("foo") == false). | |||
|
|||
url_append_path(_Config) -> | |||
?assertEqual({ok, "https://repo.hex.pm:443/repos/org"}, rebar_utils:url_append_path("https://repo.hex.pm", "/repos/org")), | |||
?assertEqual({ok, "https://repo.hex.pm:443/repos/org?foo=bar"}, rebar_utils:url_append_path("https://repo.hex.pm", |
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.
Agreed. Hopefully we just didn't have a thing that relied on that behaviour in a critical way.
I have submitted hexpm/hex_core#82. |
4415ca2
to
fa577bc
Compare
I moved |
I think it would make sense to have the hex_core PR come in first. However if we want to move this one forwards, I'd say that we would have to just exclude the change to vendored files; this does not get rid of all warnings, but moves the overall state forwards by removing most warnings. |
Removing only some warnings won't make Rebar build on OTP 23 with "warnings as errors" on. |
It won't, but it's not worse than the current state of this PR while we wait for the other one to move forwards. It just reduces the risk of clashing changes being done in the meanwhile. |
@ferd hexpm/hex_core#82 is in, besides looking for any potential differences in the vendored file, is there anything I should do to update this PR? |
I don't think so. I believe @starbelly was working on integrating the hex-core stuff. They changed how they validate packages, which turns to have an impact on the lockfiles, which requires more complex changes on that end as well. |
So this can go in now then? Or should I just wait? :) |
This should be closed in favor of #2213 |
This involves changes beyond #2213. |
I will revert the |
yeah only need to drop the vendored file changes, then I'll merge this, and #2213 will complete the objective for this PR. Next release will build warning-free regardless. |
Yup, my bad. |
08eb611
to
2f4521e
Compare
@ferd should be ready to go. I ended up undoing |
See #2191 for the background.
The new module attempts to act as a shim between
http_uri
(deprecated in OTP 23) anduri_string
(available as of OTP 21+) with as little wheel reinvention as possible.