elm-explorations / elm-explorations/test
Yet another Maximum call stack size exceeded error (with Expect.equalLists)
- Dominant language
- Elm
- Stars
- 244
- Forks
- 40
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
I'm sporadically getting the dreaded **RangeError: Maximum call stack size exceeded** with `Expect.equalLists`. Because the occurrence of the error seems to be very sensitive to factors that I don't fully understand, I've put the relevant files for reproduction (all three of them) into a repository at https://github.com/Steve-OH/elm-test-crash.
What's happening: The test fuzzer creates lists of integers that are 99% `1`s and 1% `2`s. (The ratio is not important; it's just there to make the failure conditions more apparent.) The only "test" (such as it is) in the suite compares the original list to a list that has all of the `2`s stripped out, using `Expect.equalLists`. Thus, the test should pass if the original list consists only of `1`s, and fail if the original list contains any `2`s. The test does pass in the first case, but rather than failing in the second, it crashes with **RangeError: Maximum call stack size exceeded**.
The crash seems to be dependent on factors that you wouldn't expect to be relevant, such as whether the Elm code is in a package (crashes reliably) or in an application (I could not get it to crash that way).
Reported info:
OS: Windows 10.0.18362.0 (version 1903 build 18362.657)
elm --version: 0.19.1
elm-test --version: 0.19.1-revision2
node --version: v12.13.1
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the three-file reproduction repository linked in the issue and run it with Elm 0.19.1, elm-test 0.19.1-revision2, and Node 12.13.1. Compare the package and application cases around Expect.equalLists; done means the failing list comparison reports a test failure instead of raising a RangeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100