Skip to content

Commit 875a32f

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

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,7 @@ final class BuildPlanTests: XCTestCase {
890890
fileSystem: fs,
891891
observabilityScope: observability.topScope
892892
)
893-
XCTAssertEqual(plan.createREPLArguments().sorted(), ["-I/Dep/Sources/CDep/include", "-I/path/to/build/debug", "-I/path/to/build/debug/lib.build", "-L/path/to/build/debug", "-lpkg__REPL"])
894-
893+
XCTAssertEqual(plan.createREPLArguments().sorted(), ["-I/Dep/Sources/CDep/include", "-I/path/to/build/debug", "-I/path/to/build/debug/lib.build", "-L/path/to/build/debug", "-lpkg__REPL", "repl"])
895894
XCTAssertEqual(plan.graph.allProducts.map({ $0.name }).sorted(), [
896895
"Dep",
897896
"exe",

0 commit comments

Comments
 (0)