Deprecate the middleman root concept and make it a variant of derived root.

PiperOrigin-RevId: 353028532
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
index 3f9eb35..5764e3b 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTest.java
@@ -360,7 +360,7 @@
   private DerivedArtifact createDerivedArtifact(String path) {
     PathFragment execPath = PathFragment.create("out").getRelative(path);
     DerivedArtifact output =
-        new DerivedArtifact(ArtifactRoot.asDerivedRoot(root, "out"), execPath, ALL_OWNER);
+        new DerivedArtifact(ArtifactRoot.asDerivedRoot(root, false, "out"), execPath, ALL_OWNER);
     actions.add(new DummyAction(NestedSetBuilder.emptySet(Order.STABLE_ORDER), output));
     output.setGeneratingActionKey(ActionLookupData.create(ALL_OWNER, actions.size() - 1));
     return output;
@@ -368,7 +368,7 @@
 
   private Artifact createMiddlemanArtifact(String path) {
     ArtifactRoot middlemanRoot =
-        ArtifactRoot.middlemanRoot(middlemanPath, middlemanPath.getRelative("out"));
+        ArtifactRoot.asDerivedRoot(middlemanPath, true, PathFragment.create("out"));
     return new DerivedArtifact(
         middlemanRoot, middlemanRoot.getExecPath().getRelative(path), ALL_OWNER);
   }
@@ -383,7 +383,10 @@
   private SpecialArtifact createDerivedTreeArtifactOnly(String path) {
     PathFragment execPath = PathFragment.create("out").getRelative(path);
     return new SpecialArtifact(
-        ArtifactRoot.asDerivedRoot(root, "out"), execPath, ALL_OWNER, SpecialArtifactType.TREE);
+        ArtifactRoot.asDerivedRoot(root, false, "out"),
+        execPath,
+        ALL_OWNER,
+        SpecialArtifactType.TREE);
   }
 
   private static TreeFileArtifact createFakeTreeFileArtifact(