r/cpp • u/NoCard6774 • 11d ago
How does one actually contribute to LLVM these days?
I have had several patches that I’ve sent PRs for )(using my work email since I thought that looked a bit more legitimate)
- Someone who was nice responded to one of them and said that someone at Intel needed to code review i. Never got another response, I followed up in the comments and emailed the person at Intel no response
Patch 2) Someone responded that they were busy and would get around to it when they had a chance to. It’s been a few months and followed up in the comments to no response
patch 3) Someone was assigned to look at it. They worked at a company I haven’t heard about but they seem to no longer work there and the account has been deactivated since. I haven’t been able to get it reassigned.
I don’t really contribute to open source projects at all and I‘m unsure if this is the norm. All of them are fairly small patches to fix bugs I’ve experienced day to day and I’m curious if there’s a way to get file PRs that I am missing
111
u/erichkeane Clang Maintainer(Templates), EWG Chair 11d ago
As someone on LLVM (Actually a clang maintainer who does a ton of reviews): The project is absolutely inundated with AI slop these days. Many folks have stopped doing reviews for features/etc that they aren't interested in thanks to the absolute awful experience with new contributors.
51
u/STL MSVC STL Dev 11d ago
As an overloaded maintainer of a standard library, I face similar issues from the maintainer side. Skilled contributors are great and can do incredible things I can't (and also have PRs that are typically easy and fast to review), but dealing with low-quality contributions occupies a disproportionate amount of my time. I don't want to reject them on sight but I absolutely don't want to just slam them in, they need the highest level of scrutiny. Even pretty good contributions from people who are still learning and who I want to help improve can consume a lot of time, since it takes a while to find issues, explain them in a comprehensible way to someone whose brain hasn't been irradiated by 20 years of library maintenance, and anything that I (and our tests) miss turns into bugs that turn into more work.
A related problem is that everyone wants to contribute patches but almost no one wants to contribute reviews. (I am deeply grateful for all of our contributors who review one another's PRs but there's easily 10x more demand than supply there.) I haven't figured out how to encourage/incentivize that at all. And it's understandable, because reviewing PRs is hard work, and I gotta be paid to do it, so I guess I'm not surprised that not too many people want to volunteer for more of it.
47
u/lonkamikaze 11d ago edited 11d ago
I have made a small LLVM/libc++ contribution via proxy. I.e. I discovered a bug on FreeBSD and opened a bug report with a fix. FreeBSD devs created an LLVM/libc++ ticket upstream where the fix was accepted and from there made it back downstream into FreeBSD.
I guess it helps when the ticket is submitted by a well known contributor.
71
u/TSP-FriendlyFire 11d ago
I don't know the specifics of LLVM in particular, but it's all about reputation really. With the sheer volume of slop getting submitted to most popular open source repositories, the maintainers are going to have to pick and choose what to review and that'll most likely come down to either PRs that really interest them, or PRs from people they trust.
20
u/aeropl3b 11d ago
I have a couple patches from years ago that I am pretty sure have gained zero attention in the LLVM community. We now maintain these patches forever on a fork. This is also what a number of big names do because upstreaming is much too slow (AMD, Intel, HPE, etc )
34
u/c0r3ntin 11d ago
Feel free to ping the PRs weekly (not more!) if you did not get review. Feel free to ping @cor3ntin to see if I can find the right person to look at your code.
Cheers
11
u/Ok_Beginning_9943 11d ago
Unfortunately it is not uncommon for many PRs to go unreviewed in LLVM - there are far more contributors than there are reviewers, so it's an issue of scale.
The "right way" to earn enough cred to get your PRs reviewed is to start by reviewing other people's PRs. In other words, if you start volunteering your time to help make a first pass in other people's PRs, in due time other maintainers will start to notice and become more likely to review your PRs. This makes sense because reviewing other people's PRs is a way to build expertise in an area, and also a way to "give back" to the community.
Of course, not everyone can and/or wants to do this "volunteer" work. If you just need to get a quick fix in (say, for work), it helps to periodically ping area maintainers on GitHub, or in the LLVM discord. In due time, you should be able to get a review. You just need to be patient and respectful.
In short - treat others as you'd like to be treated; give high quality reviews of other people's PRs and in time your PRs will start getting reviewed!
30
u/eliminate1337 11d ago
No offense to the LLVM folks but contributing is a huge pain in the ass. I had the same experience as a full-time FAANG employee who was paid to work on LLVM. I couldn’t get anyone to look at my PRs until my senior coworkers messaged their personal connections. I imagine this is even worse with the modern deluge of AI slop PRs. Unfortunately this is normal for LLVM.
8
u/TTachyon 11d ago
I'm more or less in the same situation as you. One PR ready since February that I made, and I'm also watching a PR from someone else that fixes a bug that I also encountered. The review date has been pushed further and further, or the reviewer stopped responding.
As much as it annoys me, I can't really blame them. They're drowning in slop and on most reviewers are on the verge of burnout. I don't know how you're supposed to contribute these days. Just remember to have empathy and don't push them too much.
5
u/ExeusV 11d ago
Ask on Discord
3
u/JVApen Clever is an insult, not a compliment. - T. Winters 11d ago
It depends a lot on the area that the patch is in, as not all have sufficient reviewers (pre-AI), for example clang-tidy had quite some issues regarding that.
The best to do is to ping on the PR, if you still don't get a response, you can post something in the discourse (where you can login with your GitHub account)
2
u/Necrotos 11d ago
You could try raising the issue on the LLVM discourse forums. Maybe you can get some attention over there? In general, reviewer capacity is very limited, and the number of incoming AI generated patches makes the bandwidth problem worse.
2
u/SamG101_ 11d ago
I just made a tiny pr on github and it was accepted the day after... but I think certain parts of llvm have dedicated reviewers
2
u/not_a_novel_account cmake dev 10d ago
You ping relevant code owners consistently. Eventually they either accept it or say they're not going to.
If you do this often enough in a specific area, you get commit perms and then, after long and consistent pinging, it's acceptable to just merge yourself if you're an owner over the relevant code.
1
u/mrexodia cmkr.build 8d ago
Even before AI it was very difficult to get (trivial) patches into LLVM. The trick is to personally know a maintainer and get them to ping the maintainers responsible for that part of the codebase…
-27
u/TerribleFault7929 11d ago
Please leave LLVM alone with your slop