C++ Exception Handling GSOC Proposal

Hi all,

I would like to discuss an idea for a potential GSOC 2022 project. In short, I am interested in working on the "Bridging Swift Error Handling Model to C++" project, but in the forward interop direction (C++ from Swift). Largely, I am intersted in exception/error handling, but have much more experience in the forward interop direction.

I see that some work has already been done in an effort to as least explore the usage of throwing C++ functions from Swift. I have read the manifesto section, associated discussion, and related proposals. Having read the existing discussion, it seems there are somewhat significant challenges in the area (especially with regards to propegating exceptions into Swift frames).

I would like to contribute to this area, but am a little unsure about what could be pheasibly scoped for a GSOC project. For one, the current state of things is a little unclear to me. In my brief testing, I was unable to import throwing C++ functions all together (facing linker errors when I tried), but I get the impression that might not be the expected behaviour. If there is some relatively low hanging, but still worthwhile fruit in this area, perhaps a conservative goal might be best.

If it turns out the topic is not suitable for a GSOC project, that's perfectly fine as well, just wanted to discuss a little :slight_smile:

Thanks,

/cc @zoecarver @Alex_L

6 Likes

Hi Nuri! I think this is a great project to undertake as part of GSOC. I'd love to hear more about what you're proposing.

I've been working on exposing C++ exceptions in Swift, which is sort of the opposite problem of what you're looking at. I'm broadly familiar with the problem space and may be able to help. Feel free to reach out. :slight_smile:

1 Like

Hey NuriAmari, thanks for exploring this project and reaching out to ask about it!

I think this kind of project can work as a GSoC project for sure. While there's a lot of work that needs to be done on the error handling on the forward interop side, I think a lot of it could fit into what GSoC defines as a large project (350 hours). I think @zoecarver already has some ideas related to how to bridge the error handling model on the forward side, so perhaps he can chime in in this thread to give his thoughts as to what could be a reasonable scope for the forward interop error handling project for GSoC.

1 Like

Hi @grynspan thanks for your reply!

Frankly, I'm not entirely sure yet what a reasonable goal would look like. I would like to improve the ergonomics of throwing C++ functions as used from Swift, but to what extent that is reasonable I'm not sure.

That said, it looks like @zoecarver might have some more detailed ideas, so I'm hoping we'll be able to hash out a more detailed plan. Once that is done, I can loop you in on the details if you're interested.

Hi @Alex_L, sounds good, I look forward to discussing it :slight_smile: