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

Dialyzer #241

Merged
merged 4 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ jobs:
strategy:
matrix:
otp: [23.x, 24.x, 25.x]
elixir: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x]
elixir: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x]
exclude:
- otp: 25.x
elixir: 1.11.x
- otp: 25.x
elixir: 1.12.x
- otp: 23.x
elixir: 1.15.x
- otp: 23.x
elixir: 1.16.x
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
Expand All @@ -27,7 +29,7 @@ jobs:
- run: mix deps.get
- run: mix compile
- run: mix format --check-formatted
if: matrix.elixir == '1.15.x' # Only check formatting with the latest version
if: matrix.elixir == '1.16.x' # Only check formatting with the latest version
- run: mix dialyzer
if: matrix.elixir == '1.15.x'
if: matrix.elixir == '1.16.x'
- run: mix test
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
elixir 1.15.0
elixir 1.16
8 changes: 6 additions & 2 deletions lib/ex_aws/s3/upload.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ defmodule ExAws.S3.Upload do
"""
@spec stream_file(path :: binary) :: File.Stream.t()
@spec stream_file(path :: binary, opts :: [chunk_size: pos_integer]) :: File.Stream.t()
def stream_file(path, opts \\ []) do
File.stream!(path, [], opts[:chunk_size] || 5 * 1024 * 1024)
if Version.compare(System.version(), "1.16.0") in [:gt, :eq] do
def stream_file(path, opts \\ []),
do: File.stream!(path, opts[:chunk_size] || 5 * 1024 * 1024)
else
def stream_file(path, opts \\ []),
do: File.stream!(path, [], opts[:chunk_size] || 5 * 1024 * 1024)
end

@doc """
Expand Down
Loading