Skip to content

Commit fa91d29

Browse files
authored
Modify driver invocation on swift run --repl to match new REPL behavior. (#5621)
Behaviour modified in rdar://78280429. Resolves rdar://95793872
1 parent ba596a6 commit fa91d29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Build/BuildPlan.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2175,7 +2175,7 @@ public class BuildPlan {
21752175
/// importing the modules in the package graph.
21762176
public func createREPLArguments() -> [String] {
21772177
let buildPath = buildParameters.buildPath.pathString
2178-
var arguments = ["-I" + buildPath, "-L" + buildPath]
2178+
var arguments = ["repl", "-I" + buildPath, "-L" + buildPath]
21792179

21802180
// Link the special REPL product that contains all of the library targets.
21812181
let replProductName = graph.rootPackages[0].identity.description + Product.replProductSuffix

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ final class BuildPlanTests: XCTestCase {
10561056

10571057
let buildPath: AbsolutePath = plan.buildParameters.dataPath.appending(components: "debug")
10581058

1059-
XCTAssertEqual(plan.createREPLArguments().sorted(), ["-I\(Dep.appending(components: "Sources", "CDep", "include"))", "-I\(buildPath)", "-I\(buildPath.appending(components: "lib.build"))", "-L\(buildPath)", "-lpkg__REPL"])
1059+
XCTAssertEqual(plan.createREPLArguments().sorted(), ["-I\(Dep.appending(components: "Sources", "CDep", "include"))", "-I\(buildPath)", "-I\(buildPath.appending(components: "lib.build"))", "-L\(buildPath)", "-lpkg__REPL", "repl"])
10601060

10611061
XCTAssertEqual(plan.graph.allProducts.map({ $0.name }).sorted(), [
10621062
"Dep",

0 commit comments

Comments
 (0)