Change Intent
Mark interface classes as interface, for consistency with other similar classes.
The StreamConsumer, StreamIterator, StreamTransformer and MultiStreamController classes from dart:async are abstract classes with only abstract members.
As such, for consistency and showing intent, they should have been made abstract interface declarations like other similar classes.
Justification
The classes were missed in the initial marking with modifiers, for some reason. (Likely oversight, they're all far down in a very long file. Mea culpa.)
It would be consistent with other similar classes to mark them as interface, and it would express the intent of the class.
It's not a necessary change. We can keep them as-is, but it's inconsistent, and will only become harder to fix if we wait.
Impact
Low impact. Two known occurrences of extends StreamConsumer in packages (one of them is our own package, which we can quickly change), and we can propose a patch before they have a chance to release a 3.0 compatible version of the package.
Because the changed library is a platform library, the change will not affect pre-3.0 libraries at all!
If released in Dart 3.0.1, we can should keep the window for someone adding a new extends OneOfTheseInterfaces dependency and releasing it with a 3.0.0 language version, very small.
Mitigation
It's not breaking to code existing before today, but it may (hypothetically) break code released between today (3.0 launch) and when the change is released (hopefully 3.0.1).
There are two known non-SDK uses which extends these classes (based on searching internal use), in packages http_server and streams.
- The
http_server package is discontinued and archived, so it will never have a 3.0 language release.
- The
streams package (flutter_stream_extensions) usage is only in a test, so even if they release a 3.0 version, it won't break users, and the developers can take a patch to fix it at any time. It seem to be developed inside Google, so maybe I can fix it directly.
Change Intent
Mark interface classes as
interface, for consistency with other similar classes.The
StreamConsumer,StreamIterator,StreamTransformerandMultiStreamControllerclasses fromdart:asyncareabstractclasses with only abstract members.As such, for consistency and showing intent, they should have been made
abstract interfacedeclarations like other similar classes.Justification
The classes were missed in the initial marking with modifiers, for some reason. (Likely oversight, they're all far down in a very long file. Mea culpa.)
It would be consistent with other similar classes to mark them as
interface, and it would express the intent of the class.It's not a necessary change. We can keep them as-is, but it's inconsistent, and will only become harder to fix if we wait.
Impact
Low impact. Two known occurrences of
extends StreamConsumerin packages (one of them is our own package, which we can quickly change), and we can propose a patch before they have a chance to release a 3.0 compatible version of the package.Because the changed library is a platform library, the change will not affect pre-3.0 libraries at all!
If released in Dart 3.0.1, we can should keep the window for someone adding a new
extends OneOfTheseInterfacesdependency and releasing it with a 3.0.0 language version, very small.Mitigation
It's not breaking to code existing before today, but it may (hypothetically) break code released between today (3.0 launch) and when the change is released (hopefully 3.0.1).
There are two known non-SDK uses which extends these classes (based on searching internal use), in packages
http_serverandstreams.http_serverpackage is discontinued and archived, so it will never have a 3.0 language release.streamspackage (flutter_stream_extensions) usage is only in a test, so even if they release a 3.0 version, it won't break users, and the developers can take a patch to fix it at any time. It seem to be developed inside Google, so maybe I can fix it directly.