Manual roll (non-trivial) of new path implementation

Changelog:
dart:
  f8e5770 Manual non-trivial roll (athom@google.com)

recipe_engine:
  https://crrev.com/d93bcdd661d27c0f32570c24c287781e2ed9bbbe [config_types.Path] Refactor Path implementation. (iannucci@chromium.org)

fuchsia:
  0470115 Roll recipe dependencies (nontrivial).

Change-Id: I370c5a974d536eadcd79b82d5e50a04c77852481
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/59380
Reviewed-by: Christopher Fujino <fujino@google.com>
diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg
index 5a60f05..21d6661 100644
--- a/infra/config/recipes.cfg
+++ b/infra/config/recipes.cfg
@@ -21,7 +21,7 @@
   "deps": {
     "dart": {
       "branch": "refs/heads/main",
-      "revision": "ffdec8ffdc465def7ff87dc0a1fdc08adb74052a",
+      "revision": "f8e5770220ff6c11cebe32549f5006980404a6c4",
       "url": "https://dart.googlesource.com/recipes.git"
     },
     "depot_tools": {
@@ -31,18 +31,18 @@
     },
     "fuchsia": {
       "branch": "refs/heads/main",
-      "revision": "9c9778f2cdbd523e5469b0eeb7eb8040d8e83802",
+      "revision": "04701157720db1dec673c6da00f6974e9b1b5ba8",
       "url": "https://fuchsia.googlesource.com/infra/recipes.git"
     },
     "recipe_engine": {
       "branch": "refs/heads/main",
-      "revision": "09ec4880906a6aae1e8adc63212bd1259a817983",
+      "revision": "d93bcdd661d27c0f32570c24c287781e2ed9bbbe",
       "url": "https://chromium.googlesource.com/infra/luci/recipes-py.git"
     }
   },
+  "enforce_test_expected_status": true,
   "no_docs": true,
   "project_id": "flutter",
   "py3_only": true,
-  "repo_name": "flutter",
-  "enforce_test_expected_status": true
+  "repo_name": "flutter"
 }
diff --git a/recipe_modules/archives/examples/full.expected/monorepo_ci.json b/recipe_modules/archives/examples/full.expected/monorepo_ci.json
index ae890b0..ffccbef 100644
--- a/recipe_modules/archives/examples/full.expected/monorepo_ci.json
+++ b/recipe_modules/archives/examples/full.expected/monorepo_ci.json
@@ -36,7 +36,7 @@
       "rev-parse",
       "HEAD"
     ],
-    "cwd": "[START_DIR]/../../monorepo",
+    "cwd": "[START_DIR]/monorepo",
     "infra_step": true,
     "luci_context": {
       "realm": {
diff --git a/recipe_modules/archives/examples/full.expected/monorepo_ci_experimental_realm.json b/recipe_modules/archives/examples/full.expected/monorepo_ci_experimental_realm.json
index ae890b0..ffccbef 100644
--- a/recipe_modules/archives/examples/full.expected/monorepo_ci_experimental_realm.json
+++ b/recipe_modules/archives/examples/full.expected/monorepo_ci_experimental_realm.json
@@ -36,7 +36,7 @@
       "rev-parse",
       "HEAD"
     ],
-    "cwd": "[START_DIR]/../../monorepo",
+    "cwd": "[START_DIR]/monorepo",
     "infra_step": true,
     "luci_context": {
       "realm": {
diff --git a/recipe_modules/archives/examples/global_generator_paths.expected/monorepo_ci.json b/recipe_modules/archives/examples/global_generator_paths.expected/monorepo_ci.json
index ad05583..d7bcd50 100644
--- a/recipe_modules/archives/examples/global_generator_paths.expected/monorepo_ci.json
+++ b/recipe_modules/archives/examples/global_generator_paths.expected/monorepo_ci.json
@@ -5,7 +5,7 @@
       "rev-parse",
       "HEAD"
     ],
-    "cwd": "[START_DIR]/src/../../monorepo",
+    "cwd": "[START_DIR]/monorepo",
     "infra_step": true,
     "luci_context": {
       "realm": {
diff --git a/recipe_modules/archives/examples/global_generator_paths.py b/recipe_modules/archives/examples/global_generator_paths.py
index ce93de4..3859628 100644
--- a/recipe_modules/archives/examples/global_generator_paths.py
+++ b/recipe_modules/archives/examples/global_generator_paths.py
@@ -18,7 +18,10 @@
 
 
 def RunSteps(api):
-  checkout = api.path['start_dir'].join('src')
+  checkout = api.path['start_dir']
+  if api.monorepo.is_monorepo:
+    checkout = checkout / 'monorepo'
+  checkout = checkout / 'src'
   archives = [{
       "source": "out/debug/artifacts.zip",
       "destination": "ios/artifacts.zip",
@@ -71,38 +74,38 @@
   ]
   expected_monorepo_results = [
       ArchivePaths(
-          local=str(api.path['start_dir'].join('src/out/debug/artifacts.zip')),
+          local=str(api.path['start_dir'].join('monorepo/src/out/debug/artifacts.zip')),
           remote='gs://flutter_archives_v2/monorepo/123/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/ios/artifacts.zip'
       ),
       ArchivePaths(
           local=str(
               api.path['start_dir']
-              .join('src/out/release-nobitcode/Flutter.dSYM.zip')
+              .join('monorepo/src/out/release-nobitcode/Flutter.dSYM.zip')
           ),
           remote='gs://flutter_archives_v2/monorepo/123/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/ios-release-nobitcode/Flutter.dSYM.zip'
       ),
       ArchivePaths(
           local=str(
-              api.path['start_dir'].join('src/out/release/Flutter.dSYM.zip')
+              api.path['start_dir'].join('monorepo/src/out/release/Flutter.dSYM.zip')
           ),
           remote='gs://flutter_archives_v2/monorepo/123/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/ios-release/Flutter.dSYM.zip'
       )
   ]
   expected_monorepo_try_results = [
       ArchivePaths(
-          local=str(api.path['start_dir'].join('src/out/debug/artifacts.zip')),
+          local=str(api.path['start_dir'].join('monorepo/src/out/debug/artifacts.zip')),
           remote='gs://flutter_archives_v2/monorepo_try/123/flutter_infra_release/flutter/123/ios/artifacts.zip'
       ),
       ArchivePaths(
           local=str(
               api.path['start_dir']
-              .join('src/out/release-nobitcode/Flutter.dSYM.zip')
+              .join('monorepo/src/out/release-nobitcode/Flutter.dSYM.zip')
           ),
           remote='gs://flutter_archives_v2/monorepo_try/123/flutter_infra_release/flutter/123/ios-release-nobitcode/Flutter.dSYM.zip'
       ),
       ArchivePaths(
           local=str(
-              api.path['start_dir'].join('src/out/release/Flutter.dSYM.zip')
+              api.path['start_dir'].join('monorepo/src/out/release/Flutter.dSYM.zip')
           ),
           remote='gs://flutter_archives_v2/monorepo_try/123/flutter_infra_release/flutter/123/ios-release/Flutter.dSYM.zip'
       )
diff --git a/recipe_modules/build_util/examples/full.expected/win.json b/recipe_modules/build_util/examples/full.expected/win.json
index a370c1d..0bf02ba 100644
--- a/recipe_modules/build_util/examples/full.expected/win.json
+++ b/recipe_modules/build_util/examples/full.expected/win.json
@@ -192,7 +192,7 @@
   {
     "cmd": [
       "python3",
-      "[START_DIR]\\flutter/tools/gn",
+      "[START_DIR]\\flutter\\tools\\gn",
       "--no-lto"
     ],
     "env": {
@@ -373,7 +373,7 @@
       "-j",
       "200",
       "-C",
-      "[START_DIR]\\out/profile",
+      "[START_DIR]\\out\\profile",
       "mytarget"
     ],
     "env": {
@@ -521,7 +521,7 @@
   {
     "cmd": [
       "python3",
-      "[START_DIR]\\flutter/tools/gn",
+      "[START_DIR]\\flutter\\tools\\gn",
       "--no-goma",
       "--no-rbe",
       "--no-lto"
@@ -540,7 +540,7 @@
     "cmd": [
       "[START_DIR]\\flutter\\third_party\\ninja\\ninja",
       "-C",
-      "[START_DIR]\\out/release",
+      "[START_DIR]\\out\\release",
       "-j",
       "5",
       "mytarget"
diff --git a/recipes/engine_v2/builder.expected/monorepo.json b/recipes/engine_v2/builder.expected/monorepo.json
index f29eaab..981782d 100644
--- a/recipes/engine_v2/builder.expected/monorepo.json
+++ b/recipes/engine_v2/builder.expected/monorepo.json
@@ -2487,7 +2487,7 @@
       "rev-parse",
       "HEAD"
     ],
-    "cwd": "[CACHE]/builder/engine/src/../../monorepo",
+    "cwd": "[CACHE]/builder/monorepo",
     "env": {
       "ANDROID_HOME": "[CACHE]/builder/engine/src/third_party/android_tools/sdk",
       "ANDROID_SDK_HOME": "[CLEANUP]/tmp_tmp_2",
diff --git a/recipes/engine_v2/engine_v2.expected/basic_mac.json b/recipes/engine_v2/engine_v2.expected/basic_mac.json
index 57880cf..513413e 100644
--- a/recipes/engine_v2/engine_v2.expected/basic_mac.json
+++ b/recipes/engine_v2/engine_v2.expected/basic_mac.json
@@ -1654,7 +1654,7 @@
       }
     },
     "name": "Global generators.namelist",
-    "stdin": "{\"zip_file\": \"/a/b/c.txt\"}",
+    "stdin": "{\"zip_file\": \"[CACHE]/builder/src/a/b/c.txt\"}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@json.output (invalid)@@@",
@@ -1700,7 +1700,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "/a/b/c.txt",
+      "[CACHE]/builder/src/a/b/c.txt",
       "[CLEANUP]/tmp_tmp_3/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket"
     ],
     "infra_step": true,
@@ -1716,7 +1716,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.Copy /a/b/c.txt to tmp location",
+    "name": "Global generators.Copy [CACHE]/builder/src/a/b/c.txt to tmp location",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1747,7 +1747,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.gsutil Upload /a/b/c.txt to gs://flutter_archives_v2/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
+    "name": "Global generators.gsutil Upload [CACHE]/builder/src/a/b/c.txt to gs://flutter_archives_v2/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/flutter_archives_v2/@@@"
diff --git a/recipes/engine_v2/engine_v2.expected/basic_mac_dart_internal.json b/recipes/engine_v2/engine_v2.expected/basic_mac_dart_internal.json
index b7e882d..16939c1 100644
--- a/recipes/engine_v2/engine_v2.expected/basic_mac_dart_internal.json
+++ b/recipes/engine_v2/engine_v2.expected/basic_mac_dart_internal.json
@@ -1841,7 +1841,7 @@
       }
     },
     "name": "Global generators.namelist",
-    "stdin": "{\"zip_file\": \"/a/b/c.txt\"}",
+    "stdin": "{\"zip_file\": \"[CACHE]/builder/src/a/b/c.txt\"}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@json.output (invalid)@@@",
@@ -1887,7 +1887,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "/a/b/c.txt",
+      "[CACHE]/builder/src/a/b/c.txt",
       "[CLEANUP]/tmp_tmp_3/flutter/12345abcde12345abcde12345abcde12345abcde/bucket"
     ],
     "infra_step": true,
@@ -1903,7 +1903,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.Copy /a/b/c.txt to tmp location",
+    "name": "Global generators.Copy [CACHE]/builder/src/a/b/c.txt to tmp location",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1934,7 +1934,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.gsutil Upload /a/b/c.txt to gs://flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
+    "name": "Global generators.gsutil Upload [CACHE]/builder/src/a/b/c.txt to gs://flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/flutter_infra_release/@@@"
@@ -1948,7 +1948,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "file_hash",
-      "/a/b/c.txt"
+      "[CACHE]/builder/src/a/b/c.txt"
     ],
     "infra_step": true,
     "luci_context": {
@@ -1966,7 +1966,7 @@
     "name": "Global generators.Compute file hash",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_TEXT@Hash calculated: fad0b8af5e6cfa27a7e36870911c7d0dc60d034df1e50a368882f5d34b88a6ee@@@"
+      "@@@STEP_TEXT@Hash calculated: 21b19f47137ba277ec3f791c188884edc2af641f9d7efa45f2c8526ece03d08e@@@"
     ]
   },
   {
@@ -1974,7 +1974,7 @@
       "[START_DIR]/reporter/snoopy_broker",
       "-report-gcs",
       "-digest",
-      "fad0b8af5e6cfa27a7e36870911c7d0dc60d034df1e50a368882f5d34b88a6ee",
+      "21b19f47137ba277ec3f791c188884edc2af641f9d7efa45f2c8526ece03d08e",
       "-gcs-uri",
       "gs://flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt"
     ],
diff --git a/recipes/engine_v2/engine_v2.expected/codesign_release_branch.json b/recipes/engine_v2/engine_v2.expected/codesign_release_branch.json
index 37d48e3..80d78e4 100644
--- a/recipes/engine_v2/engine_v2.expected/codesign_release_branch.json
+++ b/recipes/engine_v2/engine_v2.expected/codesign_release_branch.json
@@ -2157,7 +2157,7 @@
       }
     },
     "name": "Global generators.namelist",
-    "stdin": "{\"zip_file\": \"/a/b/c.txt\"}",
+    "stdin": "{\"zip_file\": \"[CACHE]/builder/src/a/b/c.txt\"}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@json.output (invalid)@@@",
@@ -2183,7 +2183,7 @@
       }
     },
     "name": "Global generators.namelist (2)",
-    "stdin": "{\"zip_file\": \"/a/b/c.txt\"}",
+    "stdin": "{\"zip_file\": \"[CACHE]/builder/src/a/b/c.txt\"}",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@json.output (invalid)@@@",
@@ -3439,7 +3439,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "/a/b/c.txt",
+      "[CACHE]/builder/src/a/b/c.txt",
       "[CLEANUP]/tmp_tmp_4/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket"
     ],
     "infra_step": true,
@@ -3455,7 +3455,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.Copy /a/b/c.txt to tmp location",
+    "name": "Global generators.Copy [CACHE]/builder/src/a/b/c.txt to tmp location",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -3486,7 +3486,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.gsutil Upload /a/b/c.txt to gs://flutter_archives_v2/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
+    "name": "Global generators.gsutil Upload [CACHE]/builder/src/a/b/c.txt to gs://flutter_archives_v2/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/flutter_archives_v2/@@@"
diff --git a/recipes/engine_v2/engine_v2.expected/monorepo_config_file_tests.json b/recipes/engine_v2/engine_v2.expected/monorepo_config_file_tests.json
index 22698be..5d660ef 100644
--- a/recipes/engine_v2/engine_v2.expected/monorepo_config_file_tests.json
+++ b/recipes/engine_v2/engine_v2.expected/monorepo_config_file_tests.json
@@ -996,7 +996,7 @@
       "rev-parse",
       "HEAD"
     ],
-    "cwd": "[CACHE]/builder/engine/src/../../monorepo",
+    "cwd": "[CACHE]/builder/monorepo",
     "infra_step": true,
     "luci_context": {
       "realm": {
@@ -1061,7 +1061,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "/a/b/c.txt",
+      "[CACHE]/builder/engine/src/a/b/c.txt",
       "[CLEANUP]/tmp_tmp_2/monorepo/123/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket"
     ],
     "infra_step": true,
@@ -1077,7 +1077,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.Copy /a/b/c.txt to tmp location",
+    "name": "Global generators.Copy [CACHE]/builder/engine/src/a/b/c.txt to tmp location",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1108,7 +1108,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Global generators.gsutil Upload /a/b/c.txt to gs://flutter_archives_v2/monorepo/123/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
+    "name": "Global generators.gsutil Upload [CACHE]/builder/engine/src/a/b/c.txt to gs://flutter_archives_v2/monorepo/123/flutter_infra_release/flutter/12345abcde12345abcde12345abcde12345abcde/bucket/c.txt",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LINK@gsutil.upload@https://console.cloud.google.com/storage/browser/flutter_archives_v2/@@@"