Skip to content

Conversation

@JDevlieghere
Copy link
Member

There may be valid reasons for not being able to find an SDK. Right now, it's printed as an error, which is causing confusion for users that interpret the error as something fatal, and not something that can be ignored.

rdar://155346799

There may be valid reasons for not being able to find an SDK. Right now,
it's printed as an error, which is causing confusion for users that
interpret the error as something fatal, and not something that can be
ignored.

rdar://155346799
@llvmbot
Copy link
Member

llvmbot commented Nov 6, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

There may be valid reasons for not being able to find an SDK. Right now, it's printed as an error, which is causing confusion for users that interpret the error as something fatal, and not something that can be ignored.

rdar://155346799


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

2 Files Affected:

  • (modified) lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp (+1-1)
  • (modified) lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp (+1-1)
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
index 4cfb0a81dc6e4..887748b9e9c85 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
@@ -90,7 +90,7 @@ void PlatformAppleSimulator::GetStatus(Stream &strm) {
   if (!sdk.empty())
     strm << "  SDK Path: \"" << sdk << "\"\n";
   else
-    strm << "  SDK Path: error: unable to locate SDK\n";
+    strm << "  SDK Path: <unable to locate SDK>\n";
 
 #if defined(__APPLE__)
   // This will get called by subclasses, so just output status on the current
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
index b83d07b19235c..7b524d27b5221 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
@@ -53,7 +53,7 @@ void PlatformRemoteDarwinDevice::GetStatus(Stream &strm) {
   if (sdk_directory)
     strm.Printf("  SDK Path: \"%s\"\n", sdk_directory);
   else
-    strm.PutCString("  SDK Path: error: unable to locate SDK\n");
+    strm.PutCString("  SDK Path: <unable to locate SDK>\n");
 
   const uint32_t num_sdk_infos = m_sdk_directory_infos.size();
   for (uint32_t i = 0; i < num_sdk_infos; ++i) {

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR standardizes error messages by replacing the error: prefix with angle bracket notation for SDK path status messages in macOS platform plugins. This change makes the error message format consistent with LLDB's established convention of using angle brackets for placeholder or unavailable values.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
PlatformRemoteDarwinDevice.cpp Updated SDK path error message from "error: unable to locate SDK" to ""
PlatformAppleSimulator.cpp Updated SDK path error message from "error: unable to locate SDK" to ""

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

strm.Printf(" SDK Path: \"%s\"\n", sdk_directory);
else
strm.PutCString(" SDK Path: error: unable to locate SDK\n");
strm.PutCString(" SDK Path: <unable to locate SDK>\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't be printing the string error: manually anyway...

@JDevlieghere JDevlieghere merged commit f1bf0b0 into llvm:main Nov 6, 2025
18 checks passed
@JDevlieghere JDevlieghere deleted the rdar155346799 branch November 6, 2025 19:38
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request Nov 6, 2025
…m#166676)

There may be valid reasons for not being able to find an SDK. Right now,
it's printed as an error, which is causing confusion for users that
interpret the error as something fatal, and not something that can be
ignored.

rdar://155346799
(cherry picked from commit f1bf0b0)
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