Update to full Dart 3.10#179
Conversation
There was a problem hiding this comment.
Only dart format changes
There was a problem hiding this comment.
The only dart file with changes that aren't just formatting
| ActionsClass _actionsClassFromElement(ClassElement element, bool nndbEnabled) => | ||
| ActionsClass( | ||
| element.name, | ||
| element.name!, |
| bool nndbEnabled, | ||
| ) => element.fields | ||
| .where((f) => _isReduxActions(f.type.element)) | ||
| .map((f) => ComposedActionClass(f.name!, f.type.getDisplayString())); |
There was a problem hiding this comment.
👀
Note the ! and the removal of withNullability: nndbEnabled
| .map((s) => s.element is ClassElement ? s.element : null) | ||
| .whereType<ClassElement>() | ||
| .where(_isReduxActions) | ||
| .map((it) => _actionsClassFromElement(it, nndbEnabled)); |
| '${element.name!}-${field.name!}', | ||
| field.name!, |
| final fragment = field.firstFragment; | ||
| return _getGenerics( | ||
| fragment.libraryFragment.source.contents.data, | ||
| fragment.nameOffset!, | ||
| ); |
There was a problem hiding this comment.
field.source and field.nameOffset are gone ... so now we're calling those on field.firstFragment.
| final method = element.getGetter(field.name!); | ||
| final fragment = method!.firstFragment; | ||
| return _getGenerics( | ||
| fragment.libraryFragment.source.contents.data, | ||
| fragment.nameOffset!, | ||
| ); |
There was a problem hiding this comment.
same where with the deprecation removals
| final trimBeforeActionDispatcher = | ||
| trimAfterName.substring(trimAfterName.lastIndexOf('ActionDispatcher')); | ||
| final trimBeforeActionDispatcher = trimAfterName.substring( | ||
| trimAfterName.lastIndexOf('ActionDispatcher'), | ||
| ); | ||
| return trimBeforeActionDispatcher.substring( | ||
| trimBeforeActionDispatcher.indexOf('<') + 1, | ||
| trimBeforeActionDispatcher.lastIndexOf('>')); | ||
| trimBeforeActionDispatcher.indexOf('<') + 1, | ||
| trimBeforeActionDispatcher.lastIndexOf('>'), | ||
| ); |
| element is ClassElement && _hasSuperType(element, 'ReduxActions'); | ||
|
|
||
| bool _isActionDispatcher(FieldElement element) => element.type | ||
| .getDisplayString(withNullability: true) |
There was a problem hiding this comment.
removed withNullability: true
| .any((interfaceType) => interfaceType.element.name == type) && | ||
| classElement.allSupertypes.any( | ||
| (interfaceType) => interfaceType.element.name == type, | ||
| ) && |
| ActionsClass actionsClass, | ||
| ) => element.constructors.length > 1 | ||
| ? _actionDispatcherClassTemplate(actionsClass) | ||
| : ''; |
|
|
||
| String _actionDispatcherClassTemplate(ActionsClass actionsClass) => ''' | ||
| String _actionDispatcherClassTemplate(ActionsClass actionsClass) => | ||
| ''' |
There was a problem hiding this comment.
here and all below is just formatting changes
| var hasWrittenHeaders = false; | ||
| final nndbEnabled = await buildStep.inputLibrary | ||
| .then((value) => value.featureSet.isEnabled(Feature.non_nullable)); | ||
| final nndbEnabled = await buildStep.inputLibrary.then( |
There was a problem hiding this comment.
#nit If this version only supports Dart >=3, then this will always be true, and could be removed
|
QA +1 CI passes under Dart 3.10.9. Manual testing passes. |
|
@Workiva/release-management-p |
Summary
Update to Dart 3.10.9, analyzer 10, and latest build packages
QA