-
Notifications
You must be signed in to change notification settings - Fork 11
Sigv4a followup #32
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
Sigv4a followup #32
Conversation
onno-vos-dev
left a comment
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.
Not leaving comments for all places but the unexported types are present in a couple
| { method :: binary() | ||
| , url :: binary() | ||
| , headers :: headers() | ||
| , headers :: aws_sigv4_internal:headers() |
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.
Type is not exported (unless I'm blind on my phone)
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.
They are in the -export_type block in aws_sigv4_internal.erl.
| [ Header | ||
| , ":" | ||
| , lists:join(",", lists:map(fun aws_sigv4_utils:trimspace/1, lists:reverse(Values))) | ||
| , lists:join(",", lists:map(fun string:trim/1, lists:reverse(Values))) |
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.
string:trim/1 nicely enough does not work on binaries so I think the original needs to remain here unless they're lists and I'm overlooking something.
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.
Docs say it should work, and OTP-25 agrees:
1> string:trim(<<" foo ">>).
<<"foo">>
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 was wrong 👍 Cool then 👍
| binary(), binary(), headers(), binary(), map()) | ||
| -> {ok, headers()} | {error, any()}. | ||
| binary(), binary(), aws_sigv4_internal:headers(), binary(), map()) | ||
| -> {ok, aws_sigv4_internal:headers()} | {error, any()}. |
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.
Unexported type (same as line above)
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 is exported.
|
|
||
| %% sigv4a.SignString | ||
| -spec sign_string(binary()) -> sign_string(). | ||
| -spec sign_string(binary()) -> aws_sigv4_internal:sign_string(). |
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.
Unexported type
|
Makes me realize I really should add a dialyzer step to the pipeline |
|
Nice! 👍🚢 Happy days 👍 |
FWIW I compile this repo with |
Yeah I'll fix it soon 👍 |
|
I'll tag this |
That works! Release train should take care of everything 👍 |
I don't have permission to push tags, and that also prevents me running the GH "make release" thing. Not a huge problem, I'll just point |
@mikpe Try again 👍 |
It worked now, thanks. |
Cleanups requested by Onno in the initial PR. No change in behaviour.