Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FED-1713 Null safety: perform migration, set up base for 5.0.0 integration branch #856

Merged
merged 219 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
3b25e84
Widen analyzer dependency range to fix dev channel builds
aaronlademann-wf Feb 3, 2021
155d73e
Move git diff check to its own step
aaronlademann-wf Feb 4, 2021
e8305c4
Try adding comments to speed up dev build?
aaronlademann-wf Feb 4, 2021
800a9fc
Remove build_web_compilers/build_modules overrides
aaronlademann-wf Feb 5, 2021
8f3a081
Copy dart version comment in generated parts
aaronlademann-wf Mar 17, 2021
fb6d7ce
Let the consumer know we don’t support this ish yet
aaronlademann-wf Mar 17, 2021
5b31e99
Merge branch 'master' of github.com:Workiva/over_react into widen-ana…
aaronlademann-wf May 20, 2021
570b422
Merge branch 'widen-analyzer-range' into null-unsafe-compat-builder
aaronlademann-wf May 20, 2021
ad10b8b
Prep for null-safety
greglittlefield-wf May 28, 2021
15cb823
Generate files
greglittlefield-wf May 28, 2021
e6aece8
Add some hints
greglittlefield-wf May 28, 2021
c317210
Clean up some code to be easier to make null-safe
greglittlefield-wf May 28, 2021
ceaebc9
Use null safety tool to migrate most non-builder code in lib, adding …
greglittlefield-wf May 28, 2021
8057181
More migration hints in core lib/src/component files
greglittlefield-wf May 28, 2021
2b748f4
Convert builder to be null-safe (minus using null safe deps like anal…
greglittlefield-wf May 28, 2021
8d905e1
Fix hints
greglittlefield-wf May 28, 2021
09be6c8
Upgrade to latest analyzer
greglittlefield-wf Jun 15, 2021
78afd8b
Remove BuiltReduxUiComponent and related built_redux APIs
greglittlefield-wf Jun 16, 2021
64f2a42
Fix unnecessary ReactElement cast lints
greglittlefield-wf Jun 16, 2021
1e7b574
Don't reference removed forwardRef
greglittlefield-wf Jun 16, 2021
3f5846d
Fix misc lints
greglittlefield-wf Jun 16, 2021
3114e3b
Remove dart2_constant dependency
greglittlefield-wf Jul 23, 2021
f830756
Point to null safety transformer utils branch
greglittlefield-wf Jul 23, 2021
0ddfc25
Upgrade all dependencies to null safe releases except for w_common/w_…
greglittlefield-wf Jul 23, 2021
f2f827a
Fix analysis errors after upgrading dependencies
greglittlefield-wf Jul 23, 2021
1687b64
Apply migration (Dart 2.13.3)
greglittlefield-wf Jul 23, 2021
909a57f
Fix analysis errors in builder after running migration
greglittlefield-wf Jul 23, 2021
ad08ea2
Fix warnings in builder after running migration
greglittlefield-wf Jul 23, 2021
2da1db8
Fix lints in builder after running migration
greglittlefield-wf Jul 23, 2021
191cbb5
Remove conflicting extensions declared in package:collection
greglittlefield-wf Jul 23, 2021
a726eea
Fix errors in builder tests
greglittlefield-wf Jul 23, 2021
7c78411
Fix lots of unnecessary null-aware warnings
greglittlefield-wf Jul 23, 2021
7960c07
Fix remaining warnings in builder tests
greglittlefield-wf Jul 23, 2021
2d44d59
Add missing null check
greglittlefield-wf Jul 23, 2021
b6f1564
Remove build configs for remove dependencies
greglittlefield-wf Jul 23, 2021
d5898bd
Fix syntax error in component_base.dart
greglittlefield-wf Jul 23, 2021
cd91e96
Fix DummyComponent2 implementation
greglittlefield-wf Jul 23, 2021
22871ca
Update builder to emit correct nullability in generated code
greglittlefield-wf Jul 23, 2021
0f9bfb8
Update generated code
greglittlefield-wf Jul 23, 2021
1ef30bd
Add missing late
greglittlefield-wf Jul 23, 2021
f325b38
Update generated code
greglittlefield-wf Jul 23, 2021
256f593
Fix overrides in component_base
greglittlefield-wf Jul 23, 2021
617df73
Attempt to fix nullability issues in component_declaration and util
greglittlefield-wf Jul 23, 2021
54f1c8f
Fix nullability issues in internal components
greglittlefield-wf Jul 23, 2021
0374035
Generate code
greglittlefield-wf Jul 23, 2021
1c93705
Fix syntax error in test
greglittlefield-wf Jul 23, 2021
9795e89
Fix Redux nullability issues
greglittlefield-wf Jul 23, 2021
45491fe
Fix bad casts added by tool
greglittlefield-wf Jul 23, 2021
8356f21
Tweak nullability on prop key utils
greglittlefield-wf Jul 23, 2021
10ad6c2
Properly convert CSSValue parsing to null safety
greglittlefield-wf Jul 24, 2021
b1f2669
Fix null and null-aware warnings
greglittlefield-wf Jul 24, 2021
de928f1
Fix incorrect null safety conversions
greglittlefield-wf Jul 24, 2021
eec4a99
Clean up null checks
greglittlefield-wf Jul 24, 2021
b24969d
Fix nullability in Component2
greglittlefield-wf Jul 24, 2021
8785b15
Null check cleanup
greglittlefield-wf Jul 24, 2021
7ace186
Fix InfluxStoreMixin nullability
greglittlefield-wf Jul 24, 2021
869d2ac
Use runZonedGuarded instead of deprecated runZoned
greglittlefield-wf Jul 24, 2021
6239714
Add more hasher test cases to support refactoring
greglittlefield-wf Jul 24, 2021
a84e48a
Fix a bunch of small nullability errors/warnings/lints
greglittlefield-wf Jul 24, 2021
607097c
Fix incorrect nullability
greglittlefield-wf Jul 24, 2021
3152bd6
Remove unused meta imports
greglittlefield-wf Jul 24, 2021
46d2c07
Fix disposable method migration
greglittlefield-wf Jul 24, 2021
2a341aa
Make getProps/getDartComponent dynamic so that consumers don't need t…
greglittlefield-wf Jul 24, 2021
8240478
Clean up react wrappers tests
greglittlefield-wf Jul 24, 2021
7273755
Add missing not-null-assertions
greglittlefield-wf Jul 24, 2021
a436845
Merge remote-tracking branch 'origin/master' into null-safety
greglittlefield-wf Feb 27, 2023
c23a399
Fix builder analysis errors after master merge
greglittlefield-wf Feb 27, 2023
6225af6
Upgrade changes from master to null safety, misc fixes after merge
greglittlefield-wf Feb 27, 2023
44731dc
Re-generate over_react parts
greglittlefield-wf Feb 27, 2023
a6a897f
Update mockito mocks
greglittlefield-wf Feb 27, 2023
8c13e2d
More misc null safety error fixes
greglittlefield-wf Feb 27, 2023
353f5d4
Fix lints related to type checking
greglittlefield-wf Feb 27, 2023
19a8475
Remove unnecessary casts
greglittlefield-wf Feb 28, 2023
51d5964
Add null-checks for non-nullable props, add nullability example
greglittlefield-wf Mar 2, 2023
7fe5a1e
Conditionally generate null safe code (not using pubspec constraint yet)
greglittlefield-wf Mar 30, 2023
ebec2f2
Null-safe props: fix null checks / null awares
greglittlefield-wf Jun 11, 2023
d4851ed
Attempt to improve migrator tool inference when encountering generate…
greglittlefield-wf Jun 11, 2023
9ba7c46
Factor late-ness into prop requiredness metadata
greglittlefield-wf Jun 11, 2023
561f66d
Use uiJsComponent where possible so that we can benefit from props cl…
greglittlefield-wf Jun 11, 2023
5ef8f6b
Use defaults when possible in accessor generation
greglittlefield-wf Jun 11, 2023
541601f
Re-enable null safety in builder
greglittlefield-wf Jun 11, 2023
c49db91
Re-generate with null-safe parts and updated accessors
greglittlefield-wf Jun 11, 2023
5686fb0
Default to null-safe builder output only for over_react for the time …
greglittlefield-wf Jun 11, 2023
08a52d4
Add proof-of-concept for new required prop validation
greglittlefield-wf Jun 12, 2023
9cb3308
Missing required prop diagnostic: clean up, add support for late
greglittlefield-wf Jun 12, 2023
5a0a454
Add support for accessing non-nullable props in getPropKey, handle no…
greglittlefield-wf Jun 12, 2023
812289c
Merge branch 'master' into null-safety
hunterbreathat-wk Jun 16, 2023
c42570a
Update deps
hunterbreathat-wk Jun 16, 2023
307ffc1
Update deps
hunterbreathat-wk Jun 16, 2023
11a9074
Update deps
hunterbreathat-wk Jun 16, 2023
4135ecb
Update deps....
hunterbreathat-wk Jun 16, 2023
5b4760f
Update deps....
hunterbreathat-wk Jun 16, 2023
09a986f
Tweak workflow, move dependency_validator config
hunterbreathat-wk Jun 20, 2023
03be47a
Bump min to 2.18.7
hunterbreathat-wk Jun 20, 2023
800e38f
Tweaking pubspec
hunterbreathat-wk Jun 20, 2023
1441d03
Resolve dependency issues
hunterbreathat-wk Jun 20, 2023
f3bf23e
Resolve dependency issues
hunterbreathat-wk Jun 20, 2023
98130a8
Fix dart_dependency_validator
hunterbreathat-wk Jun 20, 2023
4b7f25b
Tweaks to react version and remove null safe check
hunterbreathat-wk Jun 20, 2023
010d5a2
(Test) Changes related to core lib
hunterbreathat-wk Jun 20, 2023
0d33b34
(Test) Misc remaining fixes
hunterbreathat-wk Jun 20, 2023
aeb4111
(Test) Fix temp override
hunterbreathat-wk Jun 20, 2023
551be17
(Test) Fix analyzer warning
hunterbreathat-wk Jun 20, 2023
b8df980
(Test) Fix analyzer warning...
hunterbreathat-wk Jun 20, 2023
efc89c7
Update react-dart null safety branch, adjust errors and ref typings
greglittlefield-wf Aug 25, 2023
e1ace93
Clean up casts and nullability in getProps
greglittlefield-wf Aug 25, 2023
cff04d5
Disable spike validateRequiredProps implementation
greglittlefield-wf Aug 29, 2023
fa13972
Fix casts to non-nullable values, enable lint
greglittlefield-wf Aug 29, 2023
6ce859d
Commit generated code
greglittlefield-wf Aug 29, 2023
bbe7a77
Fix CssValue.parse handling of non-finite num values
greglittlefield-wf Aug 29, 2023
f01a402
Fix bad casts in AbstractTransition tests
greglittlefield-wf Aug 29, 2023
f4cd005
Remove function casts added by migrator tool that are either incorrec…
greglittlefield-wf Aug 29, 2023
9287ee5
Fix errors after removing casts
greglittlefield-wf Aug 29, 2023
84f954c
Fix nullability of flux actions in test fixture and examples
greglittlefield-wf Aug 29, 2023
44e2466
Fix some typing in prop conversion and its tests
greglittlefield-wf Aug 29, 2023
809d427
Revert dummy_component2 changes, add note about why it's generated
greglittlefield-wf Aug 29, 2023
fd4d839
Check in forgotten dummy_component2 generated file
greglittlefield-wf Aug 29, 2023
371c05c
Update getPropKey tests to reflect new implementation
greglittlefield-wf Aug 29, 2023
a51b2cf
Fix more tests
greglittlefield-wf Aug 30, 2023
2ed7a1a
Sync ref APIs with react-dart, update usages
greglittlefield-wf Aug 30, 2023
825895e
Fix cast_nullable_to_non_nullable warnings in tests
greglittlefield-wf Aug 30, 2023
cf345d4
Remove unused import
greglittlefield-wf Aug 30, 2023
a174582
Fix remaining cast_nullable_to_non_nullable warnings
greglittlefield-wf Aug 31, 2023
57e0e1f
Fix broken propTypes due to out-of-sync JS wrapper with incorrect arg…
greglittlefield-wf Aug 31, 2023
26553dc
Fix connect not working with `null` state, use type alias
greglittlefield-wf Aug 31, 2023
4ffbee7
Clean up noisy test output
greglittlefield-wf Aug 31, 2023
b5ea8e6
Clean up noisy test output
greglittlefield-wf Aug 31, 2023
ab0ade7
Upgrade Dockerfile Dart version
greglittlefield-wf Sep 5, 2023
3848103
Upgrade Dockerfile Dart version
greglittlefield-wf Sep 5, 2023
b28c80e
Update Component2Bridge call with new nullability
greglittlefield-wf Sep 13, 2023
2039a4e
Fix getDebugNameForDartComponent
greglittlefield-wf Sep 13, 2023
1d4262a
Reinstate `?? null` in generated accessors until we work around the u…
greglittlefield-wf Oct 6, 2023
db6e6e7
Update generated code
greglittlefield-wf Oct 6, 2023
31ec0ab
Merge remote-tracking branch 'origin/master' into null-safety
greglittlefield-wf Oct 10, 2023
6b755e8
Update generated code
greglittlefield-wf Oct 10, 2023
09bb9e7
Remove dart_dev override, re-enable dart_dev
greglittlefield-wf Oct 10, 2023
c4f62fd
Remove unused built_redux dependency
greglittlefield-wf Oct 10, 2023
ec4bca4
Clean up nullabilities
greglittlefield-wf Oct 10, 2023
c06c231
Clean up import
greglittlefield-wf Oct 10, 2023
4254fe4
Merge branch 'prepare-for-react-dart-v7' into null-safety
greglittlefield-wf Oct 10, 2023
e772873
Clean up nullability in builder code
greglittlefield-wf Oct 11, 2023
5f3ccf6
Fix typing of firstWhereType
greglittlefield-wf Oct 11, 2023
1f699b8
Clean up non-null assertions on codegen fields sourceFile/outputConte…
greglittlefield-wf Oct 11, 2023
da70d64
Clean up nullability
greglittlefield-wf Oct 11, 2023
7ee39a5
Update MissingRequiredProp after upgrading to analyzer 5
greglittlefield-wf Oct 12, 2023
c6ac61a
Clean up analyzer_plugin ignores now that the over_react builder is n…
greglittlefield-wf Oct 12, 2023
b01e498
Migrate test and tool entry points to null safety
greglittlefield-wf Oct 12, 2023
52573f1
Re-enable diagnostics that imported non-null-safe builder code
greglittlefield-wf Oct 13, 2023
e688b3f
Merge remote-tracking branch 'origin/master' into null-safety
greglittlefield-wf Oct 13, 2023
a78586e
Update react-dart branch
greglittlefield-wf Oct 16, 2023
c7d94ff
Reenable type overrides since tests currently expect them
greglittlefield-wf Oct 16, 2023
510f294
Conditionally output Accessor arguments to match old generation
greglittlefield-wf Oct 16, 2023
5fa0d13
Opt existing test cases with gold files out of null safe generation
greglittlefield-wf Oct 16, 2023
ccc0b84
Fix inverted boolean typo
greglittlefield-wf Oct 16, 2023
4c0f4e7
Fix accidentally removed `annotationCount++`
greglittlefield-wf Oct 16, 2023
16bb496
Update generated code after PropDescriptor argument changes
greglittlefield-wf Oct 16, 2023
903a8b1
Update generated code after restoring types in accessor overrides
greglittlefield-wf Oct 16, 2023
406432e
Clean up null safety in redux dev tools middleware
greglittlefield-wf Nov 13, 2023
bf4d91d
Clean up spike implementations, update FIXMEs
greglittlefield-wf Nov 13, 2023
6f20410
Point to released react
greglittlefield-wf Nov 13, 2023
e7e0069
Clean up non-null assertion operators
greglittlefield-wf Nov 13, 2023
f98bbfa
Clean up nullable iterable check
greglittlefield-wf Nov 13, 2023
c86e202
Make dom/aria helpers `late final`
greglittlefield-wf Nov 13, 2023
222bbea
Fix generic parameter nullability
greglittlefield-wf Nov 13, 2023
fdf11a3
Make cloneElement argument non-nullable
greglittlefield-wf Nov 13, 2023
8541686
Fix weird casting
greglittlefield-wf Nov 13, 2023
cf2148c
Make TActions arguments in connect callbacks not nullable
greglittlefield-wf Nov 13, 2023
118b145
Get on null-safe w_flux, update Action usages
greglittlefield-wf Nov 13, 2023
97e6216
Clean up missing required prop spike
greglittlefield-wf Nov 13, 2023
5952428
Remove outdated FIXME
greglittlefield-wf Nov 13, 2023
2780838
Clean up required props validation spike code
greglittlefield-wf Nov 13, 2023
fbc30d4
Clean up example / test Action class nullability
greglittlefield-wf Nov 13, 2023
7132160
Clean up LHS types added by migrator
greglittlefield-wf Nov 14, 2023
3939b10
Clean up nullability in examples
greglittlefield-wf Nov 14, 2023
b47f2e3
Clean up validateRequiredProps more
greglittlefield-wf Nov 14, 2023
5779ef9
Revert accidental changes
greglittlefield-wf Nov 14, 2023
0e5145b
Remove bad cast
greglittlefield-wf Nov 14, 2023
199feb4
Clean up closest impl, make more optimal, null-safe
greglittlefield-wf Nov 14, 2023
9644fb4
Clean up empty lines from language version comments
greglittlefield-wf Nov 14, 2023
f987644
Revert ReactElement return types made nullable by migrator
greglittlefield-wf Nov 14, 2023
8057d39
Remove unnecessary ReactElement typings added by migrator
greglittlefield-wf Nov 14, 2023
71a2dc5
Clean up SafeRenderManager tests nullability
greglittlefield-wf Nov 14, 2023
f5879d1
Clean up unnecessary LHS function types added by migrator
greglittlefield-wf Nov 14, 2023
2ee5ba9
Fix handler chaining nullability
greglittlefield-wf Nov 14, 2023
fab842c
Add WIP 5.0.0 changelog entry
greglittlefield-wf Nov 14, 2023
dcf2bca
Merge remote-tracking branch 'origin/master' into null-safety
greglittlefield-wf Nov 14, 2023
363dade
Eliminate a few more non-null assertion operators
greglittlefield-wf Nov 14, 2023
23904de
Fix some lints
greglittlefield-wf Nov 15, 2023
db01841
Fix test expectation
greglittlefield-wf Nov 15, 2023
46c8e35
Fix react_dom.render typing
greglittlefield-wf Nov 17, 2023
85f4c9c
Clean up unnecessary LHS types (props/state, final variables)
greglittlefield-wf Nov 17, 2023
51f47d0
Clean up unnecessary LHS types (props/state, var variables)
greglittlefield-wf Nov 17, 2023
e514c58
Clean up unnecessary LHS types (ReactElement, final variables)
greglittlefield-wf Nov 17, 2023
102af7b
Clean up unnecessary LHS types (ReactElement, non-final variables)
greglittlefield-wf Nov 17, 2023
d824d5e
Clean up more LHS types
greglittlefield-wf Nov 17, 2023
03cbec8
Remove deprecated displayName arguments
greglittlefield-wf Nov 20, 2023
a1ce8a5
Clean up FIXME comments
greglittlefield-wf Nov 20, 2023
b123072
Address fixme in test
greglittlefield-wf Nov 20, 2023
72b7783
Ensure null node doesn't cause false positives with isNot assertions
greglittlefield-wf Nov 20, 2023
afb5267
Clean up typings
greglittlefield-wf Nov 20, 2023
1ee7435
Remove test for removed displayName arg
greglittlefield-wf Nov 20, 2023
128567f
Clean up nullabilities in resize sensor tests
greglittlefield-wf Nov 20, 2023
1b8eea5
Make test variables non-nullable
greglittlefield-wf Nov 20, 2023
c3e6ee4
Use a fresh ref each time
greglittlefield-wf Nov 20, 2023
9c2b4de
Test improvements: avoid false positives, clean up connectOptions, fi…
greglittlefield-wf Nov 20, 2023
c533529
Update FIXME comment
greglittlefield-wf Nov 20, 2023
5b56c14
Revert unnecessary action arguments
greglittlefield-wf Nov 20, 2023
8ded99d
Clean up unnecessary types added by migrator
greglittlefield-wf Nov 20, 2023
5e82f0c
Clean up BoilerplateMembersHelper nullability and usage in tests
greglittlefield-wf Nov 20, 2023
46314cc
Clean up test shared variables and getBoilerplateMembersFromString nu…
greglittlefield-wf Nov 20, 2023
92f7e5a
Clean up more shared variables and null-checks
greglittlefield-wf Nov 20, 2023
e91e8e9
Clean up nullabilities in connect_test
greglittlefield-wf Nov 20, 2023
468b948
Clean up some more nullable shared test variables
greglittlefield-wf Nov 20, 2023
8a37dcb
Fix useSelector nullability, beef up test expectation
greglittlefield-wf Nov 20, 2023
2034128
Add comment amount componentFactory nullability, add doc comment
greglittlefield-wf Nov 20, 2023
02eb3f3
Improve nullable callback prop calls in tests
greglittlefield-wf Nov 20, 2023
c978df3
Make some test component props non-nullable
greglittlefield-wf Nov 20, 2023
94d4d6b
Clean up test ! operators
greglittlefield-wf Nov 28, 2023
a15bd8f
Clean up fixmes and comments in required prop diagnostic
greglittlefield-wf Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .github/workflows/dart_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ jobs:
name: Build generated files / precompile DDC assets
run: |
dart run build_runner build --delete-conflicting-outputs -o ddc_precompiled
if: always() && steps.install.outcome == 'success'

- name: Verify that generated files are up-to-date
run: |
if [ ${{ matrix.sdk }} = '2.18.7' ]; then
git diff --exit-code
else
# Don't check these generated files for other SDKs, since they may generate differently
# due to different resolved dependencies.
git diff --exit-code -- ":(exclude)test/mockito.mocks.dart" ":(exclude)test/over_react/component_declaration/redux_component_test/test_reducer.g.dart"
fi
if: always() && steps.install.outcome == 'success'
if: always() && steps.install.outcome == 'success' && steps.install.build == 'success'

# Analyze again after generated files are created to verify that those generated classes don't cause analysis errors
- name: Analyze project source (post-build)
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# OverReact Changelog

## 5.0.0 (unreleased, work in progress)
- Migrate to null safety
- Support generating code for null-safe libraries (while retaining support for non-null-safe libraries)
- Add ability to declare required, optionally-non-nullable props and state fields via `late`

#### Analyzer plugin
- Add new lint, `over_react_required_prop`
- Warns for missing `late` required props
- Hints for missing `@requiredProp` required props (these are deprecated in favor of `late`)
- Reinstate functionality disabled in over_react 4.8.3. Since newer Dart SDKs require sound null safety in analyzer plugins, this code couldn't be run since it depended on over_react code, which was not itself null safe.
- Diagnostics (AKA lints)
- `over_react_boilerplate_error`, `over_react_boilerplate_warning`
- `over_react_incorrect_doc_comment_location`
- Assist for toggling class component statefulness

### Breaking changes
- API removals:
- BuiltReduxUiComponent
- forwardRef (not to be confused with `uiForwardRef`)
- registerComponent and registerComponent2 `displayName` argument
- The following props classes can no longer be extended or instantiated directly (like most components). To instantiate them, use the factory instead.
- FragmentProps
- StrictModeProps
- ReduxProviderProps (for extension, mix in ReduxProviderPropsMixin instead)
- `PropsMeta`/`StateMeta` constructor arguments `fields` and `keys` are now required

## [4.10.3](https://github.com/Workiva/over_react/compare/4.10.2...4.10.3)
- [#846] Update internals to prepare for react-dart 7.0.0

Expand Down
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ analyzer:
# Workaround for https://github.com/dart-lang/sdk/issues/51087
# TODO remove once we can run on Dart 2.19 (blocked by https://github.com/dart-lang/sdk/issues/51128 or working around it by upgrading to analyzer ^5.1.0)
part_of_different_library: ignore
cast_nullable_to_non_nullable: warning
linter:
rules:
cast_nullable_to_non_nullable: true
# -------------------
# Pedantic
# -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ main() {
for (var todo in component.props.todos) {
final listItemComponent = getComponentByTestId(displayListInstance, 'todo_client.TodoListItem.${todo.id}');
expect(listItemComponent, isA<TodoListItemComponent>());
TodoListItemProps props = listItemComponent.props;
var props = listItemComponent.props;
expect(props.model, todo);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ main() {
for (var user in component.props.users) {
final listItemComponent = getComponentByTestId(displayListInstance, 'todo_client.UserListItem.${user.id}');
expect(listItemComponent, isA<UserListItemComponent>());
UserListItemProps props = listItemComponent.props;
var props = listItemComponent.props;
expect(props.model, user);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ main() {
expect(emptyListInstance, isNotNull);
expect(getDartComponent(emptyListInstance), isA<EmptyViewComponent>());

EmptyViewProps emptyViewProps = getDartComponent(emptyListInstance).props;
var emptyViewProps = getDartComponent(emptyListInstance).props;
expect(emptyViewProps.type, EmptyViewType.VBLOCK);
expect(emptyViewProps.header, 'No ${jacket.getDartInstance().props.listItemTypeDescription} to show');
expect(emptyViewProps.glyph, isNotNull);
Expand Down
10 changes: 0 additions & 10 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ targets:
# checked in.
- "example/boilerplate_versions/dart2_only/**"

built_value_generator|built_value:
generate_for:
include:
- test/over_react/component_declaration/redux_component_test/test_reducer.dart

built_redux|built_redux:
generate_for:
include:
- test/over_react/component_declaration/redux_component_test/test_reducer.dart

Comment on lines -58 to -67
Copy link
Contributor

Choose a reason for hiding this comment

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

Hallelujah

# build_vm_compilers|entrypoint:
# generate_for:
# include:
Expand Down
6 changes: 6 additions & 0 deletions dart_dependency_validator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
exclude:
- app/**
- tools/**
ignore:
- mockito
allow_pins: true
12 changes: 12 additions & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@ presets:

travis:
reporter: expanded

tags:
# Tests that should only run in DDC (Dart Dev Compiler, AKA dartdevc).
ddc: {}
# Tests that should only run in dart2js.
no-ddc: {}
# Tests that can pass in DDC even if something goes wrong;
# these tests must be run in dart2js in order to properly validate behavior.
ddc-false-positive: {}
# Tests that represent a case of undesirable JS interop behavior that's
# either unavoidable or exists as a tradeoff for improved behavior in other cases.
js-interop-tradeoff: {}
12 changes: 6 additions & 6 deletions example/boilerplate_versions/backwards_compatible/basic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class BasicProps extends _$BasicProps with _$BasicPropsAccessorsMixin {
class _$BasicProps extends UiProps {
@Deprecated('This is deprecated')
@requiredProp
String basicProp;
String? basicProp;

String basic1;
String basic2;
String basic3;
String basic4;
String basic5;
String? basic1;
String? basic2;
String? basic3;
String? basic4;
String? basic5;
}

@Component()
Expand Down
12 changes: 6 additions & 6 deletions example/boilerplate_versions/dart2_only/basic_component1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ UiFactory<BasicProps> Basic = _$Basic; // ignore: undefined_identifier, invalid_
class _$BasicProps extends UiProps {
@Deprecated('This is deprecated')
@requiredProp
String basicProp;
String? basicProp;

String basic1;
String basic2;
String basic3;
String basic4;
String basic5;
String? basic1;
String? basic2;
String? basic3;
String? basic4;
String? basic5;
}

@Component()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions example/boilerplate_versions/dart2_only/basic_component2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ UiFactory<BasicProps> Basic = _$Basic; // ignore: undefined_identifier, invalid_
class _$BasicProps extends UiProps {
@Deprecated('This is deprecated')
@requiredProp
String basicProp;
String? basicProp;

String basic1;
String basic2;
String basic3;
String basic4;
String basic5;
String? basic1;
String? basic2;
String? basic3;
String? basic4;
String? basic5;
}

@Component2()
Expand Down
Loading
Loading