-
Notifications
You must be signed in to change notification settings - Fork 84
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
UnmodifiableMapMixin and others aren't Dart3-ready #276
Comments
https://dart-review.googlesource.com/c/sdk/+/288240 should hopefully land soon-ish. |
Is that related? This is about 'package:collection' |
(Already updated the URL, pasted the wrong one originally.) |
🙂 I think it's still different - 'dart:collection' vs 'package:collection' |
Argh. My bad. Wrong issue tracker entirely. (Naming footgun!) Yes, yes they should. |
Ping on this issue. I think this is high priority to resolve and make a release of this library ahead of Dart 3. Also cc @mit-mit @devoncarew |
There is technically no reason to eagerly change anything, since pre-3.0 code classes can still be used as mixins without the It's only an issue if someone tries to interpret the pre-3.0 code as post-3.0 code, ignoring the languge-version of the pubspec, which is not a safe thing to do since 3.0 is a breaking change for the language. It's another issue that migrating the package to 3.0 properly should, rightfully, mean a major version increment. |
Hey all, I'm trying to use collections.dart and am getting errors like: packages/collection/src/boollist.dart:231:50: My dart version: dart --version I see this package says its SDK is ^3.1 in the pubspec.yaml. Am I doing something wrong or is there a way to get this to continue working? I am using the dart associated with the latest version of flutter My build command is: dart run build_runner build --output=build |
Are you using the |
Ah I am using 1.18. So its not possible currently to use dart:collection with the current dart version? Curious how does flutter work when the current packaged dart version with flutter stable is 3.4? |
You should be able to use If you do so, you should not get any error. If it cannot, we have a bug. I cannot reproduce the issue. Using tip-of-tree SDK, in a fresh dart package ( import "dart:collection";
import "package:collection/collection.dart";
abstract class C extends ListBase<int> with NonGrowableListMixin<int> {} Any chance you can show an entire compilable file that has the error, and/or check the language version of |
I am building using build runner/dart2js. The language version in collection says
I am building using My build.yaml
My pubspec env:
|
UnmodifiableMapMixin
should become amixin
ormixin class
. Otherwise it is not ready for use with Dart 3 /prefer_mixin
.All usages of it are expected to be within a
with
clause.Others that I noticed are
NonGrowableListMixin
,UnmodifiableSetMixin
The text was updated successfully, but these errors were encountered: