Update code to Dart 3.0
Add required mixins. Add some appropriate finals.
Should this be a major version increment?
The final modifiers are breaking. (But so is the lack of mixin modifiers on some classes.)
Should this be a major version increment?
For most packages, yes.
For this package, which is pinned by flutter, it may be easier to cheat and ship without a major version change.
I don't think we're time-bound on this release. The internal need to make the code 3.0 compatible has been fixed, so staying as 2.18.0 is fine for now. We want to release a 3.0 version eventually, where we add modifiers (and the sooner we do so, the sooner people can see which modifiers they need to comply with).
(Need to fix CI too.)
I'm starting an internal presubmit to see if any usage is impacted by the change.
The full set of modifiers in this CL which caused build failures in google3 are CanonicalizedMap, DefaultEquality, MapEquality, DeepCollectionEquality, and HeapPriorityQueue. I think you fixed the usage of HeapPriorityQueue but I think the others will still cause a problem. When I comment out the added modifiers on those classes I can get a TAP global without any related build failures.
What's the status of this PR? I'm itching to use Map.pairs in my packages.
Hey all, I'm trying to use collections.dart and am getting errors like:
packages/collection/src/boollist.dart:231:50:
Error: The class 'NonGrowableListMixin' can't be used as a mixin because it isn't a mixin class nor a mixin.
class _NonGrowableBoolList extends BoolList with NonGrowableListMixin<bool> {
This is pulled in via transitive dependencies.
My dart version:
dart --version
Dart SDK version: 3.3.1 (stable) (Wed Mar 6 13:09:19 2024 +0000) on "macos_arm64"
I see above people saying it isnt a problem but how can I mitigate this?