Closed brianquinlan closed 2 months ago
This should actually fix the issue I outlined in https://github.com/dart-lang/web_socket_channel/issues/237#issuecomment-1971592315. Looking forward to seeing this land.
Should there be a corresponding task for build_runner
to get updated? It still explicitly relies on 2.x.
@NotTsunami Is build_runner
part of a dependency cycle with web_socket_channel
? My intent was not to update every package that relies on web_socket_channel
, just the ones that make web_socket_channel
3.0 unusable without the update.
I think build_runner
is a 1p package, as well as web_socket_channel
, so it should be dealt with breaking changes in web_socket_channel
by updating build_runner
to use the new version of web_socket_channel
.
It seems that build_runner
and build_daemon
use web_socket_channel
, but they aren't affected by the breaking change in web_socket_channel
3.0.0 in the library code.
However, build_runner
's test code is affected by the breaking change of web_socket_channel
3.0.0. This code uses the removed constructor of WebSocketChannel in web_socket_channel 3.0.0.
Other than this, the following patch seems to be enough to fix the dependency issue in https://github.com/dart-lang/build.
--- a/build_daemon/pubspec.yaml
+++ b/build_daemon/pubspec.yaml
@@ -15,10 +15,10 @@ dependencies:
path: ^1.8.0
pool: ^1.5.0
shelf: ^1.0.0
- shelf_web_socket: ^1.0.0
+ shelf_web_socket: ">=1.0.0 <3.0.0"
stream_transform: ^2.0.0
watcher: ^1.0.0
- web_socket_channel: ^2.0.0
+ web_socket_channel: ">=2.0.0 <4.0.0"
dev_dependencies:
analyzer: '>=3.4.0 <7.0.0'
--- a/build_runner/pubspec.yaml
+++ b/build_runner/pubspec.yaml
@@ -39,12 +39,12 @@ dependencies:
pub_semver: ^2.0.0
pubspec_parse: ^1.0.0
shelf: ^1.0.0
- shelf_web_socket: ^1.0.0
+ shelf_web_socket: ">=1.0.0 <3.0.0"
stack_trace: ^1.10.0
stream_transform: ^2.0.0
timing: ^1.0.0
watcher: ^1.0.0
- web_socket_channel: ^2.0.0
+ web_socket_channel: ">=2.0.0 <4.0.0"
yaml: ^3.0.0
dev_dependencies:
@bc-lee Is this blocking you somehow? Could you file an issue with package:builder
and CC me?
There are two components:
web_socket_channel
in terms ofpackage:web_socket
WebSocketChannel
constructor (the only known usage is inpackage:shelf_web_socket
).Steps:
package:shelf_web_socket
to not rely on theWebSocketChannel
constructor PRpackage:web_socket_channel
:package:web_socket
PRWebSocketChannel
constructor and make that class aninterface
package:web_socket_channel
3.x (branch: v3_release) PRpackage:shelf_web_socket
to acceptpackage:web_socket_channel
3.x (branch: v2_release) PRpackage:shelf_web_socket
2.xpackage:test
to acceptpackage:web_socket_channel
3.x andpackage:shelf_web_socket
2.x (branch: web_socket_version_constraints) PRpackage:test