-
Notifications
You must be signed in to change notification settings - Fork 66
Invert dependency between core and readable-stream #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor nits, overall looking 💯 - in line with prior discussions both within the WG and with TSC members
00X-streams.md
Outdated
## Description | ||
|
||
The `readable-stream` module is one of the most popular modules on NPM, | ||
with 33 millions download per month. `readable-stream` is the basis of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: s/millions/million
00X-streams.md
Outdated
`readable-stream` is an export of the latest stream API from the Node.js, | ||
done via a mixture of babel transpiling and regular expressions. The export | ||
means that readable-stream has to follow the Node.js release cycle, and it | ||
is not versioned independently. Specifically, versioning of readable-stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we have backticks on readable-stream
here to be consistent with prior spelling?
00X-streams.md
Outdated
## Process / Timeline | ||
|
||
1. move the code of streams into `readable-stream` | ||
2. amend the build script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which build script are you referring to? Perhaps being specific might be helpful (:
00X-streams.md
Outdated
|
||
1. move the code of streams into `readable-stream` | ||
2. amend the build script | ||
3. rewrite the tests to use something like `tape` to easily check against both the node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we don't even need to mention example of tools, just the goal and generic solution could be enough
+1 |
00X-streams.md
Outdated
## Challenges | ||
|
||
1. export git history from node.js | ||
2. issues handling between the two repositories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this should say:
handling issues between the two repositories
the other way around sounds confusing. Apologies for not spotting it on the gist version of this EPS \o/
woot woot! 🎉 ✨ |
Adressed @lrlna @yoshuawuyts comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one
00X-streams.md
Outdated
as the latest `stream` from Node.js supports some features that cannot be ported | ||
to all versions of Node.js. | ||
|
||
This EPS proposes to invert that dependency, and have Node.js include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: singular of "EP's" is "EP". "Node-EP" == "Node Enhancement Proposal"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks!
00X-streams.md
Outdated
4. merge back all changes that happened in the meanwhile, and sync up | ||
5. add `nodejs/readable-stream` inside deps of Node.js, and remove the streams implementation | ||
6. bump *minor* version of `readable-stream` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add documentation to this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasnell I agree. However it's a discussion to have with @nodejs/documentation, which did not happen yet.
It's listed in the "Challenges" section, meaning that after we decide this is a good thing to explore, we can engage in all the relevant discussions to make this happen.
@nodejs/streams maintain readable-stream
and streams in core, and it helps with the docs, but it is not responsible for them.
If we decide this is a good idea, then we need to decide where docs should live. What do you all think about where streams docs should live?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The streams docs should live with the streams project. We can maintain a copy of those with the node.js docs, but the source of truth for those should be readable-streams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasnell I will update the EP with those point, considering also docs. I agree with you that Node.js should maintain a full copy of the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0445eb2
to
443c459
Compare
Is it even possible at this point? What about core using private properties? |
@vkurchatkin I think most of the streams modules on npm use some form of private properties of streams. I do not see any problem or differences if core keeps doing that. Most of private properties are also tested right now (see https://github.com/nodejs/node/projects/2), so we can track any possibly breaking changes. IMHO I'm all in for documenting them and make them public, see nodejs/node#7629. |
I think it may be better to try doing this with |
The plan sounds solid in principle. My biggest concern is that reporting and fixing issues could become a slower process across multiple repos, and that code review to |
00X-streams.md
Outdated
1. export git history from node.js | ||
2. handling issues between the two repositories | ||
|
||
These challenges needs to be adressed with the rest of the node collaborators. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to be addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
A couple of notes: at the moment, the Among the advantages, we can have a shorter release cycle and we can validate changes to |
@nodejs/ctc what is the process to land this? who should accept it? |
Chiming in, I think when we would make up a sum, how long processes take combined with the overhead of managing a big repo we would see that decentralised management would shorten the issue to fix lifecycle in net. Even if the e2e issue lifetime and brokerage would take longer, the overhead of aligning a lof of people and different tasks to a single process consumes a lot of unproductive time. Issue brokerage could be a very impactful task for a bot. |
I guess you’d label this |
thanks @addaleax! It would be good to have the workflow for the eps in the README. @nodejs/collaborators what do you think about this ep? Are there any concerns that are not covered or addressed in the document? |
The impact of this concerns me, we have very little experience doing this level of decoupling and if done wrong it is going to impact everybody. I like @Fishrock123's idea of starting out with some more specific comments:
Existing packages should require the current semver version, bumping the semver should thus not affect existing packages. Can you elaborate on this?
I respect |
@AndreasMadsen thanks for your comment, I took some time to reply to this, sorry it would be a long reply.
I agree. We can leave this as pending for the time being, and when that node-inspect decoupling happens we can move this forward. I'm happy to be part of the team that does the decoupling, so I can bring forwards some of the lesson learned.
Ideally support streams in older versions of Node and browsers. Streams are an overall compatibility layer that enable a very wide ecosystem of modules to work mostly everywhere.
At the moment the battle is V8-now vs V8-old. I do not see making streams slower as something that could happen anytime soon. The whole wg is invested in making streams faster in Node.js and not breaking compatibility. If we can improve the performance in other platforms without compromising Node, we will. At this point, our only benchmarks are in Node.js. We can add that sentence to the Streams WG description and responsibility, if you think we should make it official.
We are already monkey-patching things quite a bit in readable-stream. This will not change, as we will target the latest Node.js as the primary development platform. There are two place where this is currently happening, and we handled both without breaking 0.8, 0.10 and 0.12 support. Eventually we will drop them as they fade out of usage. I will update the EP to reflect this.
If we bump the major, there will be a lot of modules to update (1308), and they will do it on their own time. This will cause a lot of the ecosystem to be upset, because they will likely have two or three versions of readable-stream in the tree. And the community is already complaining about
Can you clarify this point?
What are the priorities Node has for streams? |
It is referring to:
Could you explain why we need |
I have updated the proposal, clarifying some points as we discussed. @AndreasMadsen I will add some more clarification about what role |
@AndreasMadsen I've added an explanation on why |
@nodejs/ctc we are ready to discuss this, can someone put the ctc-agenda label on this? |
At the end it says "We think we should target this to be shipped in Node 8." is that still the goal ? It seems pretty close to our target ship date for Node version 8. |
@mhdawson not really. This got stuck for a while, consider it Node.js 9. |
Discussed again in CTC meeting. Nothing really new although I voiced my support of this switch of responsibility & authority. It seems like it should probably be removed from the CTC agenda until it requires a vote? Perhaps leave on ctc-review unless @mcollina feels that discussion has been exhausted and it needs to be resolved with a vote. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fwiw, I think this makes sense. The readable_streams group is Node.js WG, they are not going to compromise the performance of Node.js-latest in order to support old Node versions, and this will aid their maintenance. Sounds good to me.
Feel free to move this to ctc-review, as I do not have management rights on this repo. |
Closing, but of course comment or re-open if closing isn't right. |
As we discussed several times in person and in WG meetings, this is the EPS to invert the dependency between Node.js and readable-stream.
cc @nodejs/streams