Commit 8a9fb7c
Pass in a language version when calling the formatter.
There is an upcoming version of dart_style that makes this argument
required, so every DartFormatter() constructor callsite needs to pass
it in. These are the last two I could find in the Dart SDK.
I'm not familiar with the surrounding code, but I believe passing in
DartFormatter.latestLanguage version will do the right thing:
* For the benchmark script, that's generated code that we will always
want to be valid on the latest version of Dart.
* For the text_outline_suite, my understanding is that CFE tests that
require older language versions always use the "// @Dart=x.y" comment
to opt in to that version. Those comments are also respected by the
formatter and override the languageVersion argument passed to the
constructor. So I think passing in latestSupportedVersion will do the
right thing.
Bug: #56687
Change-Id: If29188df479c7b41beb68ac889d56be13a395a16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389622
Commit-Queue: Johnni Winther <[email protected]>
Auto-Submit: Bob Nystrom <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>1 parent a99556b commit 8a9fb7c
File tree
2 files changed
+10
-2
lines changed- pkg/front_end
- benchmarks/patterns
- test/fasta
2 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
| |||
0 commit comments