Skip to content

[analyzer/meta] Proposal: Work towards package:meta next major release #54389

Open

Description

@parlough

There are a few annotations that exist in package:meta that don't make sense in either a Dart 2 or Dart 3 world. To reduce API surface area and potentially misleading or confusing suggestions, work towards the next breaking major release (3.x.x) should be made.

To reduce any potential impact on the ecosystem which is used quite widely, a three step plan similar to the following could be used to get there:

1. Prepare for deprecation

  • Keep the ^2.12.0 SDK constraint for now
  • Indicate through API comments and changelog expected deprecations, to give another chance to adapt.
  • Make a 1.x release with these changes, likely 1.12.0 unless a new release is made before this point.

https://dart-review.googlesource.com/c/sdk/+/342281

2. Increase SDK constraint and deprecate

3. Update to next major version and begin implementing breaking changes

  • Update pubspec version to 3.0.0-wip to begin work on the breaking changes.
    • 3.0.0 is needed instead of 2.0.0 due to an accidental release of 2.0.0 previously.
  • Remove all deprecated annotations
    • This currently includes: @alwaysThrows, @checked, @virtual, and likely @required, @Required, @sealed.
  • Mark all classes as final as the classes in package:meta are not intended to be subclassed.
  • Clearly document all breaking changes in the package in the changelog.
  • Publish the major release :)

Activity

  1. changed the title [-][analyzer/meta] Work towards `package:meta` next major release[/-] [+][analyzer/meta] Proposal: Work towards `package:meta` next major release[/+] on Dec 17, 2023
  2. added
    type-taskA well-defined stand-alone task
    P3A lower priority bug or feature request
    on Dec 18, 2023
  3. added
    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
    and removed on Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-pkg-metaIssues related to package:metatype-taskA well-defined stand-alone task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions