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

Travis: Also build with node.js 11 to showcase failure #55

Merged
merged 1 commit into from
Nov 29, 2018

Conversation

papandreou
Copy link
Contributor

Looks like there's also breakage with node.js 11. They should just stop changing those internals already :)

@moll
Copy link
Owner

moll commented Nov 26, 2018

Thanks for the heads up! If only people gave up novelty for novelty's sake we could all take some time off. :P

Do you by any chance know whether Node v11.0 works with Mitm.js and it's only the latest, v11.2, that breaks? You haven't looked into why it fails yet, right?

@papandreou
Copy link
Contributor Author

Didn't drill any further into it, no.

Playing around with nvm just now it appears that it actually does work with node 11.0.0, but that it broke with 11.1.0. Unfortunately nothing seems to stand out in the changelog for 11.1.0. I guess that leaves git bisect.

@moll
Copy link
Owner

moll commented Nov 26, 2018

I did a quick diff between Node.js's v11.0 and v11.1 tags and have a feeling I know where the problem is. stream_base_commons.js expects the byte count previously given to onStreamRead to be now given in a mutable property. I'll test if that feeling is correct.

Without knowing much about the reasons, it does sure seem like poor technical design to pass arguments to functions through mutable properties on contexts (this).

@moll
Copy link
Owner

moll commented Nov 26, 2018

I got Node v11.1 working in /~https://github.com/moll/node-mitm/tree/fixes/node-v11.1.
v11.2 seems to have made even further changes. I'll get to that soon.

@papandreou
Copy link
Contributor Author

papandreou commented Nov 26, 2018

Haha, awesome, great work! I wasn't even done bisecting yet :)

@moll
Copy link
Owner

moll commented Nov 26, 2018

And now pushed what I believe to be the only breaking change between v11.1 and v11.2.
Would you mind giving it a spin with any real codebase of yours? I'm unsure if my interpretation of Node's internal socket/handle's shutdown method is exactly right, but if it works for you and me, I'm willing to ship it. ^_^

@papandreou
Copy link
Contributor Author

@moll, those changes make the unexpected-mitm, assetgraph, httpception, and subfont test suites work with node.js 11.2.0. So all good from here! 🎉

@moll
Copy link
Owner

moll commented Nov 26, 2018

Great, thanks! Btw, have any so-called end-user facing webapps you've tested with Mitm.js, too?

@papandreou
Copy link
Contributor Author

I don't have any such things at the moment, no.

@alexjeffburke, could you help testing in a real app? :)

@alexjeffburke
Copy link

@papandreou yeah I think I've got enough stuff at work to hand I can exercise it pretty well :) @moll examples include small clients used as modules larger apps as well the handlers that compose those bits. While we're chatting thanks very much for the support and if you can give me a day or so I'll gladly check things on node 11.2+.

@moll
Copy link
Owner

moll commented Nov 26, 2018

Thanks, @alexjeffburke. I'll await for your signal!

@alexjeffburke
Copy link

I'm sorry this has taken a little longer than I'd hoped (setting up the testing rig took a small amount of doing) but I can now say that I've seen modules that face the real world run against mitm on node 11.3. Examples include HTTP handlers, clients and in one case a streaming XML parser. I think that is enough to conclude that this is working correctly and is great news 🎉

@moll moll merged commit 6027ca9 into moll:master Nov 29, 2018
@moll
Copy link
Owner

moll commented Nov 29, 2018

Thank you both for your help! I threw v1.5 out.

papandreou added a commit to unexpectedjs/unexpected-mitm that referenced this pull request Nov 29, 2018
Includes the node 11 fixes discussed in
moll/node-mitm#55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants