Skip to content

Commit

Permalink
Add support in the API for the new arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
NinjaLikesCheez committed Oct 30, 2023
1 parent ba93033 commit 08d0779
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
12 changes: 10 additions & 2 deletions Sources/GenIR/GenIR.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,19 @@ struct IREmitterCommand: ParsableCommand {
log: logPath,
archive: xcarchivePath,
level: logger.logLevel,
dryRun: dryRun
dryRun: dryRun,
dumpDependencyGraph: dumpDependencyGraph
)
}

mutating func run(project: URL, log: String, archive: URL, level: Logger.Level, dryRun: Bool) throws {
mutating func run(
project: URL,
log: String,
archive: URL,
level: Logger.Level,
dryRun: Bool,
dumpDependencyGraph: Bool
) throws {
let output = archive.appendingPathComponent("IR")
let project = try ProjectParser(path: project, logLevel: level)
var targets = Targets(for: project)
Expand Down
3 changes: 2 additions & 1 deletion Tests/GenIRTests/OutputPostprocessorFileMoverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ final class OutputPostprocessorFileMoverTests: XCTestCase {
log: context.buildLog.filePath,
archive: context.archive,
level: .debug,
dryRun: false
dryRun: false,
dumpDependencyGraph: false
)

// Check the output path for unique Image files
Expand Down
6 changes: 4 additions & 2 deletions Tests/GenIRTests/UmbrellaTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ final class UmbrellaTests: XCTestCase {
log: context.buildLog.filePath,
archive: context.archive,
level: .debug,
dryRun: false
dryRun: false,
dumpDependencyGraph: false
)

let directories = try FileManager.default.directories(at: output, recursive: false)
Expand Down Expand Up @@ -82,7 +83,8 @@ final class UmbrellaTests: XCTestCase {
log: context.buildLog.filePath,
archive: context.archive,
level: .debug,
dryRun: false
dryRun: false,
dumpDependencyGraph: false
)

let directories = try FileManager.default.directories(at: output, recursive: false)
Expand Down
4 changes: 2 additions & 2 deletions Tests/GenIRTests/WorkspaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ final class WorkspaceTests: XCTestCase {
let process = try context.build(test: Self.testPath, scheme: Self.scheme)
XCTAssertEqual(process.code, 0, "Build returned non-zero exit code")

let output = context.archive.appendingPathComponent("IR")
var genIR = gen_ir.IREmitterCommand()

try genIR.run(
project: Self.testPath,
log: context.buildLog.filePath,
archive: context.archive,
level: .debug,
dryRun: false
dryRun: false,
dumpDependencyGraph: false
)

// Check dependencies made it to the right place
Expand Down

0 comments on commit 08d0779

Please sign in to comment.