-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Apply dart fixes to mixins #46465
Comments
cc @bwilkerson |
I guess this is If so, Could you please provide a minimal case if this is still valid? |
For sure, just ran into this today. There is a deprecated method in WidgetInspectorService, which is a mixin. I wrote the following rule: - title: "Migrate to addPubRootDirectories"
date: 2023-11-29
element:
uris: ['widgets.dart', 'material.dart', 'cupertino.dart']
method: 'setPubRootDirectories'
inMixin: 'WidgetInspectorService'
changes:
- kind: 'rename'
newName: 'addPubRootDirectories' with the expectation it would result in this transformation: // Before
class Test with WidgetInspectorService {
Test();
}
final Test test = Test();
test.setPubRootDirectories([]);
// After
class Test with WidgetInspectorService {
Test();
}
final Test test = Test();
test.addPubRootDirectories([]); This does not work. Am I holding it wrong? :) |
For reference, came up in flutter/flutter#139257 |
It looks right to me. Probably another unimplemented part of the API. |
Looking at TextSelectionDelegate, it is a mixin, so writing a fix for a deprecated member is not very clear.
I think I can write a fix for all the classes that use the mixin, but that could result in a large number of rules to write for a single mixin.
Being able to target and test mixins could streamline the process if possible. :)
The text was updated successfully, but these errors were encountered: