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

    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

  XCTAssertTrue(job.commandLine.contains(.flag(String("-fno-implicit-modules"))))
  try checkExplicitModuleBuildJobDependencies(job: job, pcmArgs: downstreamPCMArgs,
                                              moduleInfo: moduleInfo,
                                              dependencyOracle: dependencyOracle,
                                              pcmFileEncoder: pcmFileEncoder)
}

/// Checks that the build job for the specified module contains the required options and inputs
