You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During one of my classes today, on the first day, we gave everyone a simple program (main = drawingOf(codeWorldLogo), and had them all compile and run it. It broke for a lot of students.
Here's what happened:
Many students in the class tried to run their identical programs at the same time.
Since the program had not been compiled yet, each of their handler threads invoked the compiler on the same source file.
One of the compilers finished first, and deleted all the temporary files.
The remaining compilers found that their (still used) temporary files were missing, and failed.
The last compiler won, and wrote the resulting error message. From that point on, attempts to rebuild the same source code returned the same error.
Two things are notable here: First, running many instances of GHC simultaneously with the same output files was probably always doomed. And second, it would be great to retry errors like this. (We don't want to retry successes, though)
The immediate fix seems pretty obvious. Instead of building in-place, we should create a unique temp directory, build there, and then copy the result and delete the temporaries, once the build is done.
The text was updated successfully, but these errors were encountered:
During one of my classes today, on the first day, we gave everyone a simple program (
main = drawingOf(codeWorldLogo)
, and had them all compile and run it. It broke for a lot of students.Here's what happened:
Two things are notable here: First, running many instances of GHC simultaneously with the same output files was probably always doomed. And second, it would be great to retry errors like this. (We don't want to retry successes, though)
The immediate fix seems pretty obvious. Instead of building in-place, we should create a unique temp directory, build there, and then copy the result and delete the temporaries, once the build is done.
The text was updated successfully, but these errors were encountered: