Skip to content

Flutter migrate #40460

@blasten

Description

@blasten

Use case

The platforms that Flutter supports introduce new features every year. To support these features, the Flutter tool may need to change the files in an existing project.

Features introduced in Flutter may also require changes to the underlaying project structure.

Because developers may configure project files in ways that we don't see ahead of time, changes to the project files may cause issues that are hard to revert. Even when the files are source controlled, the developer could have unstaged changes.

As a result, changes performed by the tool must ensure that they won't disrupt the developer's workflow.

Proposal

Create a new subcommand: flutter migrate that tracks all the migrations performed to an existing project and provides an option to revert the change.

DevX: If flutter build apk updated some files, the changes can be reverted by using flutter migrate --revert.

There are still more details to figure out:

  1. What happen if they are multiple migrations?
  2. Can a migration depend on another migration?
  3. Can the order of the migrations cause issues?

Design doc

https://flutter.dev/go/flutter-migrate

Sub-issues to track progress

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions