Skip to content

Refactor matchState initialization to use literal - #349

Merged
biggs0125 merged 4 commits into
masterfrom
biggs0125-patch-1
Sep 11, 2026
Merged

biggs0125 merged 4 commits into
masterfrom
biggs0125-patch-1

Conversation

@biggs0125

Copy link
Copy Markdown
Collaborator

The updated type of matchState can lead to some type errors with existing tests.

The updated type of `matchState` can lead to some type errors with existing tests.
@biggs0125
biggs0125 requested a review from kevmoo September 11, 2026 04:34
Fixes a regression in async matchers that could lead to type errors in tests.
@github-actions

Copy link
Copy Markdown

Package publishing

If you have publishing permissions, you can use the links below to publish the changes after merging this PR.

Package Version Status Publish tag (post-merge)
package:webdriver ⭐ 3.2.1 ready to publish v3.2.1

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@kevmoo kevmoo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Weird, but okay. 😄 I trust you...

@biggs0125

Copy link
Copy Markdown
Collaborator Author

Weird, but okay. 😄 I trust you...

For context, package:matcher (or at least the version we have internally) doesn't like you to provide anything but a Map<dynamic, dynamic> as the matcherState for calls to .match. The trace wasn't precise but I'm pretty sure at some point it tries to matcherState.addAll(x) where x has type Map<dynamic, dynamic>. And addAll causes an implicit type check that x is a subtype of matcherState.

Maybe package:matcher also needs a fix but that's an issue for another day :)

@biggs0125
biggs0125 merged commit 8e5c611 into master Sep 11, 2026
19 checks passed
@biggs0125
biggs0125 deleted the biggs0125-patch-1 branch September 11, 2026 05:32
copybara-service Bot pushed a commit to dart-lang/sdk that referenced this pull request Sep 11, 2026
Revisions updated by `dart tools/rev_sdk_deps.dart`.

core (https://github.com/dart-lang/core/compare/7e8caaf..51cf766):
  51cf7664  Thu Sep 10 17:49:25 2026 -0700  Kevin Moore  test(crypto): add C2SP/Wycheproof test vectors for HMAC (dart-lang/core#993)

native (https://github.com/dart-lang/native/compare/84d7eda..f2b4942):
  f2b4942cc  Fri Sep 11 07:59:55 2026 +0530  Sivapriya  [jnigen] Relax binding verification test (dart-lang/native#3627)

protobuf (https://github.com/dart-lang/protobuf/compare/cde8e28..a73edc9):
  a73edc9  Fri Sep 11 12:54:45 2026 +0100  Martin Kustermann  Remove legacy interop use (conditional import on dart.library.html) (google/protobuf.dart#1102)

webdriver (https://github.com/google/webdriver.dart/compare/9b2e87d..8e5c611):
  8e5c611  Fri Sep 11 01:32:05 2026 -0400  Nate Biggs  Refactor matchState initialization to use untyped literal (google/webdriver.dart#349)

TAG=agy
CONV=688fe3c8-47b5-4273-96f1-b13470d355b6
[email protected]

Change-Id: I3c2cb3870ccc229206da7d27a3b8ece7a1492842
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/548981
Reviewed-by: Brian Quinlan <[email protected]>
Commit-Queue: Nate Bosch <[email protected]>
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