Skip to content

quic/stream: create gen. getWriter for stream/iter - #66513

Open
martenrichter wants to merge 2 commits into
nodejs:mainfrom
martenrichter:streamiter-getwriter
Open

martenrichter wants to merge 2 commits into
nodejs:mainfrom
martenrichter:streamiter-getwriter

Conversation

@martenrichter

Copy link
Copy Markdown
Contributor

The get writer method of QuicStream is mostly
generell enough to be usuable in other contexts.
This PR is an attempt to move the code out
of the QuicStream object to be usuable in other
parts of node.js.

Fixes #66508

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation. labels Oct 4, 2026
@martenrichter

Copy link
Copy Markdown
Contributor Author

@jasnell @pimterry
That is a first idea of how to move get writer out of QuicStream .
After the interface is discussed and agreed upon, I would then, in another commit, move the code for this part to a place related to stream/iter (where?).
We also need to discuss whether this should remain an internal method or part of the public api.
(In this case, additional checks are necessary)

@martenrichter

Copy link
Copy Markdown
Contributor Author

P.S.: There seem to be some bugs remaining. (I thought I had run all tests, but it seems that I only ran lint and not a full build.) But discussing the structure should work anyway.

@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.43%. Comparing base (2bcc5dd) to head (8a94755).
⚠️ Report is 160 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66513      +/-   ##
==========================================
+ Coverage   90.41%   90.43%   +0.01%     
==========================================
  Files         791      792       +1     
  Lines      275567   276692    +1125     
  Branches    52835    53110     +275     
==========================================
+ Hits       249159   250224    +1065     
- Misses      16813    16861      +48     
- Partials     9595     9607      +12     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)
lib/internal/quic/writer.js 100.00% <100.00%> (ø)

... and 89 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The get writer method of QuicStream is mostly
generell enough to be usuable in other contexts.
This PR is an attempt to move the code out
of the QuicStream object to be usuable in other
parts of node.js.

Fixes nodejs#66508

Signed-off-by: Marten Richter <marten.richter@freenet.de>
@martenrichter

Copy link
Copy Markdown
Contributor Author

Ok, now, everything works according to the local tests.

@martenrichter

Copy link
Copy Markdown
Contributor Author

I do not understand the build failures. It complains about an unknown compiler option? Do I need to rebase?

@pimterry

pimterry commented Oct 9, 2026

Copy link
Copy Markdown
Member

Looks like yes - it's complaining about --allow-overwriting-for-next-flag which I can see has since been dropped: #66524. Looks like this all relates to a recent V8 update.

That said, you'll then run into a separate issue, because that same V8 update has also independently broken the QUIC build 😆. Fix for that landing shortly, it's here: #66603

@martenrichter

Copy link
Copy Markdown
Contributor Author

I have moved getWriter a separate file. It is not in the right place; I think it should go somewhere in the stream/iter dirs.

(I have not rebased, as the fixes for building quic are not on main yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quic/stream/iter: Is QuicStream writer general enough for a base class?

3 participants