Skip to content

Commit fdc6cc4

Browse files
committed
Change some Swift REPL intro text
Print a "starting up" message as it might take a long time for everything to load, especially with cold module caches. Clarify that :help is for help with debugger commands, not the Swift language. Tell people how to exit in case they don't know the EOF escape. Remove the version print as that will be now be handled with the `swift` command.
1 parent ba0b85f commit fdc6cc4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftREPL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ lldb::REPLSP SwiftREPL::CreateInstanceFromTarget(Status &err, Target &target,
100100
lldb::REPLSP SwiftREPL::CreateInstanceFromDebugger(Status &err,
101101
Debugger &debugger,
102102
const char *repl_options) {
103+
printf("Starting the Swift REPL...\n");
103104
const char *bp_name = "repl_main";
104105

105106
FileSpec repl_executable = HostInfo::GetSupportExeDir();
@@ -262,9 +263,8 @@ lldb::REPLSP SwiftREPL::CreateInstanceFromDebugger(Status &err,
262263
// Disable the cleanup, since we have a valid repl session now.
263264
cleanup.release();
264265

265-
std::string swift_full_version(swift::version::getSwiftFullVersion());
266-
printf("Welcome to %s.\nType :help for assistance.\n",
267-
swift_full_version.c_str());
266+
printf("You are now in an interactive environment powered by the LLDB debugger where you can type, run, and debug Swift code.\n\n");
267+
printf("Type \x1B[1m:help\x1B[0m for debugger assistance. Type \x1B[1m:exit\x1B[0m to quit.\n");
268268

269269
return repl_sp;
270270
}

lldb/test/Shell/SwiftREPL/CFString.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// REQUIRES: swift
44

55
// RUN: %lldb --repl < %s | FileCheck %s
6-
// CHECK: Welcome to {{.*}}Swift
6+
// CHECK: You are now in an interactive environment
77

88
import Foundation
99

lldb/test/Shell/SwiftREPL/ComputedProperties.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var x : Int {
1212
}
1313
}
1414

15-
// CHECK: Welcome to {{.*}}Swift
15+
// CHECK: You are now in an interactive environment
1616
// CHECK: Type :help
1717
// CHECK: {{x}}: Int
1818

lldb/test/Shell/SwiftREPL/UninitVariables.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: %lldb --repl < %s | FileCheck %s
55

66
var x : Int
7-
// CHECK: Welcome to {{.*}}Swift
7+
// CHECK: You are now in an interactive environment
88
// CHECK: Type :help
99
// CHECK: {{x}}: Int = 0
1010
x = 42

0 commit comments

Comments
 (0)