-
Notifications
You must be signed in to change notification settings - Fork 126
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
add more type information to the 'webSocketHandler' method #463
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
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 <jakemac@google.com>
github-actions
bot
added
the
type-infra
A repository infrastructure change or enhancement
label
Dec 3, 2024
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
ping @brianquinlan (not sure if you saw this as it landed while you were OOO) |
brianquinlan
approved these changes
Dec 6, 2024
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-lang/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-lang/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-lang/markdown#634) 9fd4375 2024-12-11 Moritz Update README.md before archiving (dart-lang/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-lang/package_config#162) pool (https://github.com/dart-lang/pool/compare/f85209d..bf27900): bf27900 2024-12-11 Moritz Update README.md before archiving (dart-lang/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-lang/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-lang/source_maps#99) source_span (https://github.com/dart-lang/source_span/compare/22a243e..e6a3459): e6a3459 2024-12-11 Moritz Update README.md (dart-lang/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-lang/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-lang/stream_channel#114) string_scanner (https://github.com/dart-lang/string_scanner/compare/77de235..6921269): 6921269 2024-12-17 Moritz Update README.md (dart-lang/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-lang/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-lang/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-lang/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-lang/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-lang/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-lang/yaml#175) Change-Id: Ic08b0a166b72113e99624db47a82c55134c17620 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402720 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
9 tasks
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Function
webSocketHandler
onConnection callback #457-rev to
3.0.0
We'll need to update several packages (test, dds, ...) before this can land and be published. We can do that thuswise:
webSocketHandler
calls to pass in a closure taking two params (see the changelog for an example)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)test
,dds
, ...Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.