Skip to content

Add a project upgrade mechanism #12573

Description

@xster

We often make changes to the default flutter create template. It would be good to have an automated upgrade mechanism that takes various existing native code, yaml, artifacts etc and apply the latest change

  • Let flutter create leave some sort of version stamp in the produced artifacts indicating the version of the tool when the project was created
  • Add some mechanism to compare flutter versions. See how it can be harmonized with version.dart.
  • Add a flutter project upgrade command that takes in a number of 'steps' recipes in a folder that does modifications gated by version comparison conditions. This should warn the users to keep their git working directory clean before proceeding.
  • Let it have a --dry-run option to print a diff patch of the changes.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Oct 16, 2017
  2. added this to the milestone on Oct 17, 2017
  3. self-assigned this
    on Oct 27, 2017
  4. xster commented on Nov 14, 2017

    @xster
    MemberAuthor

    I'm currently targeting explicit Dart awareness of Flutter revision numbers and applying direct file changes.

    Maybe one day in the future, it might be worth exploring a automatic codeless way of maintaining and auto applying diffs on various versioned .yaml/.json/.xml/.etc templates but so far, the use cases lean more towards direct targeted changes.

  5. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    and removed
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Apr 23, 2018
  6. cbracken commented on Jun 1, 2018

    @cbracken
    Member

    Worth explicitly noting that this will need to support interactive steps with confirmation. In #18102 (migrate iOS devicelab tests to universal binaries), supporting migration came up, but there are some (probably rare) cases where an app may legitimately be 64-bit only, so I think we'd want to confirm before updating.

  7. zoechi commented on Dec 11, 2018

    @zoechi
    Contributor

    I great first step would be a version number stored with the generated files and flutter doctor reporting if the projects generated files are up-to-date
    (even without providing an automated way to upgrade them).

    I created https://github.com/flutter/flutter/wiki/Workarounds-for-common-issues#generated-project-files-outdated and this seemed to help quite a few times already.

  8. zoechi commented on Jan 2, 2019

    @zoechi
    Contributor

    #9827 looks related.

  9. removed their assignment
    on Jan 2, 2019
  10. xster commented on Jan 2, 2019

    @xster
    MemberAuthor

    Only partly related. This is about dealing with all kinds of changes in the user projects when the Flutter framework version changes. #9827 is about dealing with the pod environment in the user project when the user adds/removes plugins or wants to customize. That can be within the same Flutter framework version or different.

  11. modified the milestones: , on Jan 7, 2020
  12. added
    P3Issues that are less important to the Flutter project
    on May 29, 2020
  13. modified the milestone: on Jun 1, 2020
  14. removed this from the milestone on Jun 16, 2020
  15. removed this from the milestone on Jul 7, 2020
  16. modified the milestone: on Jul 22, 2020
  17. removed this from the milestone on Aug 17, 2020
  18. xster commented on Aug 30, 2020

    @xster
    MemberAuthor

    Merging into #40460 since there's more details now.

  19. github-actions commented on Aug 13, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  20. locked as resolved and limited conversation to collaborators on Aug 13, 2021
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

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilitytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions