Repository navigation
deps: bundle full sources of undici and not just precompiled blob #42199
Description
Activity
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Mar 3, 2022 What would be the advantage(s) of doing it?
For distributions, we always like to have the sources available so we can build from them. For example, in the future maybe a fix needs to be applied and just upgrading the entire package to the latest version may be no longer compatible.
I guess for Debian, the bundled .js + wasm is not even distributable since it's not preferred source format for modifications.
- changed the title
[-]deps: bundle full sources of indici and not just precompiled blob[/-][+]deps: bundle full sources of undici and not just precompiled blob[/+]on Mar 3, 2022 I guess for Debian, the bundled .js + wasm is not even distributable since it's not preferred source format for modifications.
can yo clarify what you mean by that?
- On 3/4/22 00:18, Michael Dawson wrote: I guess for Debian, the bundled .js + wasm is not even distributable since it's not preferred source format for modifications. can yo clarify what you mean by that?I hope I don't have to re-introduce Free Open Source definition now? :-) But for quick summary, a compiled blob, even if it's portable across platforms, is not free software source since it does not contains the source part. The compilation/compression/bundling (etc) step, takes multiple source files and makes them into a format that is easier to distribute and run, and no longer easier to edit. Any patches or modifications are preferred to by applied on the original sources and recompiled/bundled/etc. Another example of pre-compiled binary is `yarn` or `tsc` npm package -- the github repository where development can take place does not consist of one massive JS file. Anyway, similar discussion on Debian Legal more than a decade ago and I thing I remember that from earlier, https://lists.debian.org/debian-legal/2010/04/msg00003.html - Adam
I think this is a reasonable ask to make floating patches easier but I'm hesitant to sacrifice the developer experience somewhat for it.
For what it's worth and just to be clear undici is open source too and you can change stuff in the "wasm bits" (llhttp, another dep that is also open source), build it and then tell Node.js to use it by updating undici in the deps folder.
Would a process that makes that change easier help or is avoiding having any blobs the important bit?
Note (funnily) Node.js already builds llhttp since it also uses it internally, I wonder how much work it would be to just get that to produce the wasm for undici.
@dnlup worked on the wasm build if I am reading the llhttp repo correctly, maybe he can weigh in?
I opened #42246 which includes a copy of the undici sources in deps/undici/src.
@AdamMajer does #42246 address your concern?
@mhdawson yes, thank you.
@AdamMajer thanks, great to hear wanted to be sure there were not other concerns.
- added a commit that references this issue
on Apr 21, 2022 - added a commit that references this issue
on Apr 25, 2022 - added a commit that references this issue
on May 22, 2026
What is the problem this feature will solve?
Current Nodejs is bundling undici but instead of the sources, we only have a pre-compiled blob.
What is the feature you are proposing to solve the problem?
Bundle the entire indici snapshot in nodejs versions. In sources maybe this could be done with
git submodulesbut also just an outright copy of specific checkout.What alternatives have you considered?
No response