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

UnmodifiableMapMixin and others aren't Dart3-ready #276

Open
oprypin opened this issue Mar 27, 2023 · 7 comments
Open

UnmodifiableMapMixin and others aren't Dart3-ready #276

oprypin opened this issue Mar 27, 2023 · 7 comments
Assignees
Labels

Comments

@oprypin
Copy link
Member

oprypin commented Mar 27, 2023

UnmodifiableMapMixin should become a mixin or mixin 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

@lrhn
Copy link
Member

lrhn commented Mar 27, 2023

https://dart-review.googlesource.com/c/sdk/+/288240 should hopefully land soon-ish.

@oprypin
Copy link
Member Author

oprypin commented Mar 27, 2023

Is that related? This is about 'package:collection'

@lrhn
Copy link
Member

lrhn commented Mar 27, 2023

(Already updated the URL, pasted the wrong one originally.)

@oprypin
Copy link
Member Author

oprypin commented Mar 27, 2023

🙂 I think it's still different - 'dart:collection' vs 'package:collection'

@lrhn
Copy link
Member

lrhn commented Mar 27, 2023

Argh. My bad. Wrong issue tracker entirely. (Naming footgun!)

Yes, yes they should.

@lrhn lrhn added the 3.0 label Mar 27, 2023
@oprypin
Copy link
Member Author

oprypin commented Apr 19, 2023

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

@lrhn
Copy link
Member

lrhn commented May 3, 2023

There is technically no reason to eagerly change anything, since pre-3.0 code classes can still be used as mixins without the mixin modifier. As long as this package's min-SDK is 2.18.0, mixin in should keep workin.

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.
(And I believe the case where that was happening is no longer an issue, so we're not in any rush to release a 3.0 version.)

It's another issue that migrating the package to 3.0 properly should, rightfully, mean a major version increment.
Those are harder to release.

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

No branches or pull requests

2 participants