Skip to content

FED-5022 Drop Dart 2 support - #1013

Merged
btr-rmconsole-1[bot] merged 24 commits into
masterfrom
drop-dart-2-support
Sep 21, 2026
Merged

btr-rmconsole-1[bot] merged 24 commits into
masterfrom
drop-dart-2-support

Conversation

@greglittlefield-wf

@greglittlefield-wf greglittlefield-wf commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Motivation

Maintaining a large range of analyzer versions comes with a bit of overhead, and getting to the latest analyzer versions (#1012) while also supporting Dart 2 just isn't feasible.

We've supported Dart 2 + 3 in the same version of over_react for a while, and now it's time to drop Dart 2 support.

Changes

  • Update CI to no longer run on Dart 2, remove conditional Dart-2-only/Dart-3-only logic
  • Raise Dart SDK lower bound from >=2.19 to >=3.0.0
  • Fix errors/warnings resulting from upping the language version to 3.0 via the upped SDK constraint
    • class-used-as-mixin errors. From CHANGELOG.md:

      • Fix Dart language level 3.0 errors and downstream compile errors by switching internal classes to mixin declarations
        • GeneratedClass - switched to mixin

        • PropsMapViewMixin, StateMapViewMixin, MapViewMixin - switched to mixin, also moved implements to on

        • Hand-authored mixin "generated" classes:

          • Core: $AriaPropsMixin, $ConnectFluxPropsMixin, $CssClassPropsMixin, $DomPropsMixin, $ReactPropsMixin, $SvgPropsMixin, $UbiquitousDomPropsMixin
          • Components: $ErrorBoundaryPropsMixin, $ErrorBoundaryStateMixin, $ResizeSensorPropsMixin, $TransitionPropsMixin
        • While some of these are technically a breaking changes, there's very little chance of them impacting consumers, so we're releasing it as a minor.

          These classes have no known usages outside of over_react or its generated code, and are for internal use only.

          Additionally, the *MapViewMixin ones never should have been exported in the first place, and have been deprecated accordingly.

    • Remove unreachable switch statement default cases

    • Use modern equivalent to implicit-casts flag in analysis_options.yaml
      have ever been exported

  • Add regression tests for props mixin compile errors I didn't discover until pulling this branch into an internal Dart 3 consumer: test/over_react/component/props_mixin_compile_test.dart
  • Delete all test cases for non-null-safe and unsound null safety consumer code
    • Everything must be null-safe in Dart 3, so these are no longer applicable and wouldn't compile even if we tried to run them
  • Add changelog entry

QA steps

  • CI passes
  • Verify that new test/over_react/component/props_mixin_compile_test.dart regression tests fail on the commit before the fix (35d57cb), and pass on latest commit
  • Override a big Dart 3 app with this branch and verify it compiles cleanly

greglittlefield-wf and others added 10 commits August 6, 2026 15:46
…iles

- Raise environment.sdk to '>=3.9.0 <4.0.0'
- Delete Dart-2-only test files (non_null_safe_builder_integration_tests,
  unsound_flux_component_test.dart, over_react_component_declaration_non_null_safe_test.dart)
  and analyzer plugin non_null_safe test directories
- Remove dart_test.yaml no-dart-2 preset and dart-2-only tag
- Update CI test_and_check_generated_files matrix from [2.19.6, stable] to [3.9.0, stable];
  remove Delete-Dart-2-only-files step and --preset=no-dart-2 branching
- Update CI validate_analyzer: move ^5.13.0 row into the main matrix (no longer needs
  the 2.19.6 include); remove Delete-Dart-2-only-files step and --preset=no-dart-2 branching
- Update CI analyzer_plugin: remove the travis_link_plugin_deps.dart link step (plugin
  now resolves published over_react 5.7.0 rather than the local checkout); remove
  Delete-Dart-2-only-files step

Note: lib/ has analysis errors from classes used as mixins (class_used_as_mixin) that
require `mixin class` or `mixin` declarations — these need follow-up fixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@btr-rmconsole-1 btr-rmconsole-1 Bot changed the title Drop Dart 2 support FED-5022 Drop Dart 2 support Sep 21, 2026
@greglittlefield-wf
greglittlefield-wf marked this pull request as ready for review September 21, 2026 18:05
Comment thread .github/workflows/ci.yml
fail-fast: false
matrix:
sdk: [ 2.19.6, stable ]
sdk: [ 3.9.0, stable ]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of arbitrary; I just picked an older-but-not-too-old version of Dart 3

@robbecker-wf robbecker-wf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@robbecker-wf

Copy link
Copy Markdown
Member

QA +1 CI passes. Builds and runs in our internal app.

@greglittlefield-wf

Copy link
Copy Markdown
Contributor Author

@Workiva/release-management-p

@rmconsole-wf rmconsole-wf left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@btr-rmconsole-1
btr-rmconsole-1 Bot merged commit ac6382a into master Sep 21, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants