undici icon indicating copy to clipboard operation
undici copied to clipboard

Ability to externalize WASM was broken

Open mhdawson opened this issue 1 year ago • 10 comments

Bug Description

This PR introduced the ability to externalize WASM, which is needed by distros to be able to rebuild all components shipped: https://github.com/nodejs/undici/pull/2643

PR https://github.com/nodejs/undici/pull/3074 broke this by removing some of the implementation needed.

Reproducible By

Build as specified in the undici CONTRIBUTING.md - https://github.com/nodejs/undici/blob/main/CONTRIBUTING.md#building-for-externally-shared-node-builtins

and validate that the wasm is not in the expected place

Expected Behavior

After building as described in the undici CONTRIBUTING.md - https://github.com/nodejs/undici/blob/main/CONTRIBUTING.md#building-for-externally-shared-node-builtins

the wasm binary should be in the expected place

Logs & Screenshots

Environment

Additional context

mhdawson avatar Jun 19 '24 13:06 mhdawson

@Uzlopak

ronag avatar Jun 19 '24 13:06 ronag

There is some discussion in the PR after it landed, goal is to add back the parts that were removed but still needed while keeping what was optimized in https://github.com/nodejs/undici/pull/3074

mhdawson avatar Jun 19 '24 15:06 mhdawson

Yes, we discussed this, I kind of lost track of it.

Uzlopak avatar Jun 19 '24 16:06 Uzlopak

Should we revert?

@mhdawson how can we test for this in a meaningful way so we don't regress?

mcollina avatar Jun 19 '24 19:06 mcollina

I was talking about that a bit with Richard. I don't know the undici tests well enough to know off the top of my head, but building with the option enabled and validating that the wasm file is were it's expected afterwards was what we thought might work.

mhdawson avatar Jun 19 '24 21:06 mhdawson

@mhdawson if any of you can drop a PR for this, it would be very useful to prevent further issues.

mcollina avatar Jun 20 '24 07:06 mcollina

Actually it just needs like 5 more lines, I promise I will provide a PR tonight at latest midnight (German Time),

Uzlopak avatar Jun 20 '24 08:06 Uzlopak

@Uzlopak do you mean you will include the testing in your PR?

mhdawson avatar Jun 20 '24 15:06 mhdawson

I will also provide a test.

Uzlopak avatar Jun 20 '24 17:06 Uzlopak

@Uzlopak Any updates?

khardix avatar Jul 03 '24 11:07 khardix

@Uzlopak just wondering if there is something I can do to help this along? If you have the right way in mind to fix but just don't have time maybe we can get together to do some knowledge transfer and either myself or @richardlau can help out?

mhdawson avatar Jul 09 '24 14:07 mhdawson

I'm working on this and should be able to open a PR either later today or tomorrow (trying to get a working GitHub Actions flow in place so future regressions can be detected).

richardlau avatar Jul 25 '24 16:07 richardlau

PR: https://github.com/nodejs/undici/pull/3421

richardlau avatar Jul 26 '24 00:07 richardlau