Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream: move to internal/streams #35239

Closed
wants to merge 1 commit into from

Conversation

mcollina
Copy link
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-bot nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Sep 17, 2020
@mcollina mcollina 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-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 17, 2020
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

Nice!

@mcollina
Copy link
Member Author

@richardlau
Copy link
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 mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 17, 2020
@mcollina
Copy link
Member Author

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

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

@mcollina mcollina added commit-queue Add this label to land a pull request using GitHub Actions. dont-land-on-v10.x labels Sep 21, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 21, 2020
@github-actions
Copy link
Contributor

Landed in 9c62e0e

@github-actions github-actions bot closed this Sep 21, 2020
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
Member

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

@mcollina
Copy link
Member Author

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

@mcollina
Copy link
Member Author

@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>
@BethGriggs BethGriggs mentioned this pull request Dec 10, 2020
Readable.ReadableState = ReadableState;

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

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
Member Author

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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants