Skip to content
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

Renamer stack-overflows on large test suites #517

Open
marzipankaiser opened this issue Jul 2, 2024 · 1 comment
Open

Renamer stack-overflows on large test suites #517

marzipankaiser opened this issue Jul 2, 2024 · 1 comment

Comments

@marzipankaiser
Copy link
Contributor

When writing large test suites using the test stdlib, Renamer reaches a stack overflow. (With even larger test suites, doubling the number of tests in the example below, Namer will stack overflow.)

Reproducing the issue

Test suite that triggers a stack overflow in Renamer for me:

import test

def main() = {
  suite("Testsuite") {
    test("A test") { assert(1,1) } // repeated 500 times
  }
}

https://gist.github.com/marzipankaiser/407983d6cb012e11c03753afeb464bed

I have not, as of yet, managed to reproduce the issue with simplified higher-order functions (not from the test stdlib), but I would assume it's possible.

Expected behavior

I would expect a long (not highly nested) program to compile normally.

@marzipankaiser
Copy link
Contributor Author

marzipankaiser commented Jul 2, 2024

I'm not sure if we want to fix this, but at least wanted to document it, since @sideburns3000 ran into it.
There is a simple workaround, though (split the test suite into multiple smaller ones or shrink it to fewer tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant