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

Use latest language version for DartFormatter #3875

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions lib/src/generator/templates.runtime_renderers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15901,13 +15901,18 @@ const _invisibleGetters = {
'accessors',
'classes',
'enclosingElement',
'enclosingElement3',
'enums',
'extensionTypes',
'extensions',
'functions',
'hashCode',
'libraryExports',
'libraryImportPrefixes',
'libraryImports',
'lineInfo',
'mixins',
'parts',
'runtimeType',
'session',
'topLevelVariables',
Expand All @@ -15925,6 +15930,7 @@ const _invisibleGetters = {
'declaration',
'displayName',
'enclosingElement',
'enclosingElement3',
'hashCode',
'isConst',
'isDefaultConstructor',
Expand Down Expand Up @@ -16040,6 +16046,7 @@ const _invisibleGetters = {
'displayName',
'documentationComment',
'enclosingElement',
'enclosingElement3',
'hasAlwaysThrows',
'hasDeprecated',
'hasDoNotStore',
Expand Down Expand Up @@ -16095,11 +16102,15 @@ const _invisibleGetters = {
'ExecutableMember': {
'augmentationSubstitution',
'children',
'children3',
'context',
'declaration',
'displayName',
'documentationComment',
'element',
'enclosingElement',
'enclosingElement3',
'enclosingFragment',
'hasAlwaysThrows',
'hasDeprecated',
'hasDoNotStore',
Expand Down Expand Up @@ -16145,14 +16156,18 @@ const _invisibleGetters = {
'isSynthetic',
'kind',
'library',
'libraryFragment',
'librarySource',
'location',
'metadata',
'name',
'nameLength',
'nameOffset',
'nextFragment',
'nonSynthetic',
'parameters',
'parameters2',
'previousFragment',
'returnType',
'runtimeType',
'session',
Expand Down Expand Up @@ -16318,6 +16333,7 @@ const _invisibleGetters = {
},
'Kind': {'hashCode', 'index', 'runtimeType'},
'LibraryElement': {
'enclosingElement3',
'entryPoint',
'exportNamespace',
'exportedLibraries',
Expand Down Expand Up @@ -16363,6 +16379,7 @@ const _invisibleGetters = {
'displayName',
'documentationComment',
'enclosingElement',
'enclosingElement3',
'hasAlwaysThrows',
'hasDeprecated',
'hasDoNotStore',
Expand Down Expand Up @@ -16512,6 +16529,7 @@ const _invisibleGetters = {
'displayName',
'documentationComment',
'enclosingElement',
'enclosingElement3',
'hasAlwaysThrows',
'hasDefaultValue',
'hasDeprecated',
Expand Down Expand Up @@ -16581,6 +16599,7 @@ const _invisibleGetters = {
'correspondingSetter',
'declaration',
'enclosingElement',
'enclosingElement3',
'hashCode',
'isGetter',
'isSetter',
Expand Down Expand Up @@ -16611,6 +16630,7 @@ const _invisibleGetters = {
'aliasedElement',
'aliasedType',
'enclosingElement',
'enclosingElement3',
'hashCode',
'isAugmentation',
'name',
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:

dev_dependencies:
async: ^2.11.0
dart_style: ^2.3.4
dart_style: ^2.3.7
lints: ^4.0.0
matcher: ^0.12.15
test: ^1.24.2
Expand Down
3 changes: 2 additions & 1 deletion tool/mustachio/codegen_aot_compiler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Future<String> compileTemplatesToRenderers(
buffer.writeln();
buffer.writeln();
}
return DartFormatter().format('''
return DartFormatter(languageVersion: DartFormatter.latestLanguageVersion)
.format('''
// GENERATED CODE. DO NOT EDIT.
//
// To change the contents of this library, make changes to the builder source
Expand Down
3 changes: 2 additions & 1 deletion tool/mustachio/codegen_runtime_renderer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ String buildRuntimeRenderers(Set<RendererSpec> specs, Uri sourceUri,
sourceUri, typeProvider, typeSystem, visibleElements,
rendererClassesArePublic: rendererClassesArePublic)
._buildTemplateRenderers(specs);
return DartFormatter().format(raw);
return DartFormatter(languageVersion: DartFormatter.latestLanguageVersion)
.format(raw);
}

/// This class builds runtime Mustache renderers from a set of [RendererSpec]s.
Expand Down