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: Made unit test passing with node-chakracore #233
Conversation
Thanks @kunalspathak ! It looks like we cannot support Chakracore with this module if our deep parsing test does not pass, sorry! |
The value 500 has already been promised to users. We can evaluate if Chakracore is a viable platform for us to use in the next major version, through, but in order to even do that, we need to test against Chakracore on Travis CI as a prerequisite, if you have any information on how we can set that up. |
Sorry, didn't mean to close, but need to determine what the reason for the loss of supported depth is and how we can get 500 supported on Chakracore before I can merge this. |
P.S. I flagged this PR as "needs tests" since there are no tests for this--i.e. if I revert the code after merging the CI will not flag any failures, so we have no way to keep these working down the road after this first merge. |
This should happen automatically once we start having CI for node-chakracore.
I didn't spend much time on why we were getting stack overflow. The call stack came from some node_module 'qs'. I will take a look more closely tomorrow an update this thread.`
Just curious, could you point me to the doc that calls that out?
As mentioned in expressjs/express#3251 (comment) , if you could point me to your existing Travis CI scripts, I can take a look to see how to support |
Oh, would that show up in the PRs on this repo ? (i.e, the status API on GitHub) |
It should, and it can be configured in the setup scripts. I will dig a bit more and let you know. |
Sweet! That would just be something we add to the |
Regarding To summarize, it is not a |
Gotcha, awesome 👍 it sounds like it's just that our dependency doesn't yet support chakracore, then? Probably would need our major dependencies like |
I verified running unit test for |
Ok. I mean, really the main blocker to accepting this is that I need instructions (or you can update the PR) on getting Chakracore running on our CI, so that we can actually test these changes. |
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.
Needs CI validation of changes.
Sure. I will work on that in next few days. |
@dougwilson - Can you follow these instructions to enable |
65af056
to
822f724
Compare
@jasongin - FYI |
Travis is failing because of same problem as mentioned here. Can you please take a look and suggest what is needed? |
@kunalspathak I don't see anything obvious from looking at the output, just that the |
The mocha not-found issue is because the CI script needs to include an explicit call to However, @kunalspathak was referring to a different issue, about the Node-ChakraCore install failing due to the GitHub API rate-limiting, as described at https://github.com/jasongin/nvs/blob/master/doc/CI.md#github-api-tokens |
In the recent |
Is testing against |
You are right, it was a typo, but still nvs will complain for it. |
Not that I know of. I just never tried because hardly anyone still uses node < 0.10. |
So yes, the |
Oh, sorry, I was away and you mentioned above the issue was with If those are allowed to fail, they would appear in an entirely different section in the Travis CI build list, but they aren't. My only assumption is that it's maybe because Travis CI doesn't support doing this though environment variables? Not sure, because I see you listed them, but Travis CI doesn't agree. Perhaps you have to list the entire build environment to work? I.e. you may need to add the |
@dougwilson - I have switched back to use |
That's correct, which I am working on landing now, to merge this tonight. |
test/urlencoded.js
Outdated
@@ -177,7 +177,7 @@ describe('bodyParser.urlencoded()', function () { | |||
it('should parse deep object', function (done) { | |||
var str = 'foo' | |||
|
|||
for (var i = 0; i < 500; i++) { | |||
for (var i = 0; i < 250; i++) { |
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.
Looks like this is no longer a needed change with current ChakraCore (or, at least with current master
and ChakraCore).
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.
Nevermind... I didn't think the error would be SyntaxError: JSON.parse Error: Invalid character at position:1
. I wonder what is going on here...
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.
Ah, Out of stack space
on the server, like you said up top, haha.
Testing to see if the review is preventing PR from running through CI.
828459a
to
ed241a9
Compare
Sorry if my pushes are causing noise; the CI wasn't running the PR because of merge conflict, so I rebase on top of current master (which has the npm 5 support), but now trying to figure out why chakra core is not running. |
I will take a look tomorrow. |
@dougwilson - Looks like the problem was that |
ea8a40b
to
8b78ce1
Compare
So I just rebased your PR to incorporate the JSON changes that are in Anyway, the current ChakraCore is failing on
|
PR made to qs: ljharb/qs#224 So we basically have the following on the checklist: (1) qs gets a fix to not blow the stack of deep objects |
|
8b78ce1
to
5a574bd
Compare
Thanks for the quick turn-around @ljharb ! @kunalspathak I rebased your PR here on top of the current |
Thanks. I will take a look.
|
The underlying changes in this PR have been adapted, but with node-chakracore being archived, it doesn't make sense to land the last bit, which is the CI testing. |
There were 3 unit test that were failing with node-chakracore because of error message difference between v8 and chakracore. Added logic to generate error on fly and use that to compare the error message.
For
should parse deep object
test case, chakracore throwsOut of stack
for size500
depth. v8 throws after800
limit and the variation is because different size for stack probing. Restricted the depth to250
which should be good enough to validate the depth and not throw.Ref: nodejs/node-chakracore#189