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
constfs=createSyncFileSystem(makeVirtualFileSystem());fs.writeFile("index.html","hallo");fs.writeFile("index2.html","hallo");createEffect(()=>fs.readFile("index.html"));test("index.html");test("index2.html");functiontest(path: string){try{fs.rm(path)constresult=fs.readFile(path);console.error(`FAILURE ${path}: Expected throw but received "${result}"`);}catch(error){console.log(`SUCCESS ${path}`);}}
Currently
the test for index.html will fail, because it received "hallo" from fs.readFile
the test for index2.html will succeed, because fs.readFile threw
Reading the file in an effect seems to cause the file to not be cleaned up when being removed.
I currently assume that we keep the data signal in the effect's closure, thus readfile expects it to be there. We need to set the signal to undefined before we drop it from the set.
Update: preparing a fix, but I'm a bit busy right now, so it'll take some time.
atk
linked a pull request
Jun 4, 2025
that will
close
this issue
Describe the bug
Given the following testing setup:
Currently
index.html
will fail, because it received"hallo"
fromfs.readFile
index2.html
will succeed, becausefs.readFile
threwReading the file in an effect seems to cause the file to not be cleaned up when being removed.
Minimal Reproduction Link
https://playground.solidjs.com/anonymous/a4c5374f-9432-4ec1-bf37-e65888e54a8f
The text was updated successfully, but these errors were encountered: