Stream: ComponentizeJS

Topic: Windows tests failing in CI


view this post on Zulip Victor Adossi (Oct 14 2025 at 14:00):

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)

view this post on Zulip Victor Adossi (Oct 16 2025 at 09:05):

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.

view this post on Zulip Victor Adossi (Oct 16 2025 at 09:06):

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

view this post on Zulip Ralph (Oct 16 2025 at 14:14):

huh

view this post on Zulip Victor Adossi (Oct 16 2025 at 23:43):

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.

view this post on Zulip Victor Adossi (Oct 16 2025 at 23:46):

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.

Contribute to vados-cosmonic/componentize-js development by creating an account on GitHub.

view this post on Zulip Victor Adossi (Oct 17 2025 at 01:30):

Here's the PR:

https://github.com/bytecodealliance/ComponentizeJS/pull/308

@Till Schneidereit :bow:

This commit fixes an somewhat odd problem with vitest on windows runners in that it cannot process properly await import(...) statements. The changes in this commit represent the minimal changes to...

Last updated: Dec 06 2025 at 07:03 UTC