Skip to content

Conversation

@mikpe
Copy link
Collaborator

@mikpe mikpe commented Mar 10, 2025

The returned headers are custom and do not match the headers() type.

Fixes the following warning when running rebar3 dialyzer on this repo:

===> Analyzing 2 files with _build/default/rebar3_27.3_plt...

src/aws_signature.erl
Line 132 Column 2: Invalid type specification for function aws_signature:sign_v4_event/7. The success typing is (bina\
ry(),binary(),binary(),{{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),by\
te()}},binary(),binary(),binary()) -> {[{<<_:40,_:_*88>>,binary() | {_,_},'byte_array' | 'timestamp'},...],binary()} \
but the spec is (SecretAccessKey,Region,Service,DateTime,PriorSignature,HeaderString,Body) -> {Headers,Signature} whe\
n SecretAccessKey :: binary(), Region :: binary(), Service :: binary(), DateTime :: calendar:datetime(), PriorSignatu\
re :: binary(), HeaderString :: binary(), Body :: binary(), Headers :: headers(), Signature :: binary()
===> Warnings written to _build/default/27.3.dialyzer_warnings
===> Warnings occurred running dialyzer: 1

The returned headers are custom and do not match the headers() type.
@onno-vos-dev onno-vos-dev merged commit 814b1b0 into aws-beam:main Mar 10, 2025
4 checks passed
@onno-vos-dev
Copy link
Member

Thank you! 🙇 Let me know if you want a release but I know you have another PR coming soon so I'll wait unless you want one 👍

@mikpe mikpe deleted the fix-sign_v4_event-spec branch March 10, 2025 16:14
@mikpe
Copy link
Collaborator Author

mikpe commented Mar 10, 2025

Thanks, but I don't need a release or a tag at this time.

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