Skip to content

[lldb] Improve wording of Swift expression parser error messages (NFC) #10399

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 1 commit into from
Apr 1, 2025

Conversation

adrian-prantl
Copy link

rdar://143448485

@adrian-prantl adrian-prantl requested a review from a team as a code owner April 1, 2025 17:04
@adrian-prantl
Copy link
Author

@swift-ci test

@@ -765,12 +766,13 @@ bool SwiftUserExpression::Parse(DiagnosticManager &diagnostic_manager,
std::static_pointer_cast<SwiftASTContextForExpressions>(swift_ast_ctx);

if (!m_swift_ast_ctx)
return error("could not create a Swift AST context");
return error("could not initialize Swift compiler",

Choose a reason for hiding this comment

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

I think there's a space missing here, it will print "compilerrun"

Copy link
Author

Choose a reason for hiding this comment

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

No, these are separate messages.

@@ -765,12 +766,13 @@ bool SwiftUserExpression::Parse(DiagnosticManager &diagnostic_manager,
std::static_pointer_cast<SwiftASTContextForExpressions>(swift_ast_ctx);

if (!m_swift_ast_ctx)
return error("could not create a Swift AST context");
return error("could not initialize Swift compiler",
"run 'swift-healthcheck' for more details");

Choose a reason for hiding this comment

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

These are user facing right? Running swift-healthcheck won't produce anything useful to the user, right? I'd change it to run swift-healthcheck and file a bug with the file.

Copy link
Author

Choose a reason for hiding this comment

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

It is user-facing, but it contains, for example compiler errors that users are expected to be familiar with.

@adrian-prantl adrian-prantl merged commit fcec10c into swiftlang:stable/20240723 Apr 1, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants