canonical / flutter-snap

GNU General Public License v3.0
18 stars 8 forks source link

The package often lags behind the latest stable Flutter SDK version #64

Closed MrCsabaToth closed 2 years ago

MrCsabaToth commented 2 years ago

Developers who are new to Flutter but snap users expect to get the latest Flutter SDK when they install the Flutter Snap package. The Flutter CI/CD had a build step which compiled artifacts required for snap package creations (https://github.com/flutter/flutter/issues/93497, https://github.com/flutter/flutter/issues/75363).

That was fixed and a fresher package showed up on Snapcraft on Nov 15th. However since then there was 2.8.0 and 2.8.1 in December but the Snapcraft still shows Nov 15th (https://github.com/flutter/flutter/issues/93497). Let me know if I don't understand the use-case here, but I'd expect a new snap appear every time a new stable Flutter SDK is released.

I was redirected to this repo from the flutter repo.

jpnurmi commented 2 years ago

There seems to be a common misunderstanding between the snap package version vs. the Flutter version. A new version of the snap package is only released when e.g. the snap config changes. To upgrade Flutter, you can run flutter upgrade just like with any other Flutter installation.

jpnurmi commented 2 years ago

@kenvandine what about a post-refresh hook that runs flutter upgrade?

Feichtmeier commented 2 years ago

my 2 cents on the upgrade: 1) flutter shows a new version in terminal and how to upgrade 2) upgrading, especially in master channel, sometimes makes part of your code unusable due to deprecation, I think automating this could cause more trouble than good

kenvandine commented 2 years ago

A post-refresh hook runs as root, so won't update the user's specific flutter instance. The snap just manages the flutter repo, so behavior is the same as if you download flutter outside of the snap, which still requires a flutter upgrade to get new versions.

MrCsabaToth commented 2 years ago

Gotcha. So essentially this is a user error, maybe the Flutter Linux installation doc could emphasize how important is it to immediately upgrade to the latest after the Snap installation. And the official stance is to rely on the Flutter CLI and don't upgrade via Snap after installation?

kenvandine commented 2 years ago

The first time you run it, the latest of the channel you selected will be grabbed. You won't ever have to manually refresh the snap itself, that is automatic.

Anytime you change channels in flutter you do need to run flutter upgrade.