Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Use Durations instead of ints for timeouts #12

Merged
merged 4 commits into from
Nov 4, 2022
Merged

Use Durations instead of ints for timeouts #12

merged 4 commits into from
Nov 4, 2022

Conversation

ueman
Copy link
Contributor

@ueman ueman commented Nov 3, 2022

Originally added in cfug/dio#1376

This changes the use of ints to Durations. This makes it more ergonomic to use timeouts, since the units are now enforced statically.

This is in preparation for landing cfug/dio#1405, since it depends on a couple of changes which were previously landed in the v5 branch of the original dio repository.

This is a breaking change

ueman added 2 commits November 3, 2022 20:21
# Conflicts:
#	dio/lib/src/adapters/browser_adapter.dart
#	dio/lib/src/adapters/io_adapter.dart
#	dio/lib/src/options.dart
#	dio/test/readtimeout_test.dart

migrate http2 adapter

# Conflicts:
#	plugins/http2_adapter/example/example.dart

use stopwatches

# Conflicts:
#	dio/lib/src/adapters/io_adapter.dart

fix durations

PR Feedback

Update docs
@ueman ueman changed the title Use Durations instead of ints. Use Durations instead of ints for timeouts Nov 3, 2022
Copy link
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

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

RSLGTM on changes. Did the previous 5.0 branch include a migration guide? If not, we should have one here. Also, the changelog and the pubspec should be updated to 5.0.0-dev.1.

@ueman
Copy link
Contributor Author

ueman commented Nov 4, 2022

RSLGTM on changes. Did the previous 5.0 branch include a migration guide? If not, we should have one here. Also, the changelog and the pubspec should be updated to 5.0.0-dev.1.

No, it didn't but I'll add it

@talisk
Copy link
Member

talisk commented Nov 4, 2022

@AlexV525 Speak some questions. Maybe we should translate existed comments in English?

@AlexV525
Copy link
Member

AlexV525 commented Nov 4, 2022

@AlexV525 Speak some questions. Maybe we should translate existed comments in English?

Yeah sure. We can to fix them all in one another PR.

Copy link
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

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

I'll make some changes later.

LGTM

@ueman ueman merged commit dda8e61 into main Nov 4, 2022
@ueman ueman deleted the use-durations branch November 4, 2022 09:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants