question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Further regression with a `Recursion Limit Exceeded` error

See original GitHub issue

Regression reproduced based on the failure in Open CB #17825. Problem found in sangria-graphql/sangria

Compiler version

3.2.2-RC1-bin-20221103-bf808b3-NIGHTLY

Minimized code

trait Tagged[U]
type WithTag[+T, U] = T & Tagged[U]

trait FromInput[Val]
implicit def coercedScalaInput[T]: FromInput[WithTag[T, Int]] = ???
implicit def optionInput[T](implicit ev: FromInput[T]): FromInput[Option[T]] = ???

trait WithoutInputTypeTags[T]
implicit def coercedOptArgTpe[T]: WithoutInputTypeTags[Option[WithTag[T, Int]]] = ???

trait InputType[+T]
class OptionInputType[T](ofType: InputType[T]) extends InputType[Option[T]]

type Argument[T]
def argument[T](argumentType: InputType[T])(implicit fromInput: FromInput[T], res: WithoutInputTypeTags[T]): Argument[Option[T]] = ???

def test = argument(OptionInputType(??? : InputType[WithTag[Boolean, Int]]))

Output

-- Error: sangria.scala:17:4 ---------------------------------------------------
17 |def test = argument(OptionInputType(??? : InputType[WithTag[Boolean, Int]]))
   |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |Recursion limit exceeded.
   |Maybe there is an illegal cyclic reference?
   |If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
   |For the unprocessed stack trace, compile with -Yno-decode-stacktraces.
   |A recurring operation is (inner to outer):
   |
   |  check fully defined T
   |  check fully defined T & Tagged[Int]
   |  check fully defined T & Tagged[Int]
   |  check fully defined T & Tagged[Int] & Tagged[Int]
   |  check fully defined Option[T & Tagged[Int] & Tagged[Int]]
   |  check fully defined Option[Option[T & Tagged[Int] & Tagged[Int]]]
   |  check fully defined Argument[Option[Option[T & Tagged[Int] & Tagged[Int]]]]

Expectation

Should compile, as it did before in 3.2.1. This issue is ver closely related to #15365, to the point where I could basically reuse the minimization, except now the issue is unrelated to the typings introduced by the :: class . Simply trying to create an Argument object is enough to trigger the error (which also means the workarounds sangria used for the previous error will no longer work). The bisect script has shown efdfe0efb6aae57253ddfc330b06dc3a56799200 to be the first problematic commit.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oderskycommented, Nov 10, 2022

I can’t reproduce this using the nightly 3.3.0-RC1-bin-SNAPSHOT-nonbootstrapped-git-d8a6751.

0reactions
nicolasstuckicommented, Nov 15, 2022

It seems that this issue started in efdfe0efb6aae57253ddfc330b06dc3a56799200.

Read more comments on GitHub >

github_iconTop Results From Across the Web

maximum recursion depth exceeded while calling a Python ...
When we run the recursion function for a large number of times, recursion error is thrown. Python has a limit on the number...
Read more >
maximum recursion depth exceeded" when using statsmodels ...
I am trying to do a linear regression for a fairly large dataset where I can actually get p-values for each of my...
Read more >
"maximum recursion depth exceeded" when calculating ...
"maximum recursion depth exceeded" when calculating duplicates in big DataFrame (regression comparing to the old version) #21524.
Read more >
Issue 42649: RecursionError when parsing unwieldy ...
msg383084 ‑ (view) Author: Michael Orlitzky (mjo) Date: 2020‑12‑15 17:55 msg383351 ‑ (view) Author: Terry J. Reedy (terry.reedy) * Date: 2020‑12‑19 01:48 msg399551 ‑ (view)...
Read more >
Python | Handling recursion limit - GeeksforGeeks
When you execute a recursive function in Python on a large input ( > 10^4), you might encounter a “maximum recursion depth exceeded...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found