From 9af6db691adb44d4fd15c76adf0ea7ca295966ab Mon Sep 17 00:00:00 2001 From: Pit Capitain Date: Sun, 5 Jul 2026 12:40:00 +0200 Subject: [PATCH] Fix a race condition for file o.dat Sometimes, for an empty "elm-stuff" folder, it happened that the compiler tried to read the file "o.dat" before the background writer had created it. --- terminal/src/Develop.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminal/src/Develop.hs b/terminal/src/Develop.hs index 912c5074b..dccc72938 100644 --- a/terminal/src/Develop.hs +++ b/terminal/src/Develop.hs @@ -327,8 +327,8 @@ compile path = return $ Left $ Exit.ReactorNoOutline Just root -> - BW.withScope $ \scope -> Stuff.withRootLock root $ Task.run $ - do details <- Task.eio Exit.ReactorBadDetails $ Details.load Reporting.silent scope root + Stuff.withRootLock root $ Task.run $ + do details <- Task.eio Exit.ReactorBadDetails $ BW.withScope $ \scope -> Details.load Reporting.silent scope root artifacts <- Task.eio Exit.ReactorBadBuild $ Build.fromPaths Reporting.silent root details (NE.List path []) Lamdera.PostCompile.check details artifacts Exit.ReactorBadBuild