Skip to content
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

2.4.1 seems to have introduced breaking changes #307

Closed
KammererTob opened this issue Dec 20, 2023 · 5 comments
Closed

2.4.1 seems to have introduced breaking changes #307

KammererTob opened this issue Dec 20, 2023 · 5 comments

Comments

@KammererTob
Copy link

KammererTob commented Dec 20, 2023

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

@devoncarew
Copy link
Member

Do you mind posting the analysis issue you see?

@KammererTob
Copy link
Author

I have fixed the dependency in the current version, so the analysis issue is no longer visible on the page. But here is a screenshot:
image

@devoncarew
Copy link
Member

Thanks for the report! It looks like the port to package:web was unintentionally a breaking API change. This should have been done in a new major version of this package (3.0.0). We'll need to do some cleanup here, which may involve reverting the 2.x version of this package to continue to use dart:html, and re-publishing the package:web based version as 3.0.0.

@devoncarew
Copy link
Member

I'm going to close this as the issue has mostly been addressed. If people find new breaking changes please re-open or create a new issue.

@KammererTob
Copy link
Author

Thanks for addressing this so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants