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

Upgrade to Dart 3.0 #296

Open
passsy opened this issue Aug 28, 2023 · 0 comments
Open

Upgrade to Dart 3.0 #296

passsy opened this issue Aug 28, 2023 · 0 comments
Labels
sdk This issue affects the sdk

Comments

@passsy
Copy link
Member

passsy commented Aug 28, 2023

Wiredash always aims to give backwards compatibility to the latest stable major Flutter updates for one year.

Today, the latest Flutter version is 3.13 from 16/08/2023 with Dart 3.1.
Our currently supported versions are

Flutter 3.10 with Dart 3.0 from `10/05/2023`
Flutter 3.7 with Dart 2.19 from `24/01/2023`
Flutter 3.3 with Dart 2.18 from `30/08/2022`
Flutter 3.0 with Dart 2.17 from `11/05/2022` (over one year)

We also are compatible with Flutter 3.0 because it works without extra effort. If it wouldn't we would drop it because it is older than one year and 4 major versions down.

Wiredash version distribution

Dart Version Distribution August 23

We track usage of the Wiredash SDK and see that ~75% use Dart 2.17 and newer and can use the latest SDK version.
We can also see that only ~30% of our users use Dart 3.0 and newer.

We conclude, that 30% of Flutter projects update to the latest stable version in 3 months, and 70% within the first year. The rest takes longer. 30% of projects using Wiredash use an outdated Flutter SDK.

Slow updater

Projects that update their Flutter SDK slow, usually also update Wiredash slowly.

Looking at only the latest Wiredash SDK 1.7.X usage, we can see that 73% have already updated to Dart 3.0. Also, nobody of the latest SDK version uses Flutter 2.17 and earlier.

Dart Version Distribution Wiredash 1 7 X August 23

Dart 3 caused breaking changes

Dart 3.0 was shipped with Flutter 3.13. Many packages followed Google's lead and released major updates for their packages and dropped support for older Dart versions. Because of the major updates, package authors squeezed breaking changes into the release. All that is fine.

Unfortunately, breaking changes sometimes makes it impossible to support both versions of a dependency, the versions before and after Dart 3.0. Because of that Wiredash might raise the minimum Dart SDK to 3.0 earlier than one year after Flutter 3.10 with Dart 3.0 was released.

Why an upgrade to minSdk Dart 3 might be useful

  • Use of latest dependencies. You want to use latest dependencies in your app. Wiredash should not be a blocker, preventing you from using the latest http package.
  • Use of new libraries. Libraries that are launched today only support Dart 3 and up. We can't use them right now
  • We can use new language features. Records and Patterns don't matter much and are not worth the upgrade. But class modifiers for the public API could be useful

Consequences of upgrading to minSdk Dart 3 early

  • Users of older Flutter versions might not get the latest features
  • Bugfixes will not be available automatically on older SDKs
  • CI pipelines need to be split to cover all SDK versions we currently support
  • Today, 70% of users will not be able to update to the latest Wiredash SDK because they're using an older Flutter SDK version

Conclusion

Looking at only the projects that are active and willing to update to the latest Wiredash SDK, 73% of the projects would be able to use a Dart 3 release. That's a good number in just 3 months since Dart 3 was released!

We don't enforce it, but we feel confident that after 3-6 months after a stable Flutter release, we can expect that a majority of projects would be able to use the latest Wiredash SDK.

Older Wiredash SDK will be always available and functional. Easy to integrate as always. But we can move forward knowing that the majority of projects which is willing to update is able to pick up our latest changes.

@passsy passsy added the sdk This issue affects the sdk label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sdk This issue affects the sdk
Projects
None yet
Development

No branches or pull requests

1 participant