[tools] Run pub get before format (#8052)

The new Dart formatter needs to know the Dart language version of the
code it is formatting, and it reads that from a file in `.dart_tool`,
not `pubspec.yaml` directly. To avoid it failing to determine the
version and assuming the latest (which will almost always be wrong in
this repo):
- Adds a step to the `format` repo command to ensure that `pub get`
appears to have been run, and runs it if not, and
- To avoid `pub get` running in `format` in CI, adds a deps-fetching
step to the `repo_checks` task, as we have in other tasks that need to
`pub get`.

This should unblock the roll.
This commit is contained in:
stuartmorgan
2024-11-11 14:55:30 -05:00
committed by GitHub
parent d681e4e404
commit df0f423184
5 changed files with 90 additions and 18 deletions

View File

@ -115,6 +115,7 @@ void main() {
'GeneratedPluginRegistrant.m',
'generated_plugin_registrant.cc',
'generated_plugin_registrant.cpp',
'web_plugin_registrant.dart',
// Ignored path suffixes.
'foo.g.dart',
'foo.mocks.dart',