ComponentizeJS icon indicating copy to clipboard operation
ComponentizeJS copied to clipboard

Latest version seems to depend on `wasi:cli/[email protected]`

Open karthik2804 opened this issue 10 months ago • 3 comments

With the release of ComponentizeJS v0.17.0 we seem to have a hard dependency on the target world wit importing wasi:[email protected]. This seems to be due to StarlingMonkey trying to call environ_sizes_get. Here is a repro case https://github.com/karthik2804/componentizejs-env-bug-repro.

This was not a requirement in the previous versions of componentizeJS.

karthik2804 avatar Feb 24 '25 11:02 karthik2804

@tschneidereit pointed out that this would be the reason for it https://github.com/bytecodealliance/StarlingMonkey/blob/cd722519dc81b03a0db0afff4f6bf79a18169c83/host-apis/wasi-0.2.0/host_api.cpp#L1037

karthik2804 avatar Feb 24 '25 13:02 karthik2804

We used to stub out environment after Wizering. If we add https://github.com/bytecodealliance/ComponentizeJS/issues/190 to allow enabling / disabling the env feature, we could then support stubbing env post-Wizer to create pure components again.

Also, that this slipped through is because we don't have a proper pure component test at the moment, we should ideally have one of those.

guybedford avatar Feb 25 '25 16:02 guybedford

I think this is a bug more in StarlingMonkey than here: the env reset should only happen where it does if the debugging opt-in happened during wizening.

We should also fix the issue here to restore pure components, of course :)

tschneidereit avatar Feb 27 '25 11:02 tschneidereit

This should be fixed by this PR: https://github.com/bytecodealliance/StarlingMonkey/pull/249

andreiltd avatar Jul 16 '25 17:07 andreiltd

In a somewhat roundbout fashion, this is confirmed fixed via the automated example tests in Jco!

vados-cosmonic avatar Aug 06 '25 16:08 vados-cosmonic