Infinite loop
See original GitHub issueHey. I just tried 0.3.1-RC2 and am seeing a new error:
[error] java.lang.StackOverflowError
[error] at scala.meta.internal.semanticdb.Scala$ScalaSymbolOps.isNone(Scala.scala:38)
[error] at scalafix.v1.Symbol.isNone(Symbol.scala:13)
[error] at scalafix.internal.v1.InternalSemanticDoc.info(InternalSemanticDoc.scala:65)
[error] at scalafix.v1.SemanticDocument.info(SemanticDocument.scala:38)
[error] at scalafix.v1.Symbol.info(Symbol.scala:21)
[error] at fix.OrganizeImports$SymbolSafeInfo.$anonfun$safeInfo$1(OrganizeImports.scala:631)
[error] at scala.util.Try$.apply(Try.scala:213)
[error] at fix.OrganizeImports$SymbolSafeInfo.safeInfo(OrganizeImports.scala:631)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:223)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
[error] at fix.OrganizeImports.toRef$1(OrganizeImports.scala:225)
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Infinite Loop - Apple Store
Apple Store Infinite Loop store hours, contact information, and weekly calendar of events. ... Apple Infinite Loop. Opens at 10:00 a.m.. Shop by...
Read more >Infinite loop
In computer programming, an infinite loop (or endless loop) is a sequence of instructions that, as written, will continue endlessly, unless an external ......
Read more >Infinite Loop
Infinite Loop Music and Sound Production, Soundtracks, Sound Design, Recording Studio, Event Sound, Theatre Sound Design, Advertising, Commercials, ...
Read more >What is infinite loop (endless loop)? | Definition from ...
An infinite loop (sometimes called an endless loop ) is a piece of coding that lacks a functional exit so that it repeats...
Read more >Infinite Loop in C
An infinite loop is a looping construct that does not terminate the loop and executes the loop forever. It is also called an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@japgolly, the reason why a fully-qualified importer was still passed into
expandRelative
is that theisFullyQualifed
function didn’t take care ofSymbols.None
, and therefore treated those imports as relative ones. Made a minor adjustment in https://github.com/liancheng/scalafix-organize-imports/commit/d4ac2f673d13ac59525898fbdf8506b9dfcfd75a to make it clearer.That being said, it’s still not clear to me why sometimes the symbol information is not available and whether it’s safe to always assume that the importer is fully-qualified. But since all the cases you hit are fully-qualified imports, we can tentatively assume that is true.
Unfortunately I can’t share the code but I printed some debugging info out when these cases occur:
What’s interesting about this is that I tried taking these files and turning them into tests but they don’t throw in isolation. Even outside of tests, if I run
scalafix
on just a single module (instead of from the root module where it does everything) the error doesn’t occur.