dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
789 stars 146 forks source link

Update to Dart 3.1 / Flutter 3.13.0 #6939

Closed jonasfj closed 1 year ago

jonasfj commented 1 year ago

We upgraded Dart & Flutter analysis SDK versions yesterday, but had to roll back the change due unrelated regressions with falling back to older analysis results.

As a result, any packages that have lower constraints requiring Dart 3.1 or Flutter 3.13 are currently experiencing analysis issues like this:

The current Flutter SDK version is 3.13.0-0.3.pre.

Because [package name] requires Flutter SDK version >=3.13.0, version solving failed.

This results in lowered pub point scores.

We're aiming to get new versions released next week. This will trigger re-analysis and points will be restored.

rydmike commented 1 year ago

Thank you! 🙏🏻 💙 Looks like this issue can be closed.

It by the way also kills generation of API reference docs for a package, when pub is using a lower version than what your package requires as min version. I guess this is because it does not recognize it as valid at all. This is imo much more critical than the temporary low scoring.

This was the situation for a few days for any package that required min Flutter 3.13.0, e.g. because of new breaking APIs in Flutter 3.13.0 that forced requiring it as minimum version to work correctly.

Example of such an API in this release is e.g. the Checkbox case, that was broken in Flutter 3.13.0 without any notice. For more information see https://github.com/flutter/flutter/issues/130295. To get the correct and expected style on custom styled Checkbox, the API have to be used in a different way in 3.13.0 compared to any earlier version, e.g 3.10.6.

I was aware of this situation and basically released a new version 1h after the 3.13.0 release, of the flex_color_scheme package, so that any of its "thousands" of users could get the updated and Flutter 3.13.0 compatible version asap, if so needed.

Since pub does not offer any real useful usage stats, I don't actually know how many uses the pacakge. The "thousands" was just from GitHub that tells me that 3131 public repos uses it. Ok sure, small potatoes, but something at least 😄


Food for thought

I have noticed that when it is getting close to a new Flutter release, that pub often a few days before that has been built with or set to use the latest beta of Flutter and Dart for analysis. The beta version that basically becomes the new stable.

Would it be possible to make it so that pub would recognize and use this beta release also for the analysis of its implied stable Flutter and Dart version numbers? Without actually requiring pub and pana to be running on that stable release? E.g. by faking the min required version of the package, if it recognizes that its min required version stable version, is the stable version f used and supported beta on pub?

I would assume that the chances of it running into something that would not work is minimal. This would decrease the urgency of updating pub to latest stable Flutter/Dart after a new release, so you can do it at a more relaxed pace over the next few days.

Just an idea, no idea if it is all feasible and practical.

isoos commented 1 year ago

This has been fixed for a while now.