Skip to content
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

feat: Specify flutter version and/or disable automatic download #18

Open
mrgnhnt96 opened this issue May 22, 2024 · 6 comments
Open

feat: Specify flutter version and/or disable automatic download #18

mrgnhnt96 opened this issue May 22, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@mrgnhnt96
Copy link

Current Implementation

Shorebird automatically downloads the latest version of the modified Flutter SDK

Problem

  • There is no way to specify the desired version
  • There is no way to disable the automatic download

Context

Sometimes, for one reason or another, not using the latest version of the Flutter SDK is required. If it isn't needed, the latest version gets downloaded during the setup and is never used.

Specifying a version could be considered redundant, however, if the shorebird release|patch already performs a check for the version provided by --flutter-version. It might be better to turn off the automatic download since it will happen later down the pipeline anyways.

The Proposition

  • Add a parameter named flutter-version that will default to the latest modified flutter version.
    OR
  • Turn off the automatic download
@eseidel
Copy link

eseidel commented May 22, 2024

My understanding is that the user knows they're building their app with Flutter version X, which is not the default version included with Shorebird, and so they'd like to disable Shorebird from downloading that other version Y, on CI and only download X. This request is suggesting either making X an option to the shorebird install step, or making shorebird itself not download a flutter version until needed, I think?

It's mostly a CI-specific problem.

We also could do other things to reduce the downloaded size of Flutter, particularly on CI where Linux (and thus a modern version of Git) is possibly more available.

@eseidel
Copy link

eseidel commented May 30, 2024

See also shorebirdtech/install#33.

@johnmartel
Copy link

Related to this, it would be nice if we could specify the Shorebird version installed by this action. Bonus points for supporting reading version from .tool-versions. Just been hit by this action downloading 1.1.11 and requiring me to upgrade Flutter to 3.22.2.

@eseidel
Copy link

eseidel commented Jun 12, 2024

Sorry for the disruption re: 3.22.2 being now required for iOS.

TIL: https://asdf-vm.com/manage/configuration.html

@johnmartel
Copy link

johnmartel commented Jun 13, 2024

@eseidel For some context on the above request:

  • we use asdf to manage our tooling dependencies, including Shorebird (we thus have a .tool-versions that specifies the Shorebird version we depend on)
  • we use this action in our release/patch pipeline to install Shorebird
  • we are aware of https://github.com/asdf-vm/actions which could be an alternative, but in this pipeline we don't need all dependencies defined in .tool-versions and thus rely on shorebirdtech/setup-shorebird to install only Shorebird. That's only a small optimization, but I thought it could be interesting if this action supported specifying the Shorebird version to install, ideally from reading .tool-versions when available/specified, ala https://github.com/subosito/flutter-action or actions/setup-node

@eseidel eseidel added the enhancement New feature or request label Jun 17, 2024
@felangel
Copy link
Contributor

Fwiw we just released support for caching your Shorebird installation (including Flutter artifacts) in v1.0.1 in case that helps 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants