FED-4777 Remove dart_style dep, fix builder AOT compilation#1009
Open
greglittlefield-wf wants to merge 8 commits into
Open
FED-4777 Remove dart_style dep, fix builder AOT compilation#1009greglittlefield-wf wants to merge 8 commits into
greglittlefield-wf wants to merge 8 commits into
Conversation
This makes it easier to support Dart 2 and 3, and also prevents dart_style from unnecessarily constraining analyzer in downstream dependencies.
dart run build_runner build --build-filter='**/**.dart'
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Contributor
Author
There was a problem hiding this comment.
Note to reviewers: these changes are best reviewed commit-by-commit
robbecker-wf
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
We have a pretty gross workaround using
dart:mirrorsto support dart_style API differences between versions supported in Dart 2 and 3: https://github.com/Workiva/over_react/blob/5.6.2/lib/src/builder/dart_style_compat.dartThis use of dart:mirrors prevents AOT snapshots from being used by newer versions of
build_runnerin Dart 3.Initially I looked into dropping support for Dart 2 in the main release line, but that still left us with a dart_style range of
>=2.3.7, which constrained analyzer to^6.5.0, meaning we'd be effectively dropping support for analyzer 5, which isn't ideal.The formatting step in the over_react builder specifically doesn't provide a bunch of value. As a
build_to:cachebuilder, consumers of over_react don't see the generated code unless they jump to definition on the generated part or generated API members. And, the code outputted by the builder before it gets to dart_style is already pretty well-formatted.So, to simplify things, and prevent unnecessary constraining of dependencies, we'll just remove the formatting step altogether.
Changes
Note to reviewers: these changes are best reviewed commit-by-commit
dart_styleandpub_semverdependenciesRelease Notes
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
build_runner: ^2.14.0)Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: