         XCTAssertEqual(dependencyArtifacts!.modulePath,
                        prebuiltModuleDetails.compiledModulePath)
       case .clang(let clangDependencyDetails):
-        let clangDependencyModulePathString =
-          try ExplicitDependencyBuildPlanner.targetEncodedClangModuleFilePath(
-          for: dependencyInfo, hashParts: pcmArgs)
+        let clangDependencyModulePathString = pcmFileEncoder(dependencyInfo, pcmArgs)
         let clangDependencyModulePath =
           TypedVirtualPath(file: clangDependencyModulePathString, type: .pcm)
         let clangDependencyModuleMapPath =

    for transitiveDependencyId in dependencyInfo.directDependencies! {
      try checkExplicitModuleBuildJobDependencies(job: job, pcmArgs: pcmArgs, 
                                                  moduleInfo: dependencyOracle.getExternalModuleInfo(of: transitiveDependencyId)!,
                                                  dependencyOracle: dependencyOracle)

    }
  }
}

private func pcmArgsEncodedRelativeModulePath(for moduleName: String, with pcmArgs: [String]
) throws -> RelativePath {
  return RelativePath(
    try ExplicitDependencyBuildPlanner.targetEncodedClangModuleName(for: moduleName,
                                                                hashParts: pcmArgs) + ".pcm")
}

/// Test that for the given JSON module dependency graph, valid jobs are generated

private func checkExplicitModuleBuildJob(job: Job,
                                         pcmArgs: [String],
                                         moduleId: ModuleDependencyId,
                                         dependencyOracle: InterModuleDependencyOracle,
                                         pcmFileEncoder: (ModuleInfo, [String]) -> VirtualPath)
throws {
  let moduleInfo = dependencyOracle.getExternalModuleInfo(of: moduleId)!
  var downstreamPCMArgs = pcmArgs
  switch moduleInfo.details {
