Skip to content

stream: move to internal/streams - #35239

Closed
mcollina wants to merge 1 commit into
nodejs:masterfrom
mcollina:move-streams-to-internal
Closed

stream: move to internal/streams#35239
mcollina wants to merge 1 commit into
nodejs:masterfrom
mcollina:move-streams-to-internal

Conversation

@mcollina

Copy link
Copy Markdown
Member

Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.

See: nodejs/readable-stream#348

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Sep 17, 2020
@mcollinamcollina added stream Issues and PRs related to the stream subsystem. request-ci Add this label to start a Jenkins CI on a PR. labels Sep 17, 2020
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 17, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronagronag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mcollina

Copy link
Copy Markdown
MemberAuthor

@richardlau

Copy link
Copy Markdown
Member

@nodejs/testing is https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/16442/testReport/junit/(root)/test/parallel_test_bootstrap_modules/ a flake or something I should take of?

It's not a flake. This test detects when the modules loaded on startup have changed from the expected set. In this case it's the modules loaded by using workers. It's okay to change the expected set in the test -- the test is there to make sure this is a deliberate change (as is the case here) and to expose if anything is being unnecessarily loaded.

Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.
See: nodejs/readable-stream#348
@mcollina
mcollinaforce-pushed the move-streams-to-internal branch from 4d47eac to f451ab0CompareSeptember 17, 2020 14:21
@mcollinamcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 17, 2020
@mcollina

Copy link
Copy Markdown
MemberAuthor

For posterity, I run the failing test with: ./tools/test.py --worker parallel/test-bootstrap-modules

@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 17, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollinamcollina added commit-queue Add this label to land a pull request using GitHub Actions. dont-land-on-v10.x labels Sep 21, 2020
@github-actionsgithub-actionsBot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 21, 2020
@github-actions

Copy link
Copy Markdown
Contributor

Landed in 9c62e0e

nodejs-github-bot pushed a commit that referenced this pull request Sep 21, 2020
Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.
See: nodejs/readable-stream#348
PR-URL: #35239
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
@mcollina
mcollina deleted the move-streams-to-internal branch September 21, 2020 08:24
@ruyadorno

Copy link
Copy Markdown
Member

This does not land cleanly on v14.x-staging - Should it be backported to v14?

@mcollina

Copy link
Copy Markdown
MemberAuthor

Yes it should, I'll work on the backport.

@mcollina

Copy link
Copy Markdown
MemberAuthor

@ruyadorno backport in #35349.

mcollina added a commit to mcollina/node that referenced this pull request Dec 2, 2020
Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.
See: nodejs/readable-stream#348
PR-URL: nodejs#35239
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
BethGriggs pushed a commit that referenced this pull request Dec 2, 2020
Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.
See: nodejs/readable-stream#348
PR-URL: #35239
Backport-PR-URL: #35349
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
@BethGriggsBethGriggs mentioned this pull request Dec 10, 2020
Readable.ReadableState = ReadableState;

const EE = require('events');
const Stream = require('internal/streams/legacy');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally this line used to be

const Stream = require('stream');

which would cause full initialization of the 'Stream' library, which is required in line 97 to get access to Stream.Duplex. This is likely the root cause of #36615

@mcollina

Copy link
Copy Markdown
MemberAuthor

The fix is in #36618 and it's pretty straightforward.

joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Move all the streams constructors to internal/streams
and avoid a circular dependencies between the modules.
See: nodejs/readable-stream#348
PR-URL: nodejs#35239
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / srcIssues and PRs related to general changes in the lib or src directory.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@mcollina@nodejs-github-bot@richardlau@ruyadorno@lpinca@watilde@ronag@ledbit@targos