Skip to content

Add support for moving classes between libraries #57057

Open
@natebosch

Description

@natebosch
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)

Activity

scheglov

scheglov commented on Nov 8, 2024

@scheglov
Contributor
added
P2A bug or feature request we're likely to work on
on Nov 8, 2024
added
area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
and removed
devexp-data-driven-fixesIssues with the analysis server's support for data-driven fixes
on Feb 27, 2025
natebosch

natebosch commented on Apr 16, 2025

@natebosch
MemberAuthor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @scheglov@bwilkerson@natebosch

        Issue actions

          Add support for moving classes between libraries · Issue #57057 · dart-lang/sdk