4 ms·
I've been writing Rust since before 1.0, and I maintain at least once piece of 5-year-old production Rust code. In general, old Rust code continues to work alm
by ekidd 7y ago
I've been writing Rust since before 1.0, and I maintain at least once piece of 5-year-old production Rust code.
In general, old Rust code continues to work almost completely unchanged. There have been 3 or 4 cases where I couldn't compile an ancient dependency because it was relying on something weird like a soundness bug. The fix was usually to update the dependency to the latest minor revision.
Rust 2018 fixed a few minor syntactic issues, adding the "crate" keyword for imports from the current crate, and "dyn" in front of dynamically dispatched traits. These can both be updated using 'cargo fix' in about 20 minutes. Rust 2018 modules can use Rust 2015 modules almost completely seemlessly, even when macros are involved.
Is it perfect? No. But updating older code is something I spend a day or two a year on.
- jfkebwjsbx 7y agoThat is fine, but note that 2 days a year is about 1% of work time, and that time increases as the code size increases. Moreover, in some companies you cannot simply update external dependencies without extra painful reviews.