Skip to content

Add support for moving classes between libraries #57057

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

Open
natebosch opened this issue Nov 8, 2024 · 2 comments
Open

Add support for moving classes between libraries #57057

natebosch opened this issue Nov 8, 2024 · 2 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. P2 A bug or feature request we're likely to work on

Comments

@natebosch
Copy link
Member

This is a follow on to #48997

We can define a fix which uses replacedBy to move functions and variables to a new import, but cannot do the same with classes.

Can we either support replacedBy with classes, or add a movedTo operation which maintains the name and replaces only the import URI.

See dart-lang/test#1978 (comment)

@natebosch natebosch added legacy-area-analyzer Use area-devexp instead. devexp-data-driven-fixes Issues with the analysis server's support for data-driven fixes labels Nov 8, 2024
@scheglov
Copy link
Contributor

scheglov commented Nov 8, 2024

@bwilkerson @keertip

@scheglov scheglov added the P2 A bug or feature request we're likely to work on label Nov 8, 2024
@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed devexp-data-driven-fixes Issues with the analysis server's support for data-driven fixes legacy-area-analyzer Use area-devexp instead. labels Feb 27, 2025
@natebosch
Copy link
Member Author

This is coming up again in the context of a package rename for firebase_vertexai. It would be very helpful if we can re-export the code from the old package with a deprecation that helps folks migrate to the new one. We can't use the fix without support for moving the classes, so for now my plan will be to add dart fix data that helps with the renames and then inform users to manually rewrite pubspecs and imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

3 participants