@@ -174,6 +174,7 @@ writeSupportFiles baseOutpath = do
174174 B.writeFile goModSource $ T.encodeUtf8 modText'
175175 callProcess "go" ["mod", "edit", "-replace", replaceLoader]
176176 callProcess "go" ["mod", "edit", "-replace", replaceOutput]
177+ callProcess "go" ["clean", "-modcache"]
177178 writeLoaderFile :: FilePath -> B.ByteString -> IO ()
178179 writeLoaderFile ffiOutpath loaderText = do
179180 let loaderSource = ffiOutpath </> "ffi_loader.go"