Skip to content

deps: bundle full sources of undici and not just precompiled blob #42199

Description

@AdamMajer

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 submodules but also just an outright copy of specific checkout.

What alternatives have you considered?

No response

Activity

  1. targos commented on Mar 3, 2022

    @targos
    Member

    What would be the advantage(s) of doing it?

  2. AdamMajer commented on Mar 3, 2022

    @AdamMajer
    ContributorAuthor

    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.

  3. 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
  4. mhdawson commented on Mar 3, 2022

    @mhdawson
    Member

    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?

  5. AdamMajer commented on Mar 4, 2022

    @AdamMajer
    ContributorAuthor
  6. benjamingr commented on Mar 5, 2022

    @benjamingr
    Member

    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?

  7. added a commit that references this issue on Mar 7, 2022
  8. targos commented on Mar 7, 2022

    @targos
    Member

    I opened #42246 which includes a copy of the undici sources in deps/undici/src.

  9. mhdawson commented on Mar 7, 2022

    @mhdawson
    Member

    @AdamMajer does #42246 address your concern?

  10. AdamMajer commented on Mar 9, 2022

    @AdamMajer
    ContributorAuthor

    @mhdawson yes, thank you.

  11. mhdawson commented on Mar 9, 2022

    @mhdawson
    Member

    @AdamMajer thanks, great to hear wanted to be sure there were not other concerns.

  12. added a commit that references this issue on Mar 21, 2022
  13. added a commit that references this issue on Apr 21, 2022
  14. added a commit that references this issue on Apr 25, 2022
  15. added a commit that references this issue on May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions