Skip to content

How should open-source packages deal with breaking changes in Flutter? #32474

@rrousselGit

Description

@rrousselGit

Some recent changes broke an open source package I maintain.
That's fine, and I did the fix.

But how can packages add proper version constraints to prevent that from happening?

I know that we can add the following to pubspec.yaml:

environment:
  sdk: ">=2.0.0 <3.0.0"
  flutter: <something>

But Flutter doesn't use semantic versioning.

So we can't use version constraints similar to:

environment:
  sdk: ">=2.0.0 <3.0.0"
  flutter: ">= 1.5.0 <= 1.6.0"

because between 1.5.0 and the latest version (currently 1.5.8), there are multiple breaking changes introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: contributor-productivityTeam-specific productivity, code health, technical debt.p: 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