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 in shorebird.yaml #2018

Closed
2 tasks
alexobviously opened this issue May 6, 2024 · 6 comments
Closed
2 tasks

feat: specify flutter version in shorebird.yaml #2018

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

Comments

@alexobviously
Copy link

Description

Currently it is only possible to specify a specific flutter version by passing an argument when calling the Shorebird CLI. This works fine, but for big projects, it would be cleaner if we could specify a version in shorebird.yaml, consistent with how we specify dart/flutter verisons in pubspec.yaml etc.

Requirements

  • A parameter in shorebird.yaml that allows specifying a flutter version
  • Can still be overridden by --flutter-version, I think?
@eseidel
Copy link
Contributor

eseidel commented May 6, 2024

Certainly fair. Another alternative would be for us to teach shorebird to read the version from fvm or similar.

#1972 might be another approach to avoid needing to specify? But I agree, it would be nice to specify the flutter version in source control somehow, and we should just respect whatever way already exists to do that in the flutter community (e.g. fvm?).

@alexobviously
Copy link
Author

alexobviously commented May 7, 2024

I obviously can't speak for everyone and perhaps my experience is not the standard, but in our case, I'd say explicitly specifying in a single file would actually be the optimal solution, so that we get predictable results regardless of who on the team builds the release/patch, and it's easy to maintain that way too. But yeah maybe I am missing a much better workflow with fvm or similar.

btw I would be happy to have a go at adding this myself, just having a look through the shorebird_cli code and it looks pretty comprehensible

@eseidel
Copy link
Contributor

eseidel commented May 8, 2024

If there is not a way to currently specify flutter version in source, that does seem reasonable that shorebird release should take the flutter version from shorebird.yaml by default. 🤷 Thanks for the suggestion!

@eseidel eseidel added the enhancement New feature or request label May 8, 2024
@erickzanardo
Copy link
Contributor

pubspec.yaml actually allows you to specify a flutter version, here is an example.

Its is meant to be used mainly on published packages as state in this comment, and it doesn't force you to pin a version, it allows a range, which I am not sure if can bring some confusion.

Either way, I feel it would bring even more confusion if we added yet another version field to shorebird.yaml that does something similar to the one on pubspec.yaml...

So I would suggest that instead of adding a new field to shorebird's config file, we could read the one on pubspec, respect the range (so if the field says >=3.22.0 and shorebird supports 3.22.1, the later will be used), and it can be overridden by the flag.

@eseidel
Copy link
Contributor

eseidel commented Jun 12, 2024

See also shorebirdtech/install#33

@eseidel
Copy link
Contributor

eseidel commented Jul 11, 2024

I think we will solve this another way. Either by reading from .fvm or another environment file.

@eseidel eseidel closed this as completed Jul 11, 2024
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

3 participants