From 7b8a3c1bcda5985740feac88e454cae8e4a038ce Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Mon, 4 Oct 2021 12:17:27 -0700 Subject: [PATCH] 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. --- dev/bots/docs.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/bots/docs.sh b/dev/bots/docs.sh index 49029483c3..d5338aa492 100755 --- a/dev/bots/docs.sh +++ b/dev/bots/docs.sh @@ -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)