How to get started with contributing to Swift as a beginner

Hi there!
I'm a new open-source contributor and I'm looking forward to contributing to Swift.
I'm comfortable with using and understanding Swift as the programming language for my projects and I have a good understanding of how the git & open-source ecosystem works.
But when it comes to contributing to Swift, I feel a bit lost and puzzled while going through the issues in the codebase and can't figure out how to start fixing the bugs and solving issues.
It'd be great to get help from someone in the community who can help me with kickstarting my contributions to Swift.
Thanks in advance.

1 Like

Would you mind listing a few specific problems that prevented you from contributing?

Thanks!

Hey @Max_Desiatov !
Thank you for reverting back.
To mention a few, I get it super hard to find some beginner-friendly issues to work on, and with the existing ones, I feel overwhelmed to understand them and it always takes me a lot of time to even understand what the bug is and what a workaround would be.
Looking forward to getting help in finding some beginner friendly issues.

You could definitely checkout the mentorship program! You can read about people's experiences and how the program helped them with getting started here. But I think the program could definitely help you get started.
As far as finding issues, there are a couple of getting started docs in the repo that you can take a look as well:

3 Likes

To be completely honest, you'll not going to find beginner-friendly bugs because the topic itself not beginner-friendly. Unless you mean "compiler engineer beginner". I'd say you either need some background in how modern compilers work, or a good mentor. There are also great books on the topic, people with more experience than me can recommend some, I have the dragon book and I feel it's a good start, although, perhaps a bit outdated.

There's also a good getting started guide that will clarify things when it comes to project structure, dependencies, how to build, workflows etc.

But if you have no prior compiler-related experience, I'd say the best start is reading a bit on it. Otherwise some of the discussions/topics will feel like they're in a foreign language.

This depends on what kind of experience you have. If you feel comfortable with compiler engineering, but don't find bug reports helpful, maybe it's better for you to cooperate with someone pitching on the forums to implement a prototype for pitched functionality.

If you don't feel like compiler engineering is for you, the main repository still hosts a few interesting components, such as the Swift standard library, IDE support, and related utilities. Documentation in the repository needs improvements as well. And then, there's the compiler build system, which I personally find one of the toughest areas to develop and test. For the compiler's build system, in addition to some knowledge of Python, Bash, and CMake you'll need some understanding of how the existing build system is structured before you make meaningful changes to it.

The Swift project is not limited to just the swift repository, you may find SwiftPM, ArgumentParser, Swift NIO, DocC, Async Algorithms etc to be much more suitable for you. Have you tried contributing to those?

1 Like

Yes, I highly recommend trying to contribute to the Package Manager first, as it's mostly written in Swift, is an integral part of the toolchain, and the committers are very responsive- some of my earliest pulls were merged in SPM. I see 19 issues there marked for beginners, for example, here is one I've long wanted.

Pick an issue that interests you and it will help to look at how similar features were implemented. The great thing about modern revision control is that you can look at just a bundle of changes for how a particular feature was implemented in a pull request or git commit, which saves you time looking through a lot of unrelated source. Use it, and feel free to ask questions on your chosen github issue, pinging me or the others in that particular thread.

1 Like

Thank you so much @Finagolfin .
That's great information I was looking forward to. I'd start with SPM and will surely get back to you whenever I face some problems while working on an issue.
Thank you, once again.

Thank you Max for the information. I'd look around and explore other projects as well. Thank you for the tips and information.

1 Like

Just to remind everyone: the standard library is written in Swift and doesn’t require compiler knowledge!

5 Likes

Thank you @valentinradu for the tips and information.
I'm more than excited to learn and explore compilers and compiler design.
Thank you, once again!

Oh okay!
Thanks, @David_Smith for letting me know about that.

1 Like

Hi there and everyone,

I can completely relate to your situation. As a new contributor to Swift myself, I've found it quite challenging to navigate through the issues and bugs in the codebase.

I believe it would be beneficial to form a collaborative group where we could help each other in this journey. This way, we can share knowledge, discuss the codebase, and work together on bug fixes and solving issues. Of course, it would be great if experienced contributors were willing to join and share their insights.

If you're interested, we could create a group on WhatsApp or Discord, depending on what works best. Let's learn, grow, and contribute to Swift together. If you see this post and interested, please contact me at szhang2378@gmail.com, I will reply and add you to the group ASAP

Let's team up!!!!

Simon

1 Like

Hi @szhang1992
Thank you for replying and for your interest in contributing to Swift Project.

I think the best platform is the Swift Forums itself since all the potential and experienced contributors are here to help us. What do you think?

Hi Ishaan,

Thanks for your reply. Yeah the Swift Forums is awesome, it's opened and welcomed where you could find the answers, but still hard for new contributors to ramp up. For example, I failed to build a lots of scheme, didn't know where to find the correct codebase, didn't knew which branch to pull etc etc, and I do believe it happens for all new contributors. So I just want to create a team of dummies, who are frequently blocked and annoyed by entry level questions and scared to ask. Hope that make sense

You're very welcome to ask these questions here on Swift Forums and we'd be happy to answer those. That will also help us improve our documentation to make sure there's no confusion and that it's easier to start contributing in the future.

2 Likes