Skip to content

Improve error handling in SwiftUserExpression #8808

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
May 29, 2024

Conversation

adrian-prantl
Copy link

Previously this

$ swiftc test.swift -g -o test
$ lldb -o 'b main' -o 'b test' -o r -o 'e -i0 -- test()' ./test
(lldb) ^D

resulted in

Can't execute a swift expression without a runtime
UNREACHABLE executed at llvm-project/lldb/source/Plugins/ExpressionParser/Swift/SwiftUserExpression.cpp:90!

after this patch it's

(lldb) ^D
error: Could not finish swift expression because the process is being torn down

Unfortunately catching this error in a test case is tricky.

Previously this
```
$ swiftc test.swift -g -o test
$ lldb -o 'b main' -o 'b test' -o r -o 'e -i0 -- test()' ./test
(lldb) ^D
```

resulted in
```
Can't execute a swift expression without a runtime
UNREACHABLE executed at llvm-project/lldb/source/Plugins/ExpressionParser/Swift/SwiftUserExpression.cpp:90!
```

after this patch it's

```
(lldb) ^D
error: Could not finish swift expression because the process is being torn down
```

Unfortunately catching this error in a test case is tricky.
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test macos

1 similar comment
@adrian-prantl
Copy link
Author

@swift-ci test macos

@adrian-prantl adrian-prantl merged commit 7ab6dca into swiftlang:swift/release/6.0 May 29, 2024
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