leoafarias / fvm

Flutter Version Management: A simple CLI to manage Flutter SDK versions.
https://fvm.app
MIT License
4.68k stars 229 forks source link

[Feature Request] Add support to shorebird #757

Open SamuelGadiel opened 3 months ago

SamuelGadiel commented 3 months ago

I use FVM to manage the pure Flutter versions, and it works pretty well. But now I'm studying about CodePush and Shorebird, which is a modification of the Flutter SDK

As far as I know FVM does not have support for changing the source repository It would be great to have a way to configure the source from where we want to get the SDKs.

I see that fvm config has a --flutter-url parameter. But how does it work? Can I use it to change the source repository to point to shorebird?

If not, we could make it a configuration parameter, with the default for the Flutter repository And add the option to change the source repository, with some given options.

Something like

fvm config --source flutter
fvm config --source shorebird
leoafarias commented 3 months ago

@SamuelGadiel, can you take a look at having custom versions? https://fvm.app/documentation/advanced/custom-version

You would just have to add the SDK.

Also, the flutter-url will point to the Git repository of the Flutter SDK, so if that is what Shorebird provides, it would work seamlessly.

SamuelGadiel commented 3 months ago

From what I understood, custom versions have to be manually installed, which defeats the purpose of managing the sdks automatically.

But the flutter-url looks promising Should I point to the repository itself or the releases page? Shorebird has its releases in this url: https://github.com/shorebirdtech/shorebird/releases

How can I check that it worked?

I ran both fvm config --flutter-url https://github.com/shorebirdtech/shorebird and fvm config --flutter-url https://github.com/shorebirdtech/shorebird/releases

But in both commands the fvm releases command returned the flutter versions

SamuelGadiel commented 3 months ago

Now that I'm checking The shorebird releases page points to the releases of their CLI, not their modified versions of flutter...

dickermoshe commented 1 month ago

@leoafarias What are your thoughts about integrating support for shorebird in fvm directly.

pyenv (Python), jabba (Java) and many other Version Managers support more than just the official installation. I think this would be a great thing for DevX

leoafarias commented 1 month ago

I am not opposed to it. However, I don't know if it's that straightforward, and it might be tough to maintain as it seems to be more than just a fork.

Aej75 commented 1 month ago

Working on a project that have both fvm and shorebird is such a conflicting combination. I just wanted to build my project with the current fvm version. But shorebird on other hand is just gonna download its own version. If only there was a way for linking up the same path of flutter to both shorebird and fvm, I'd not have to download same flutter version for each project twice, taking up all the space on my PC.

SamuelGadiel commented 1 month ago

Shorebird doesn't use the vanilla Flutter SDK, they have modified the SDK to allow for code push. So I don't think it would be possible to link Shorebird and FVM to use the same directory. By definition, they will be duplicated.

SamuelGadiel commented 1 month ago

What I thought is that we could have a way to manage the SDK that Shorebird downloads using the FVM

But that would imply that FVM could download the binaries from Shorebird. And Shorebird should have a way to identify the sdk that was downloaded with FVM. Or FVM would have to save the SDK that was downloaded from shorebird in the shorebird directories

I mean, it can, but I don't know if it should...