This is a challenge with many types of code.
Earlier this year it took me a weekend to get a 7 year old Rails project running again. It's a simple project but the packages it used had old system dependencies that were no longer available.
I ended up having to upgrade a lot of things, including code, just to get it running again.