Skip to content

Conversation

@mikpe
Copy link
Collaborator

@mikpe mikpe commented Mar 14, 2025

Cleanups requested by Onno in the initial PR. No change in behaviour.

@onno-vos-dev onno-vos-dev self-requested a review March 14, 2025 12:22
Copy link
Member

@onno-vos-dev onno-vos-dev left a 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()
Copy link
Member

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)

Copy link
Collaborator Author

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

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.

Copy link
Collaborator Author

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">>

Copy link
Member

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()}.
Copy link
Member

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)

Copy link
Collaborator Author

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().
Copy link
Member

Choose a reason for hiding this comment

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

Unexported type

@onno-vos-dev
Copy link
Member

Makes me realize I really should add a dialyzer step to the pipeline

@onno-vos-dev
Copy link
Member

onno-vos-dev commented Mar 14, 2025

Nice! 👍🚢 Happy days 👍

@mikpe
Copy link
Collaborator Author

mikpe commented Mar 14, 2025

Makes me realize I really should add a dialyzer step to the pipeline

FWIW I compile this repo with rebar3 do compile, eunit, dialyzer

@onno-vos-dev
Copy link
Member

Makes me realize I really should add a dialyzer step to the pipeline

FWIW I compile this repo with rebar3 do compile, eunit, dialyzer

Yeah I'll fix it soon 👍

@mikpe mikpe merged commit f038ed7 into aws-beam:main Mar 14, 2025
4 checks passed
@mikpe mikpe deleted the sigv4a-followup branch March 14, 2025 12:38
@mikpe
Copy link
Collaborator Author

mikpe commented Mar 14, 2025

I'll tag this v0.4.0 if that's Ok.

@onno-vos-dev
Copy link
Member

I'll tag this v0.4.0 if that's Ok.

That works! Release train should take care of everything 👍

@mikpe
Copy link
Collaborator Author

mikpe commented Mar 14, 2025

I'll tag this v0.4.0 if that's Ok.

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 rebar.config to a ref instead of a tag for now.

@onno-vos-dev
Copy link
Member

I'll tag this v0.4.0 if that's Ok.

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 rebar.config to a ref instead of a tag for now.

@mikpe Try again 👍

@mikpe
Copy link
Collaborator Author

mikpe commented Mar 14, 2025

@mikpe Try again 👍

It worked now, thanks.

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.

2 participants