Skip to content

Conversation

devoncarew
Copy link
Member

We'll need to update several packages (test, dds, ...) before this can land and be published. We can do that thuswise:

  • update the webSocketHandler calls to pass in a closure taking two params (see the changelog for an example)
  • widen their dep. range to take both shelf_web_socket v2 and v3 (the change above will retain compatibility w/ v2, and will make it future proof for the anticipated v3 version)
  • publish test, dds, ...
  • land and publish this

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

devoncarew added a commit to dart-lang/test that referenced this pull request Dec 3, 2024
…od (#2421)

- add a 2nd argument to the closure passed into
package:shelf_web_socket's `webSocketHandler` method
- widen the dep on package:shelf_web_socket

This will allow us to add more type info to the closure that
`webSocketHandler` expects; it's currently an untyped Function. See also
dart-lang/shelf#457 and
dart-lang/shelf#463.

This forward declares compatibility with `3.0` of
`package:shelf_web_socket`; I _think_ this is necessary - as `dart test`
uses both package:test and package:shelf_web_socket - but happy to hear
otherwise.

---

- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.

<details>
  <summary>Contribution guidelines:</summary><br>

- See our [contributor
guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Contributions to our repos should follow the [Dart style
guide](https://dart.dev/guides/language/effective-dart) and use `dart
format`.
- Most changes should add an entry to the changelog and may need to [rev
the pubspec package
version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change).
- Changes to packages require [corresponding
tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing).

Note that many Dart repos have a weekly cadence for reviewing PRs -
please allow for some latency before initial review feedback.
</details>

---------

Co-authored-by: Jacob MacDonald <[email protected]>
@github-actions github-actions bot added the type-infra A repository infrastructure change or enhancement label Dec 3, 2024
@devoncarew devoncarew changed the title [shelf_web_socket] add more type information to the 'webSocketHandler' method add more type information to the 'webSocketHandler' method Dec 3, 2024
@devoncarew
Copy link
Member Author

ping @brianquinlan (not sure if you saw this as it landed while you were OOO)

@devoncarew devoncarew merged commit e3975a8 into master Dec 9, 2024
25 checks passed
@devoncarew devoncarew deleted the more_types_shelf_web_socket branch December 9, 2024 18:06
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jan 2, 2025
… package_config, pool, pub_semver, shelf, source_maps, source_span, sse, stack_trace, stream_channel, string_scanner, term_glyph, test_descriptor, test_reflective_loader, watcher, web, web_socket_channel, webdev, yaml

Revisions updated by `dart tools/rev_sdk_deps.dart`.

ecosystem (https://github.com/dart-lang/ecosystem/compare/b4b2a43..efe4ee4):
  efe4ee4  2025-01-02  Devon Carew  Update README.md (dart-lang/ecosystem#331)
  d42c4d2  2024-12-19  Devon Carew  [dart_flutter_team_lints] add strict_top_level_inference (dart-lang/ecosystem#328)
  38897ae  2024-12-17  Devon Carew  add a codeowners file (dart-lang/ecosystem#330)
  c995170  2024-12-17  Moritz  Add more fine grained ignore capabilities to health workflow (dart-lang/ecosystem#329)
  5ca7c41  2024-12-17  Moritz  Minor fixes to trebuchet (dart-lang/ecosystem#327)
  d2dd4ce  2024-12-16  Moritz  Don't check licenses of generated files (dart-lang/ecosystem#326)
  3339020  2024-12-11  Moritz  Health fixes (dart-lang/ecosystem#325)
  b25118a  2024-12-10  Moritz  Rename ecosystem testing package to `canary` (dart-lang/ecosystem#323)

glob (https://github.com/dart-lang/glob/compare/994191a..eee18d1):
  eee18d1  2024-12-16  Kevin Moore  Fix doc comment in test (dart-archive/glob#101)

http (https://github.com/dart-lang/http/compare/c27d6c7..dada989):
  dada989  2024-12-19  Brian Quinlan  Fix a potential exponential backtracking issue when parsing quoted headers (dart-lang/http#1434)
  3ce9451  2024-12-18  Kevin Moore  http_multi_server: bump lints dep (dart-lang/http#1435)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/f6a7488..2b84a45):
  2b84a45  2024-12-17  Moritz  Update README.md before archiving (dart-archive/http_multi_server#76)

lints (https://github.com/dart-lang/lints/compare/e1d4794..df1f635):
  df1f635  2024-12-11  Devon Carew  update the sdk lower bound to the current stable (dart-archive/lints#220)

markdown (https://github.com/dart-lang/markdown/compare/4d5dbc6..19aaded):
  19aaded  2025-01-01  dependabot[bot]  Bump subosito/flutter-action in the github-actions group (dart-archive/markdown#634)
  9fd4375  2024-12-11  Moritz  Update README.md before archiving (dart-archive/markdown#633)

package_config (https://github.com/dart-lang/package_config/compare/76f2f6c..07097d7):
  07097d7  2024-12-11  Moritz  Update README.md before archiving (dart-archive/package_config#162)

pool (https://github.com/dart-lang/pool/compare/f85209d..bf27900):
  bf27900  2024-12-11  Moritz  Update README.md before archiving (dart-archive/pool#94)

pub_semver (https://github.com/dart-lang/pub_semver/compare/8e9fcb9..960f913):
  960f913  2024-12-11  Moritz  Update README.md before archiving (dart-archive/pub_semver#111)

shelf (https://github.com/dart-lang/shelf/compare/2b5b683..8ea524b):
  8ea524b  2025-01-01  dependabot[bot]  Bump actions/cache from 4.1.2 to 4.2.0 in the github-actions group (dart-lang/shelf#465)
  6b8b338  2024-12-17  Kevin Moore  shelf_router_generator: bump dependencies (dart-lang/shelf#464)
  e3975a8  2024-12-09  Devon Carew  add more type information to the 'webSocketHandler' method (dart-lang/shelf#463)

source_maps (https://github.com/dart-lang/source_maps/compare/198d32b..e5e9d34):
  e5e9d34  2024-12-11  Moritz  Update README.md before archiving (dart-archive/source_maps#99)

source_span (https://github.com/dart-lang/source_span/compare/22a243e..e6a3459):
  e6a3459  2024-12-11  Moritz  Update README.md (dart-archive/source_span#121)

sse (https://github.com/dart-lang/sse/compare/b97dc3a..b573a1e):
  b573a1e  2024-12-11  Moritz  Update README.md before archiving (dart-archive/sse#121)

stack_trace (https://github.com/dart-lang/stack_trace/compare/b660cfa..5fe4cfe):
  5fe4cfe  2024-12-20  Moritz  Update README.md before archiving (dart-archive/stack_trace#169)

stream_channel (https://github.com/dart-lang/stream_channel/compare/71fe6dd..31a3aba):
  31a3aba  2024-12-20  Moritz  Update README.md before archiving (dart-archive/stream_channel#114)

string_scanner (https://github.com/dart-lang/string_scanner/compare/77de235..6921269):
  6921269  2024-12-17  Moritz  Update README.md (dart-archive/string_scanner#86)

term_glyph (https://github.com/dart-lang/term_glyph/compare/9ed8ed9..52677db):
  52677db  2024-12-17  Moritz  Update README.md before archiving (dart-archive/term_glyph#60)

test_descriptor (https://github.com/dart-lang/test_descriptor/compare/408526a..92fa0c5):
  92fa0c5  2024-12-20  Moritz  Update README.md before archiving (dart-archive/test_descriptor#75)

test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/faade62..9e35c9e):
  9e35c9e  2024-12-12  Moritz  Update README.md before archiving (dart-archive/test_reflective_loader#68)

watcher (https://github.com/dart-lang/watcher/compare/bc44e6f..7f3b3a3):
  7f3b3a3  2024-12-17  Moritz  Update README.md before archiving (dart-archive/watcher#174)

web (https://github.com/dart-lang/web/compare/bdf112e..af5de5e):
  af5de5e  2025-01-01  dependabot[bot]  Bump actions/cache from 4.1.2 to 4.2.0 in the github-actions group (dart-lang/web#332)
  b55f343  2024-12-17  Kevin Moore  generator: Support the latest package dependencies (dart-lang/web#328)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/7a2039f..a937243):
  a937243  2024-12-12  Moritz  Update README.md before archiving (dart-archive/web_socket_channel#389)

webdev (https://github.com/dart-lang/webdev/compare/ab620d1..e72f365):
  e72f365a  2024-12-23  Srujan Gaddam  Expose FrontendServerDdcLibraryBundleStrategyProvider, make vm_service_interface a min constraint, and publish 24.3.0 (dart-lang/webdev#2547)
  ca963a06  2024-12-23  Srujan Gaddam  Handle unnecessary_non_null_assertion and invalid_null_aware_operator (dart-lang/webdev#2554)
  36848977  2024-12-20  Nate Biggs  [dwds] Add unbatching retry mechanism for failing batched expression evals (dart-lang/webdev#2552)
  edcfbf12  2024-12-18  Jessy Yameogo  Added support for some debugging APIs with the DDC library bundle format - part 4 (dart-lang/webdev#2545)
  64655416  2024-12-17  Jessy Yameogo  Added support for some debugging APIs with the DDC library bundle format (dart-lang/webdev#2541)
  b685bb52  2024-12-16  Ben Konyi  [ webdev ] Set version to 3.7.1-wip (dart-lang/webdev#2543)
  4d0ef258  2024-12-13  Nate Biggs  Update pattern test to account for new DDC JS variable naming (dart-lang/webdev#2542)

yaml (https://github.com/dart-lang/yaml/compare/2a37272..0406507):
  0406507  2024-12-20  Moritz  Update README.md before archiving (dart-archive/yaml#175)

Change-Id: Ic08b0a166b72113e99624db47a82c55134c17620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402720
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 6, 2025
)

- update the engine and flutter_tools to be forward compatible with the
upcoming shelf_web_socket v3.0

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

- dart-lang/shelf#457
- dart-lang/shelf#463

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:shelf_test_handler package:shelf_web_socket type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants