Skip to content

Commit

Permalink
Merge pull request #210 from vapor/bugfix/swift-41-spm-no-prefetching…
Browse files Browse the repository at this point in the history
…-arg

Remove --enable-prefetching argument from SPM invocations.
  • Loading branch information
tanner0101 committed Feb 13, 2018
2 parents 1907d33 + c256191 commit 97b2856
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Sources/VaporToolbox/Build.swift
Expand Up @@ -60,7 +60,7 @@ public final class Build: Command {
let buildBar = console.loadingBar(title: "Building Project", animated: !isVerbose)
buildBar.start()

let command = ["build", "--enable-prefetching"] + buildFlags
let command = ["build"] + buildFlags
do {
try console.execute(verbose: isVerbose, program: "swift", arguments: command)
buildBar.finish()
Expand Down
2 changes: 1 addition & 1 deletion Sources/VaporToolbox/Fetch.swift
Expand Up @@ -47,7 +47,7 @@ public final class Fetch: Command {
try console.execute(
verbose: isVerbose,
program: "swift",
arguments: ["package", "--enable-prefetching", "fetch"] + pass
arguments: ["package", "fetch"] + pass
)
depBar.finish()
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/VaporToolbox/Xcode.swift
Expand Up @@ -23,7 +23,7 @@ public final class Xcode: Command {
xcodeBar.start()

let buildFlags = try loadBuildFlags(arguments)
let argsArray = ["package"] + buildFlags + ["--enable-prefetching", "generate-xcodeproj"]
let argsArray = ["package"] + buildFlags + ["generate-xcodeproj"]

do {
_ = try console.execute(verbose: isVerbose, program: "swift", arguments: argsArray)
Expand Down
14 changes: 6 additions & 8 deletions Tests/VaporToolboxTests/BuildTests.swift
Expand Up @@ -7,9 +7,7 @@ extension TestConsole {
let console = TestConsole()

// swift commands
console.backgroundExecuteOutputBuffer["swift package --enable-prefetching fetch"] = ""
console.backgroundExecuteOutputBuffer["swift package fetch"] = ""
console.backgroundExecuteOutputBuffer["swift build --enable-prefetching"] = ""
console.backgroundExecuteOutputBuffer["swift build"] = ""

console.backgroundExecuteOutputBuffer["swift package dump-package"] = try! JSON(["name": "Hello"]).serialize().makeString()
Expand Down Expand Up @@ -52,8 +50,8 @@ class BuildTests: XCTestCase {
XCTAssertEqual(console.executeBuffer, [
"ls -a .",
"ls -a .",
"swift package --enable-prefetching fetch",
"swift build --enable-prefetching",
"swift package fetch",
"swift build",
])
}

Expand All @@ -70,8 +68,8 @@ class BuildTests: XCTestCase {
"rm -rf .build",
"ls -a .",
"ls -a .",
"swift package --enable-prefetching fetch",
"swift build --enable-prefetching",
"swift package fetch",
"swift build",
])
}

Expand All @@ -89,8 +87,8 @@ class BuildTests: XCTestCase {
XCTAssertEqual(console.executeBuffer, [
"ls -a .",
"ls -a .",
"swift package --enable-prefetching fetch",
"swift build --enable-prefetching",
"swift package fetch",
"swift build",
"ls .build/debug",
"find ./Sources -type f -name main.swift",
"ls .build/debug/Hello",
Expand Down

0 comments on commit 97b2856

Please sign in to comment.