Force building of snippets package executable. (#91110)

This fixes an issue with the Dart Head-Head-Head CI bot, where it was seeing failures because of concurrent execution of the snippets tool.

It adds a single run of the snippets tool right after activation to force the compiling of the package executable, which is what has trouble with concurrent invocation.

This is a temporary measure until dart pub global run is fixed.
This commit is contained in:
Greg Spencer 2021-10-04 12:17:27 -07:00 committed by GitHub
parent fd9ce27748
commit 7b8a3c1bcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,11 @@ function generate_docs() {
# >>> If you update this version, also update it in dev/bots/analyze_sample_code.dart <<<
"$DART" pub global activate snippets 0.2.5
# Run the snippets tool once to force building of the package executable,
# since "dart pub global run" has issues with startup concurrency.
# TODO(gspencergoog): Remove once pub issue is fixed, https://github.com/dart-lang/pub/issues/3165
"$DART" pub global run snippets --help
# This script generates a unified doc set, and creates
# a custom index.html, placing everything into dev/docs/doc.
(cd "$FLUTTER_ROOT/dev/tools" && "$FLUTTER" pub get)