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

chore(repo): Clean up workers #3674

Merged
merged 3 commits into from
Sep 6, 2023
Merged

Conversation

dnys1
Copy link
Contributor

@dnys1 dnys1 commented Sep 1, 2023

Force unwrapping nullable values (!) is done in JS by calling nullableValue.toString which will throw an error if nullableValue is null. Browsers seem to handle this sort of error different than a thrown Dart error and the error is harder to trace when it happens.

Introduces an unwrapParameter method to the base worker bee class so that unwrap errors are strongly-typed and provide more context to the issue.

Adds some other cleanup to improve performance, and enables lints in the amplify_secure_storage_test package.

@dnys1 dnys1 requested a review from a team as a code owner September 1, 2023 15:54
@dnys1 dnys1 force-pushed the chore/auth/avoid-worker-null-checks branch from 06d3566 to c11f423 Compare September 1, 2023 15:55
@dnys1 dnys1 marked this pull request as draft September 1, 2023 16:44
@dnys1 dnys1 force-pushed the chore/auth/avoid-worker-null-checks branch 2 times, most recently from 3340bbb to 6a907ff Compare September 1, 2023 17:57
@dnys1 dnys1 marked this pull request as ready for review September 1, 2023 19:25
Equartey
Equartey previously approved these changes Sep 5, 2023
Dillon Nys added 3 commits September 5, 2023 09:46
Force unwrapping nullable values is done in JS by calling `nullableValue.toString` which will throw an error if `nullableValue` is null. Browsers seem to handle this sort of error different than a thrown Dart error and the error is harder to trace when it happens.

Introduces an `unwrapParameter` method to the base worker bee class so that unwrap errors are strongly-typed and provide more context to the issue.
Running heavy computations on the main thread in Web tests causes flaky behavior. Even on high performance computers, the interplay of the Dart runner, DDC, and browser engine causes frequent timeouts when blocking the main thread.

Since these operations are tested elsewhere for Web in places where they are offloaded, skip them for Web.
@dnys1 dnys1 force-pushed the chore/auth/avoid-worker-null-checks branch from 6a907ff to c0dbaa4 Compare September 5, 2023 16:48
@dnys1 dnys1 merged commit 55f4618 into main Sep 6, 2023
143 of 147 checks passed
@dnys1 dnys1 deleted the chore/auth/avoid-worker-null-checks branch September 6, 2023 15:32
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.

3 participants