errors found in build.sbt are reported with no position (java.lang.ArrayIndexOutOfBoundsException: -1)
See original GitHub issueThis build.sbt:
lazy val bob = scala.Console println
Will crash sbt with no indication whatsoever what happened, where or why. (My real one is more than one line.) The expression is valid scala.
[info] Loading project definition from /Users/paulp/scratch/2014-03-12_sbt_1/project
java.lang.ArrayIndexOutOfBoundsException: -1
at scala.reflect.internal.util.OffsetPosition.column(Position.scala:249)
at scala.reflect.internal.util.Position$.formatMessage(Position.scala:33)
at scala.tools.nsc.reporters.ConsoleReporter.printMessage(ConsoleReporter.scala:49)
at scala.tools.nsc.reporters.ConsoleReporter.print(ConsoleReporter.scala:52)
at scala.tools.nsc.reporters.ConsoleReporter.display(ConsoleReporter.scala:78)
at scala.tools.nsc.reporters.AbstractReporter.info0(AbstractReporter.scala:49)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply$mcV$sp(Reporter.scala:70)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply(Reporter.scala:70)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply(Reporter.scala:70)
The “full log”, or at least it is so implied:
[error] java.lang.ArrayIndexOutOfBoundsException: -1
[error] Use 'last' for the full log.
[debug] > load-failed
[debug] > last
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
If the implied empty param list is given, it compiles.
lazy val bob = scala.Console println ()
Issue Analytics
- State:
- Created 10 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
apache spark - sbt-assembly - throwing java.lang ...
Problem Details: In my SBT project, I am using the dependency "org.apache.cassandra" % "cassandra-all" % "3.0.27".
Read more >3 Tips to solve and Avoid java.lang ... - Javarevisited
The error ArrayIndexOutOfBoundsException: 1 means index 1 is invalid and it's out of bounding i.e. more than the length of the array. Since...
Read more >IntelliJ IDEA - Troubleshoot common Scala issues - JetBrains
In most cases your project JDK is not compatible with Scala or sbt version, try to change the Scala Compile Server SDK. Press...
Read more >sbt Reference Manual — Combined Pages
There are not that many concepts, but sbt is not exactly like other build systems ... reports about SSL error using Ubuntu: Server...
Read more >How to Fix javax.net.ssl.SSLHandshakeException - Java67
SSLHandshakeException: unable to find valid certification path to requested target in Java. Hello guys, this is one of the common errors in a...
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 Free
Top 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
Your implied crash repro golf challenge does not go unnoticed. 4 chars.
Just ran across this error after I accidentally added an “s” after one of 17 dependencies in a 50+ line build.sbt while tabbing through files in my IDE. (So dependency became:, “org.scalaz” %% “scalaz-core” % "7.1.0"s)
It’s not too hard to figure out error is caused by some kind of error in project configuration and back our recent changes to troubleshoot or something like that, but this message seems insanely/aggressively un-userfriendly. If the stack trace could even just include the line that triggered the exception somewhere, it would be far more helpful.