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
Add dart fix support for moved
classes
#45393
Comments
I second this feature request, as it would open up a lot of very powerful migrations. |
I think the following new kind of change would satisfy the requirements expressed here: replacedByA replaced by change indicates that the specified element was replaced by another element. It has two keys: The I think this would allow you to specify that the static method Can you think of any other information you might want to have supported by such a change? |
As a Dartfix beginner, I'm going to ask a beginner question: Could this be combined with Dartfixes for any parameters that were renamed between the old and new methods / constructors? AKA, turning this: ClassA({required int count}) to this ClassB({required int limit}) |
Good question. I believe that the answer ought to be 'yes', that it ought to be possible to specify changes to the parameters just like you can with a |
See also: https://dart-review.googlesource.com/c/sdk/+/214068 for a place where /fyi @natebosch |
I have committed https://dart-review.googlesource.com/c/sdk/+/221900, which includes a limited version of a I'm going to close this issue in preference of having new issues for any enhancement requests. |
@bwilkerson: maybe cc @natebosch when you update the docs since this ought to get them unblocked? |
We would like to supply fixes that can change a class name based on the method being called.
For example:
should be migrated to
The is not specific to the same method being moved across classes, as we would want to be able to identify and compose fixes that can feasibly migrate
classA.methodA
toclassB.methodB
, or constructors too.Another example of this would be going from this:
BlackListingTextInputFormatter()
to this:
Not sure if that example should be a different use case, if so we can break it out into a separate issue.
The text was updated successfully, but these errors were encountered: