dart-lang / build

A build system for Dart written in Dart
https://pub.dev/packages/build
BSD 3-Clause "New" or "Revised" License
791 stars 211 forks source link

`build_runner` and `build_daemon` should be updated to use `web_socket_channel` 3.0.0. #3678

Closed bc-lee closed 3 months ago

bc-lee commented 6 months ago

Recently, web_socket_channel has released a new version 3.0.0, which has breaking changes. There are several breaking changes in the new version, but I believe other than test code in build_runner, build_runner and build_daemon are not affected by the breaking changes.

Relevant issue in web_socket_channel: https://github.com/dart-lang/web_socket_channel/issues/340

Steps to Reproduce

  1. Create a project with build_runner: ^2.4.9 and web_socket_channel: ^2.4.4. It should work fine.
  2. Upgrade web_socket_channel to ^3.0.0.

Actual results

Command failed: flutter pub upgrade web_socket_channel
Because build_runner 2.4.9 depends on web_socket_channel ^2.0.0 and no versions of build_runner match >2.4.9 <3.0.0, build_runner ^2.4.9 requires web_socket_channel ^2.0.0.
So, because apprtc_ng depends on both web_socket_channel ^3.0.0 and build_runner ^2.4.9, version solving failed.

Environment

Flutter 3.19.6 with Dart 3.3.4 and MacOS 14.4.1, though host OS should not matter.

bc-lee commented 6 months ago

cc. @brianquinlan

jakemac53 commented 6 months ago

I tried to do this but it isn't clear how to migrate our tests so I am blocked on https://github.com/dart-lang/web_socket_channel/issues/358 for now.

brianquinlan commented 3 months ago

This should have been fixed as of the 4.0.2 release of package:build_daemon: https://github.com/dart-lang/build/blob/master/build_daemon/pubspec.yaml#L22

and the 2.4.10 release of package:build_runner: https://github.com/dart-lang/build/blob/master/build_runner/pubspec.yaml#L48

Can we close the issue now?