In my case, a recursive function was written in such a way that it couldn't
benefit from tail-call optimization. It was in 0.17. That was the only time
I've encountered the error.

On Sun, Dec 4, 2016 at 3:58 PM, Richard Feldman <[email protected]
> wrote:

> Is this true only when the debugger is running? I've heard of people
> hitting this when the debugger is running (e.g. in elm-reactor, which
> always has the debugger running) but not so much with a plain old elm-make.
>
> On Saturday, December 3, 2016 at 8:01:13 PM UTC-8, Nick Hollon wrote:
>>
>> I have run into this before. It can be caused by runaway recursion. Can
>> you share your Elm code with us?
>>
>> On Dec 2, 2016, at 8:42 AM, Iain Gray <[email protected]> wrote:
>>
>> I'm having a strange problem and was wondering if anyone had any
>> suggestions on how to pinpoint what is causing it.
>>
>> I have an Elm app that compiles in 0.18, but the generated javascript
>> code is throwing a "RangeError: Maximum call stack size exceeded" as soon
>> as the javascript file is loaded into Chrome. I do not have this problem in
>> Firefox, but I can reproduce it in nodejs/esprima as follows:
>>
>> var esprima = require('esprima');
>> var fs = require('fs');
>> var filePath = path.join('.', 'elm.js');
>>
>> fs.readFile(filePath, 'utf8', function(err, data) {
>>   console.log(esprima.parse(data));
>> });
>>
>> RangeError: Maximum call stack size exceeded
>>     at isKeyword (.../node_modules/esprima/esprima.js:359:23)
>>     at scanIdentifier (.../node_modules/esprima/esprima.js:729:20)
>>     at advance (.../node_modules/esprima/esprima.js:1573:21)
>>     at lex (.../node_modules/esprima/esprima.js:1691:78)
>>     at expect (.../node_modules/esprima/esprima.js:2521:21)
>>     at parseObjectInitializer (.../node_modules/esprima/esprima.js:3047:9
>> )
>>     at inheritCoverGrammar (.../node_modules/esprima/esprima.js:2681:18)
>>     at parsePrimaryExpression (.../node_modules/esprima/esprima.js:3247:
>> 20)
>>     at inheritCoverGrammar (.../node_modules/esprima/esprima.js:2681:18)
>>     at parseLeftHandSideExpressionAllowCall (.../node_modules/esprima/
>> esprima.js:3414:20)
>>
>> If I start node with --stack-size=1200, I no longer get the error and
>> esprima can successfully parse the code. Unfortunately, I can't seem to do
>> this with Chrome. I tried:
>>
>>   <script type="text/javascript">
>>     Error.stackTraceLimit = 1200;
>>     var js = document.createElement("script");
>>     js.type = "text/javascript";
>>     js.src = './elm.js';
>>     document.body.appendChild(js);
>>   </script>
>>
>> ... which doesn't seem to change anything.
>>
>> I've been commenting out different sections of my code in an attempt to
>> see what part is ultimately causing this, but that has been pretty painful.
>> If anyone has any suggestions, I'd love some advice.
>>
>> Thanks,
>> Iain
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to