Testing My Patience With Tests
The Rusty Sea Scrolls
As I informed them of the shortcomings of my hardware, the Rust Foundation generously granted me access to one of their DevDesktops - powerful remote Linux machines. How trusting of them!
Little do they know, I have installed an comprehensive simulation of the material world on their systems. It's currently in the Pleistocene, and it should result in the invention of a parellel world Rust in 2.6 million years, give or take. Alternate dimension pull requests - the future of open source.
As for the slight bit of computing power I am actually using for my GSoC project, it cuts down the time to ./x check
the Rust compiler for the first time from 30 minutes to around 6 minutes! Splendid.
Next, I went for a quick archeological dive through the run-make
directory, adding explanatory comments and linking relevant pull requests and issues. Some amusing discoveries include:
- Many of them were created over a decade ago, by the person who is currently the #2 contributor of all time to Rust. The #1 is a bot who automatically merges accepted pull requests. Mystified by this, I looked up if this was intentional, and found a thoughtful comment:
"Top contributor" is not a place of glory, it should go to a bot because people should work at a sustainable pace and prioritize touching grass every once in a while. If a person ever works harder than bors, that's a problem! -carols10cents
-
In 2017, the
grep
command utility inrun-make
tests was replaced by a custom variant,CGREP
, scriped in Shell, for the purposes of making debugging easier. However, not everyone was aware of this change, and some additional instances ofgrep
snuck in after that date, such as in thecompressed-debuginfo
test. Well, good thing there will soon be even more robust support for this command! -
It is quite interesting to see how Rust contributors were talking about the project in the threads from over a decade ago. Adoption wasn't as widespread, and there is occasional mention of how their changes will need to remain maintainable in multiple years. Well, looks like their foresight was warranted!
Finally, I tried to write a quick script to locate dependencies and Bash commands in each run-make
test - a simple set of Regex to find individual words and match them against a list of common Bash utilities. Trying to add "look-behind" in the Regex resulted in an interesting "Rust does not support look-behind!" error, which led me to learn about an interesting piece of Regex lore. How in-character of Rust to curate which features get to be added so carefully...
Not A Contender, Not A Competition
It was a bit anxiety-inducing back in March to submit a project proposal, as it felt like "promising I'll get work done" without actually getting much work done.
While I am over here getting up to speed and reading archives, the 7th place all time top contributor human is immaculately porting some of these tests while acknowledging the subtle ins-and-outs! It's honestly a blessing for me, as I get to read their changes and learn from them.
But, most importantly, it got me to notice something.
For the last 5 days, I have started my first ever internship (that is specifically in the field of technology, I've worked in the biology field before). It's no doubt exactly what the veterans remember of their intern days - antiquated codebases, project managers tracking hours and setting down expectations, daily standup... (They did let me write some Rust for them to rewrite an unstable build script, though!)
Doing the Google Summer of Code at the same time is enlightening. The only deliverables open source contributors have is, at most, finishing what they start to respect the efforts of their code reviewers. An utterly different mindset from academia and industry!
My situation is different, of course, as I have evaluations, engagements to respect, and a schedule of sorts. So, that is what GSoC is. An introduction to open source development, made understandable to the rat-race-brained interns like me.
It's a tough balance to have all these commitments at once. Motivating oneself to go write more code after a day of writing code sounds difficult, but it's made easier by the fact that one of them has that community aspect and the other does't. Truthfully, trudging through all this dusty Python has made me appreciate the Rust Result
type to an extent I never previously reached while working on my personal projects.
This weekend, I'll see if I can get some real code placed down and shipped in a pull request to test if I can keep the torch burning. My little archeological dive has identified some lower-hanging fruits which, in appearance, look like a good way to get started.
The goal isn't to rush in when I don't have a full overview of the testing ecosystem, but mostly to see how I fare doing something that resembles the bulk of what work will be like in the coming months.
It's a test. Done on run-make
tests.
A test test.