dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
790 stars 146 forks source link

Analysis issue with package using WebSocket #7327

Closed KammererTob closed 11 months ago

KammererTob commented 11 months ago

I noticed that my released package suddenly has a "Analysis issue". I have not pushed any new code or updates so i am not sure where this is coming from.

Link to my package: https://pub.dev/packages/stomp_dart_client

This is the error it displays: image

Executing the reproduction mentioned here does not lead to any issues (using lints: ^3.0.0):

$ dart analyze lib/src/_connect_html.dart
Analyzing _connect_html.dart...
No issues found!

Is this an issue on my end? If so, what are my options to resolve this? Thanks!

isoos commented 11 months ago

The dependency web_socket_channel had a recent new release: https://pub.dev/packages/web_socket_channel/versions Maybe it has a breaking change there?

KammererTob commented 11 months ago

Yes. That seems to be the issue. But why does a version upgrade in another package affect my released package? My last release was 3 months ago. That breaking change in web_socket_channel should probably have been a new major version?

isoos commented 11 months ago

That breaking change in web_socket_channel should probably have been a new major version?

Yes it should have. Maybe contact them about it, it always help to get to know other developers we depend on, and maybe they do not know the use case that they were breaking.

But why does a version upgrade in another package affect my released package?

We do re-analyze packages periodically and also when their dependencies are updated, because the analysis should always reflect the latest stable versions. After all, users of your package do use the combination of your package and its dependencies.