Skip to content

2.4.1 seems to have introduced breaking changes #1656

@KammererTob

Description

@KammererTob

I've noticed that my package which depends on web_socket_channel suddenly has a "Analysis Issue" in pub.dev (https://pub.dev/packages/stomp_dart_client/score). This seems to be because of a breaking change introduced in 2.4.1. The change in question seems to be a move to the web package for the HTML WebSocket implementation.
Here is part of my code which is breaking because of that:

  final completer = Completer<HtmlWebSocketChannel>();
  final webSocket = WebSocket(config.connectUrl)
    ..binaryType = BinaryType.list.value;
  webSocket.onOpen.first.then((value) {
    completer.complete(HtmlWebSocketChannel(webSocket));
  });

Previously HtmlWebSocketChannel was expecting a WebSocket from the dart:html library. After 2.4.1 it seems to be expecting it from the package:web package.

Was this intentional? I am a bit hesitant to also move my project to the web package since it currently is still flagged as "highly experimental" (https://github.com/dart-lang/web)

Related closed issue in the pub.dev repo: dart-lang/pub-dev#7327

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions