Skip to content

[Changelog] Add SE-0419 to the changelog. #80268

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 2 commits into from
Mar 27, 2025

Conversation

al45tair
Copy link
Contributor

This is now implemented, at least for macOS and Linux.

This is now implemented, at least for macOS and Linux.
@al45tair al45tair requested a review from mikeash March 25, 2025 11:56
@al45tair
Copy link
Contributor Author

@swift-ci Please smoke test

@benrimmington
Copy link
Contributor

This will also need a link reference, near the end of the file.

[SE-0419]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0419-backtrace-api.md

Add a link reference to SE-0419.
@al45tair
Copy link
Contributor Author

@swift-ci Please smoke test

@al45tair al45tair requested a review from benrimmington March 26, 2025 11:47
Copy link
Contributor

@benrimmington benrimmington left a comment

Choose a reason for hiding this comment

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

I'm curious to know what errors Backtrace.capture() will throw, and whether it should be using "typed throws". The current implementation only throws a NotImplemented error on Windows.

@al45tair
Copy link
Contributor Author

I'm curious to know what errors Backtrace.capture() will throw, and whether it should be using "typed throws". The current implementation only throws a NotImplemented error on Windows.

The underlying implementation is more sophisticated than the API appears on the surface — for instance, it is able to capture a backtrace from a remote process. There are quite a few errors that it might conceivably throw while doing that (e.g. MachError, POSIXError, MemserverError); all of these are SPI. Some of them might be promoted to API at some point, but probably not all of them, and I also don't think it's necessarily a good idea to enumerate all the errors this might throw in future as some of them may be highly platform specific.

@al45tair al45tair merged commit 119fbac into swiftlang:main Mar 27, 2025
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.

3 participants