Files
sdk/pkg/front_end/benchmarks
Robert Nystrom 8a9fb7ca07 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: https://github.com/dart-lang/sdk/issues/56687

Change-Id: If29188df479c7b41beb68ac889d56be13a395a16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389622
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-10-11 07:43:30 +00:00
..