Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upList literal with many items leads to "Maximum call stack size exceeded" #840
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Feb 24, 2017
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Feb 24, 2017
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This was referenced Feb 25, 2017
referenced
this issue
in witoldsz/elm-time
Feb 25, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
witoldsz
Feb 25, 2017
Workaround: split your big list and use List.concat, example:
before =
[1,2,3, …, n]
after =
List.concat [ [1,2,3, …], [ 31, 32, 33, …], …] ]
witoldsz
commented
Feb 25, 2017
|
Workaround: split your big list and use before =
[1,2,3, …, n]
after =
List.concat [ [1,2,3, …], [ 31, 32, 33, …], …] ] |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Feb 25, 2017
Contributor
Thisis a duplicate of a known issue: elm/compiler#1521
Please close.
|
Thisis a duplicate of a known issue: elm/compiler#1521 Please close. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
witoldsz
Feb 25, 2017
That's strange, I was looking for an open issue with "maximum" and did not find it.
witoldsz
commented
Feb 25, 2017
|
That's strange, I was looking for an open issue with "maximum" and did not find it. |
witoldsz
closed this
Feb 25, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Looked in the wrong repository? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
witoldsz
commented
Feb 25, 2017
|
You are right! I was looking in elm-core. |
witoldsz commentedFeb 24, 2017
I just discovered that list literals with many items produce a code which crashes at run-time.
Look at this example: https://runelm.io/c/yca
It defines a list with 1000 items and the program will crash before it executes. Sometimes 400 items will be enough to crash the browser, sometimes 600 won't crash.
I have found this when I was trying to work with
elm-community/elm-timelibrary. The bug was filled:elm-community/elm-time#13
Example: https://ellie-app.com/qwD8mkg9TTa1/1
Later, I have found another, unrelated issue with that lib:
elm-community/elm-time#21
and when I was trying to fix that, I have discovered I cannot even build that project, because it was crashing with
Maximum call stack size exceededduringelm-test.There is no hard limit: that very lib defines dict with all possible time zones which is c.a. 600 elements. It sometimes crashes, sometimes it does not, depends on browser and number of opened tabs.