Skip to content

Document how to use git submodules to pin Flutter dependency #3770

Closed

Description

@eseidelGoogle

I've seen some developers use git submodules. Is that a recommended approach?

Once I write my large app, I want to control when the version of flutter changes, and I want it to be the same between all of my developers.

Activity

  1. modified the milestone: on May 20, 2016
  2. sethladd commented on Jul 19, 2016

    @sethladd
    Contributor

    Would dart-lang/pub#1432 be sufficient?

  3. eseidelGoogle commented on Jul 19, 2016

    @eseidelGoogle
    ContributorAuthor

    I think this ends up being more than just an sdk fix, since if I have two separate flutter projects, we need a clear story as how I configure Atom differently when working with them, or the flutter command line, etc. Certainly pub support may be part of this, but we also just need a recommended story for Flutter too since so many of our tools are tied into the flutter version.

  4. sethladd commented on Jul 19, 2016

    @sethladd
    Contributor

    Yes, I'd love per-project SDK configurations in Atom. That would help a lot.

  5. Hixie commented on Jan 28, 2017

    @Hixie
    Contributor

    This seems to be a dupe of #3696, so I'm closing it as such. Please reopen if I misunderstood.

  6. eseidelGoogle commented on Jan 31, 2017

    @eseidelGoogle
    ContributorAuthor

    This is not the same issue. This is the how-do-i-pin-the-version-of-flutter-my-app-depends-on question. :) i.e. so that all of my 10 developers can get the same version of flutter instead of each of them having different flutter sdk versions depending when they last ran flutter upgrade.

  7. Hixie commented on Jan 31, 2017

    @Hixie
    Contributor

    Ah, I see. This is basically about giving the flutter tool a way to read your pubspec.yaml and follow the same semantics as we want pub get to use to determine what version of a package to bring in given a particular environment line. Almost the opposite of #3696 in fact.

  8. changed the title [-]What is the best way to depend on a specific version of flutter?[/-] [+]Enable applications to specify the Flutter SDK version that they need[/+] on Jan 31, 2017
  9. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    and removed on Jan 31, 2017
  10. added this to the milestone on Jan 31, 2017
  11. 10 remaining items

  12. added this to the milestone on Dec 20, 2017
  13. anaisbetts commented on Jan 18, 2018

    @anaisbetts
    Contributor

    Hey all, with the fix I just PRed, you should be able to now do:

    git submodule add https://github.com/flutter/flutter ./vendor/flutter

    Then check in a wrapper flutterw for your vendored Flutter into your project, a-la gradlew:

    #!/bin/bash
    set -euo pipefail
    
    DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    
    export PATH="$DIR/vendor/flutter/bin:$PATH"
    exec flutter $@

    So instead of flutter doctor, run ./flutterw doctor, and you should have reliable builds, albeit slow in CI environments because flutter will have to redownload Dart et al every time.

  14. Hixie commented on Jan 18, 2018

    @Hixie
    Contributor

    @sethladd could you add something about this to the faq?

  15. sethladd commented on Jan 18, 2018

    @sethladd
    Contributor

    https://github.com/flutter/website/blob/master/faq.md will gladly accept PRs :)

    In the meantime, we should reopen this or open a new issue for the FAQ entry so it doesn't get lost

  16. changed the title [-]flutter tool should honor git submodule semantics when testing for "The Flutter directory is not a clone of the GitHub project"[/-] [+]Document how to use git submodules to pin Flutter dependency[/+] on Jan 19, 2018
  17. added and removed
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jan 19, 2018
  18. modified the milestones: , on Jan 19, 2018
  19. reopened this on Jan 19, 2018
  20. zoechi commented on Dec 3, 2018

    @zoechi
    Contributor

    Issue moved to flutter/website #1845 via ZenHub

  21. github-actions commented on Aug 17, 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.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions