Hey so I'm sure people have noticed at this point, but the Windows tests are failing in CI -- both on windows-latest and windows-2022 at this point.
It's not clear what is causing this so I'm probably going to do some investigation in a PR-that-should-not-be-merged or something to try to get some logs. Right now all we see is:
Run npm run test:release
> @bytecodealliance/componentize-js@0.19.1 test:release
> vitest run -c test/vitest.ts
RUN v3.2.4 D:/a/ComponentizeJS/ComponentizeJS
Error: The operation was canceled.
(With the test taking hours)
Good news! I've gotten the tests running again on Windows again -- I'm now whittling down the PR to get to a decent minimal set of improvements, and check for the 70234th time that the cause I saw is indeed right.
The problem seems to be that on windows the following code causes a hang when vitest tries to run it:
const someFilePath = "some" + "/calculation" + "/to-file.js";
const module = await import(someFilePath);
return { module, someFilePath };
Weirdly enough, as long as await and import aren't right next to each other, the hang doesn't happen.
So returning the promise directly:
return import(someFilePath)
Also just splitting up the import and await:
const modulePromise = import(...);
const module = await modulePromise;
And doing something silly like slightly processing the input:
const module = await import(someFilePath.toLowerCase());
Absolutely wild. Have confirmed this behavior many times, going to confirm it once more before I push the final (probably chunked -- one minimal then follow up general improvements) up.
Another issue is the incredibly slowness of the windows runners on GitHub CI, but that's well known at this point.
I haven't rootcaused the failure inside vitest or tested whether this happens outside vitest (whether await import(...) fails in just a regular script... But I'll save that for later
huh
Well a bit late but it looks to be a vitest problem (a regular node script doesn't have this problem)... Looks like I should probably file a repro upstream at some point.
And yup, verified once more for my own sanity -- this commit triggers the stall, somehow.
Guess I need to wait an hour for the test to actually time out to be 100% sure but it's been 15 minutes and the working runs pass in 10.
Here's the PR:
https://github.com/bytecodealliance/ComponentizeJS/pull/308
@Till Schneidereit :bow:
Last updated: Dec 06 2025 at 07:03 UTC