Digital recording is not a reason to ditch quality glass.
Sensors use the photons of light to liberate elecrtrons rather than to transform silver Iodide crystals, No magic that impair optics beyond the name change and advertizing copy.
Yes, the pixels of "digital film"are smaller and more numerous (hence demand high optical quality) and the light sensitive surface resides a little bit below the VERY flat surface (as opposed to the microbumpy film) , so lenses without flat focus fields will have softer corners. If the rear glass is so close to the film plane that the picture depends on very skewed lightrays (like the first Nikon 21mm) they will not reach the depth of the outermost pixels while still disturbing neighbouring pixels. With ordinary SLR lenses that have to have their rear suface clearing the mirror, this is not a problem.
The digital camera itself is a small specialized computer which can do far more tricks than any darkroom genius, not only burn vignetted corners or stack several exposures but also correct colour faults , distortion etc. Hence lens-factories can make cheaper , possibly more compact optics and correct the design-faults inside the camera (or in your computer afterwards)
Conclusion, first class M42 optics are designed to take good pictures without later corrections and will remain equally good in front of a digital sensor. (But if you wish for cheaper optics with equally good final results -(as long as the cameraproducers and software makers stay in business and will provide reasonably priced updates) the fully digital route is open.