Skip to content

[packages] Enforce consistent SDK versions #121684

@stuartmorgan-g

Description

@stuartmorgan-g

Currently when we update minimum Flutter SDK versions we often don't remember (or bother) to update the Dart SDK versions. While it's not strictly necessary to do so, it would be be better if we did:

  • This has caused some confusion among contributors about the inconsistency.
  • It can cause confusion for clients since pub.dev shows Dart minimums but not For minimums.
  • We likely have some inaccurate Dart versions (i.e., cases where we are depending on some Dart APIs newer than what's expressed by the Dart SDK constraint, with the Flutter constraint hiding that), which is harmless in practice but potentially confusing.
  • Not updating the Dart SDK constraint means we don't take advantage of language features that we otherwise could be (e.g., super parameters).

We should have the pubspec check keep a known version map, and validate that they are consistent when both are present. This will require a tool change every major release, but it will be very minor, and we already do some repo-level changes every release to update minimum allowed SDK versions.

Metadata

Metadata

Labels

P3Issues that are less important to the Flutter projectp: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions