Skip to content

Conversation

@charles-zablit
Copy link
Contributor

@charles-zablit charles-zablit commented Nov 19, 2025

Make the Python.dll not found error message stand out more by using the llvm::WithColor::error() method.


Example

Before

Screenshot 2025-11-19 at 15 50 22

After

Screenshot 2025-11-19 at 15 54 28

rdar://165047059

@charles-zablit charles-zablit requested review from adrian-prantl and compnerd and removed request for JDevlieghere November 19, 2025 14:56
@llvmbot llvmbot added the lldb label Nov 19, 2025
@charles-zablit charles-zablit self-assigned this Nov 19, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 19, 2025

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

Changes

Make the Python.dll not found error message stand out more by using the llvm::WithColor::error() method.


Example

Before

<img width="782" height="431" alt="Screenshot 2025-11-19 at 15 50 22" src="https://github.com/user-attachments/assets/93960c50-cbf2-41f7-aba3-2f2a8af916cc" />

After

<img width="780" height="430" alt="Screenshot 2025-11-19 at 15 54 28" src="https://github.com/user-attachments/assets/f7f4954b-0ce3-4a4b-b9af-5af876032573" />


Full diff: https://github.com/llvm/llvm-project/pull/168718.diff

1 Files Affected:

  • (modified) lldb/tools/driver/Driver.cpp (+3-3)
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index bebf1a70d50e9..0b77e0a4929a7 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -508,12 +508,12 @@ void SetupPythonRuntimeLibrary() {
   if (AddPythonDLLToSearchPath() && IsPythonDLLInPath())
     return;
 #endif
-  llvm::errs() << "error: unable to find '"
-               << LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME << "'.\n";
+  WithColor::error() << "unable to find '"
+                     << LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME << "'.\n";
   return;
 #elif defined(LLDB_PYTHON_DLL_RELATIVE_PATH)
   if (!AddPythonDLLToSearchPath())
-    llvm::errs() << "error: unable to find the Python runtime library.\n";
+    WithColor::error() << "unable to find the Python runtime library.\n";
 #endif
 }
 #endif

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 33167 tests passed
  • 490 tests skipped

@charles-zablit charles-zablit merged commit c9e22d3 into llvm:main Nov 19, 2025
12 checks passed
charles-zablit added a commit to charles-zablit/llvm-project that referenced this pull request Nov 19, 2025
)

Make the `Python.dll not found` error message stand out more by using
the `llvm::WithColor::error()` method.

---

### Example

#### Before

<img width="782" height="431" alt="Screenshot 2025-11-19 at 15 50 22"
src="https://github.com/user-attachments/assets/93960c50-cbf2-41f7-aba3-2f2a8af916cc"
/>

#### After

<img width="780" height="430" alt="Screenshot 2025-11-19 at 15 54 28"
src="https://github.com/user-attachments/assets/f7f4954b-0ce3-4a4b-b9af-5af876032573"
/>

rdar://165047059
charles-zablit added a commit to charles-zablit/llvm-project that referenced this pull request Nov 19, 2025
)

Make the `Python.dll not found` error message stand out more by using
the `llvm::WithColor::error()` method.

---

### Example

#### Before

<img width="782" height="431" alt="Screenshot 2025-11-19 at 15 50 22"
src="https://github.com/user-attachments/assets/93960c50-cbf2-41f7-aba3-2f2a8af916cc"
/>

#### After

<img width="780" height="430" alt="Screenshot 2025-11-19 at 15 54 28"
src="https://github.com/user-attachments/assets/f7f4954b-0ce3-4a4b-b9af-5af876032573"
/>

rdar://165047059
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants