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
Test on Node 10, 12 and latest #254
Conversation
https://travis-ci.org/jlfwong/speedscope/jobs/637907131#L291 This is due to the v8 changes affecting
https://v8.dev/blog/array-sort expect(received).toEqual(expected) // deep equality
- Expected
+ Received
Array [
- "a;b;e",
- "a;b;b",
- "a;b;c",
"a;b;d",
+ "a;b;c",
+ "a;b;b",
+ "a;b;e",
"a;b",
"a",
] |
See moment/moment-timezone#762 for example. The rest of the failing tests seem to be because of the differences in the tracing and performance of NodeJS >= 12. |
Iiiinteresting. Thanks! I'll check out the branch sometime in the next few weeks and see if I can work through the sources of the issues. Thanks for the diagnosis and links to references! |
Closing this since it's superseded by #263. Thanks again for filing this and explaining the sort stability issue -- it probably would've taken me a very long time to figure out root cause without the explanation! |
@JustinBeckwith pointed out in #262 that `npm install` was broken in node 13.x, and @DanielRuf pointed in #254 that test fail for node 11+ because of a change to stability of sorting. This PR seeks to address both of those. The installation issue was fixed by just regenerating `package-lock.json` without needing to bump any of the direct dependency versions. The test failure issue requires manual intervention. To fix the sort stability issue, I updated the tests to use the stable sort values (these were all the correct values, though some of the test values were incorrect). To make the suite still pass for node 10, I added a hack where I override `Array.prototype.sort` with a stable implementation that's *only* used in tests (See comments in code for a justification for why) ## Test Plan Before this PR: `npm install` on node 13.x fails & `npm run jest` results in test failures After this PR: `npm install` on node 13.x passes & `npm run jest` passes for node 10, 12, and 13.
…wong#263) @JustinBeckwith pointed out in jlfwong#262 that `npm install` was broken in node 13.x, and @DanielRuf pointed in jlfwong#254 that test fail for node 11+ because of a change to stability of sorting. This PR seeks to address both of those. The installation issue was fixed by just regenerating `package-lock.json` without needing to bump any of the direct dependency versions. The test failure issue requires manual intervention. To fix the sort stability issue, I updated the tests to use the stable sort values (these were all the correct values, though some of the test values were incorrect). To make the suite still pass for node 10, I added a hack where I override `Array.prototype.sort` with a stable implementation that's *only* used in tests (See comments in code for a justification for why) ## Test Plan Before this PR: `npm install` on node 13.x fails & `npm run jest` results in test failures After this PR: `npm install` on node 13.x passes & `npm run jest` passes for node 10, 12, and 13.
It seems the builds for 12 and latest fail because of different snapshots.