{"action":"opened","issue":{"url":"https://api.github.com/repos/scala/pickling/issues/370","labels_url":"https://api.github.com/repos/scala/pickling/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/scala/pickling/issues/370/comments","events_url":"https://api.github.com/repos/scala/pickling/issues/370/events","html_url":"https://github.com/scala/pickling/issues/370","id":101853880,"number":370,"title":"Compiler slain by `-Ywarn-unused-import`","user":{"login":"Astrac","id":766007,"avatar_url":"https://avatars.githubusercontent.com/u/766007?v=3","gravatar_id":"","url":"https://api.github.com/users/Astrac","html_url":"https://github.com/Astrac","followers_url":"https://api.github.com/users/Astrac/followers","following_url":"https://api.github.com/users/Astrac/following{/other_user}","gists_url":"https://api.github.com/users/Astrac/gists{/gist_id}","starred_url":"https://api.github.com/users/Astrac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Astrac/subscriptions","organizations_url":"https://api.github.com/users/Astrac/orgs","repos_url":"https://api.github.com/users/Astrac/repos","events_url":"https://api.github.com/users/Astrac/events{/privacy}","received_events_url":"https://api.github.com/users/Astrac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-19T10:04:20Z","updated_at":"2015-08-19T10:04:20Z","closed_at":null,"body":"Given this minimal `build.sbt`:\r\n\r\n```\r\nlazy val proj = (project in file(\".\"))\r\n  .settings(\r\n    scalaVersion := \"2.11.7\",\r\n    scalacOptions ++= Seq(\"-Ywarn-unused-import\"),\r\n    libraryDependencies ++= Seq(\r\n      \"org.scala-lang.modules\" %% \"scala-pickling\" % \"0.10.1\"\r\n    )\r\n  )\r\n```\r\n\r\nIf I run the example on the REPL I get:\r\n\r\n```\r\nscala> import scala.pickling.Defaults._, scala.pickling.json._                                                                                                                                                                                                                                                                                                      [8/1055]\r\n<console>:10: warning: Unused import\r\n       import scala.pickling.Defaults._, scala.pickling.json._\r\n                                      ^\r\n<console>:10: warning: Unused import\r\n       import scala.pickling.Defaults._, scala.pickling.json._\r\n                                                             ^\r\nimport scala.pickling.Defaults._\r\nimport scala.pickling.json._\r\n\r\nscala> case class Person(name: String, age: Int)\r\n<console>:9: warning: Unused import\r\nimport scala.pickling.Defaults._\r\n                               ^\r\n<console>:12: warning: Unused import\r\nimport scala.pickling.json._\r\n                           ^\r\ndefined class Person\r\n\r\nscala> val pkl = Person(\"foo\", 20).pickle\r\njava.lang.ArrayIndexOutOfBoundsException: 339\r\n        at scala.reflect.internal.util.InternalPositionImpl$class.calculateColumn(Position.scala:211)\r\n        at scala.reflect.internal.util.InternalPositionImpl$class.column(Position.scala:167)\r\n        at scala.reflect.internal.util.Position.column(Position.scala:12)\r\n        at scala.reflect.internal.util.InternalPositionImpl$class.lineCaret(Position.scala:169)\r\n        at scala.reflect.internal.util.Position.lineCaret(Position.scala:12)\r\n        at scala.reflect.internal.util.InternalPositionImpl$class.indicator$1(Position.scala:186)\r\n        at scala.reflect.internal.util.InternalPositionImpl$class.errorAt$1(Position.scala:187)\r\n        at scala.reflect.internal.util.InternalPositionImpl$class.showError(Position.scala:192)\r\n        at scala.reflect.internal.util.Position.showError(Position.scala:12)\r\n        at scala.reflect.internal.util.Position$.formatMessage(Position.scala:42)\r\n        at scala.tools.nsc.reporters.ConsoleReporter.printMessage(ConsoleReporter.scala:50)\r\n        at scala.tools.nsc.interpreter.ReplReporter.print(ReplReporter.scala:50)\r\n        at scala.tools.nsc.reporters.ConsoleReporter.display(ConsoleReporter.scala:69)\r\n        at scala.tools.nsc.reporters.AbstractReporter.info0(AbstractReporter.scala:48)\r\n        at scala.tools.nsc.reporters.AbstractReporter.info0(AbstractReporter.scala:16)\r\n        at scala.reflect.internal.Reporter.warning(Reporting.scala:81)\r\n        at scala.tools.nsc.interpreter.ReplReporter.scala$tools$nsc$interpreter$ReplReporter$$super$warning(ReplReporter.scala:32)\r\n        at scala.tools.nsc.interpreter.ReplReporter$$anonfun$warning$1.apply(ReplReporter.scala:32)\r\n        at scala.tools.nsc.interpreter.ReplReporter$$anonfun$warning$1.apply(ReplReporter.scala:32)\r\n        at scala.tools.nsc.interpreter.ReplReporter.withoutTruncating(ReplReporter.scala:28)\r\n        at scala.tools.nsc.interpreter.ReplReporter.warning(ReplReporter.scala:32)\r\n        at scala.tools.nsc.typechecker.Contexts$class.warnUnusedImports(Contexts.scala:64)\r\n        at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.warnUnusedImports(ReplGlobal.scala:23)\r\n        at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:106)\r\n        at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)\r\n        at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)\r\n        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)\r\n        at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)\r\n        at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)\r\n        at scala.collection.Iterator$class.foreach(Iterator.scala:742)\r\n        at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)\r\n        at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:93)\r\n        at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)\r\n        at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)\r\n        at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)\r\n        at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:434)\r\n        at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:853)\r\n        at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:811)\r\n        at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:995)\r\n        at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:990)\r\n        at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:577)\r\n        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:565)\r\n        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:563)\r\n        at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:802)\r\n        at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:836)\r\n        at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:694)\r\n        at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:404)\r\n        at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:424)\r\n        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:925)\r\n        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:911)\r\n        at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:911)\r\n        at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)\r\n        at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:911)\r\n        at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:936)\r\n        at xsbt.ConsoleInterface.run(ConsoleInterface.scala:62)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:483)\r\n        at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)\r\n        at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:76)\r\n        at sbt.Console.sbt$Console$$console0$1(Console.scala:22)\r\n        at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:23)\r\n        at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:23)\r\n        at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:23)\r\n        at sbt.Logger$$anon$4.apply(Logger.scala:85)\r\n        at sbt.TrapExit$App.run(TrapExit.scala:248)\r\n        at java.lang.Thread.run(Thread.java:745)\r\n\r\nThat entry seems to have slain the compiler.  Shall I replay\r\nyour session? I can re-run each line except the last one.\r\n[y/n]\r\n```\r\n"}}