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: support fvm #1385

Open
eseidel opened this issue Oct 10, 2023 · 8 comments
Open

feat: support fvm #1385

eseidel opened this issue Oct 10, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@eseidel
Copy link
Contributor

eseidel commented Oct 10, 2023

Some users don't install Flutter directly, rather they use fvm. So flutter isn't even on their path, just fvm is and they might then use a shell alias to map flutter in the shell to fvm flutter.

One such user noted that this setup does not work with shorebird and is asking for potential fixes to shorebird to auto-detect/support fvm, and/or at least docs on how they're supposed to work together:
#472 (comment)

@eseidel eseidel added the enhancement New feature or request label Oct 10, 2023
@eseidel eseidel added this to 1.0 Oct 10, 2023
@eseidel eseidel moved this to Customers in 1.0 Oct 10, 2023
@martin-bertele
Copy link

in fact, this morning it works, I've only had
✗ Flutter install is correct (0.8s)
[!] The version of Flutter that Shorebird includes and the Flutter on your path are different.
Shorebird Flutter: 3.13.6
System Flutter: 3.10.5
and could fix this with https://docs.shorebird.dev/flutter-version#supported-flutter-versions
setting shorebird version to 3.10.5

Maybe it was the system restart, even though my reloads/ sourcing the .zshrc should have done the job as well.
Congrats, shorebird plays together with fvm for me !

Previously I've used only my f alias, now I've added the flutter alias.

alias f="fvm flutter"
alias flutter="fvm flutter"

and of course then in the executing directory I've got the .fvm folder.

Some hints to fvm would be nice in docu indeed :) Thanks !

@eseidel eseidel moved this from Customers to Punted in 1.0 Oct 16, 2023
@martin-bertele
Copy link

had sth similar when switching fvm flutter versions and updating shorebird.

With having the above aliases, after setting shorebird&fvm flutter to same version, VS Code close & restart did the trick (Developer Reload Window not sufficient).

@eseidel
Copy link
Contributor Author

eseidel commented Aug 16, 2024

A user just asked on discord for:

Behavior should probably take this preference order:
If --flutter-version flag is passed, this gets the highest preference.
If flag not found and .fvmrc is found, use it.
If flag not found and .fvmrc is not found, use the latest flutter stable version.

@eseidel
Copy link
Contributor Author

eseidel commented Aug 16, 2024

fvmrc doesn't look difficult to parse (it's just json):
https://fvm.app/documentation/getting-started/configuration

I think the only question in my mind is if this should be a wrapper around shorebird, or built into shorebird.

And if it's built into shorebird, should we be detecting fvmrc by default, or only when a flag is passed?

@martin-bertele
Copy link

I vote for detect by default and possibly opt out via flag

With so many different flutter projects I wonder how is it possible to survive without flutter per project versioning :)

@eseidel eseidel added this to 1.1 Aug 19, 2024
@eseidel eseidel moved this to Customers in 1.1 Aug 19, 2024
@josh-burton
Copy link

Out of the box support for fvm would be great. Better than opt-in as it ticks the 'it just works' box.

@eseidel
Copy link
Contributor Author

eseidel commented Oct 10, 2024

We'd welcome patches for this, but this isn't on our near-term roadmap without more requests. It doesn't seem to be blocking anyone (but definitely something we could do better).

shorebird release --flutter-version is the way to set the Flutter version currently. Would be neat to read that version either from the current flutter on path, a .fvm file or some fvm command.

@vlazdra
Copy link

vlazdra commented Nov 25, 2024

Hey @eseidel, i just came across an issue with the shorebird_code_push package and the supported Flutter version together with the need to run the Shorebird CLI command via FVM instead of directly with the installed flutter version on my machine.

My FVM was using 3.24.5 and my locally installed flutter version was 3.24.4. I've updated my local installation of Flutter for now. Would be nice if we can specify to the CLI that the FVM should be used via a flag or something.

Screenshot 2024-11-25 at 11 57 16

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
Status: Punted
Status: Punted
Development

No branches or pull requests

4 participants