Hacker News new | ask | show | jobs
by g_airborne 2211 days ago
Somewhat unrelated but I read somewhere that the Rust team test their releases by compiling the entirety of crates.io and all Rust GitHub repositories to find regressions. The tool is called Crater. Source: https://www.pietroalbini.org/blog/shipping-a-compiler-every-...
2 comments

I was reading the docs of some library the other day, and they had a list of projects using that library. It was an impressive list: long, and with some serious projects on there.

Then i saw that they try building those projects against their library as part of their test pipeline. If you want to add your project to the list, you can submit a pull request. No wonder the list is so substantial - it gets you free testing! Highly ingenious!

No longer the entirety but still a sizeable chunk of it; it helps with regression detection for them. World's biggest test suite?
It is very common for compilers to be tested using client code. It is a practice that goes back decades.

Nowadays with so many open source projects and so much distributed computer power, it is even easier.

What makes it easy and powerful for Rust is that ~all Rust projects use Cargo as the build system and test runner, so Crater can really test every Rust project in existence, not just code samples hand-picked into compiler's test suite.
Only open source projects, which will not be the majority if Rust ends up taking up speed.