Skip to content

[lldb][Progress] Separate title and details (#77547) (#7978) #8097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4166,11 +4166,9 @@ void SwiftASTContext::ValidateSectionModules(

Status error;

Progress progress(
llvm::formatv("Loading Swift module {0}",
module.GetFileSpec().GetFilename().AsCString()),
module_names.size());

Progress progress("Loading Swift module '{0}' dependencies",
module.GetFileSpec().GetFilename().AsCString(),
module_names.size());
size_t completion = 0;

for (const std::string &module_name : module_names) {
Expand Down Expand Up @@ -8748,11 +8746,9 @@ bool SwiftASTContext::GetCompileUnitImportsImpl(
if (cu_imports.size() == 0)
return true;

Progress progress(
llvm::formatv("Getting Swift compile unit imports for '{0}'",
compile_unit->GetPrimaryFile().GetFilename()),
cu_imports.size());

Progress progress("Getting Swift compile unit imports",
compile_unit->GetPrimaryFile().GetFilename().GetCString(),
cu_imports.size());
size_t completion = 0;
for (const SourceModule &module : cu_imports) {
progress.Increment(++completion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ def test_swift_progress_report(self):
self.runCmd("expr boo")
self.runCmd("v s")

beacons = [ "Loading Swift module",
"Caching Swift user imports from",
"Setting up Swift reflection for",
"Getting Swift compile unit imports for",
"Importing module", "Importing overlay module"]
beacons = [
"Loading Swift module",
"Importing modules used in expression",
"Setting up Swift reflection",
"Getting Swift compile unit imports",
"Importing Swift modules",
"Importing Swift standard library",
]

while len(beacons):
event = lldbutil.fetch_next_event(self, self.listener, self.broadcaster)
Expand Down