Questions tagged [scala-2.11]

205 questions
147
votes
6 answers

How to quit scala 2.11.0 REPL?

In the last version of scala (2.10.3) REPL, I can type exit to quit from REPL. However, in Scala 2.11.0 this doesn't work. $ scala Welcome to Scala version 2.11.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_51). Type in expressions to have…
Billz
  • 7,099
  • 6
  • 30
  • 33
34
votes
1 answer

How to fix the Dropping Close since the SSL connection is already closing error in spray

I’m making a call to an API, but most of the time I keep getting an error: “Dropping Close since the SSL connection is already closing” and “Premature connection close (the server doesn't appear to support request pipelining).” Like 90% of the time…
mayacr86
  • 949
  • 8
  • 23
28
votes
3 answers

Why is Scala hashmap slow?

And what can be done about it? I have run some tests and it seems that Scala Hashmap is much slower than a Java HashMap. Please prove me wrong! For me the whole point of Hashmap is to get quick access to a value from a given key. So I find myself…
MS-H
  • 287
  • 3
  • 8
25
votes
4 answers

Why doesn't the Def.inputTask macro work in Scala 2.11.1?

I'm using Scala 2.11.1 and sbt 0.13.5. I have an sbt plugin that contains a helper function to create input tasks as follows (the implementation is stripped away as it's irrelevant to the problem): def register(name: String, description: String):…
Michael Zajac
  • 53,182
  • 7
  • 105
  • 130
20
votes
2 answers

How can I handle a > 22 column table with Slick using nested tuples or HLists?

I'm new to Scala (using 2.10) and Slick (using 2.0-M2). I see that one of the ways to get around the 22 column limit for tables in Slick is to use nested tuples. I can't figure out how to do that, despite finding this partial code on GitHub. …
sventechie
  • 1,757
  • 1
  • 21
  • 48
17
votes
5 answers

Trying to cross compile a project to Scala 2.11 fails with "error while loading Object, Missing dependency 'object scala in compiler mirror'"

I'm trying to compile my project to Scala 2.10 and 2.11 so that I can release versions for both scala versions, but every time I try to do it it fails with the following message: #( 04/26/14@ 7:40 )( mauricio@Mauricios-MacBook-Pro…
Maurício Linhares
  • 37,947
  • 14
  • 116
  • 153
14
votes
1 answer

canEqual() in the scala.Equals trait

From the source code scala/Equals.scala (here): package scala trait Equals extends scala.Any { def canEqual(that: scala.Any): scala.Boolean def equals(that: scala.Any): scala.Boolean } In the documentation, it says: A method that should be…
11
votes
1 answer

Dynamically compiling scala class files at runtime in Scala 2.11

I have the following code that works in Scala 2.10 to compile external classes at runtime in Scala /** * Compile scala files and keep them loaded in memory * @param classDir Directory storing the generated scala files * @throws IOException if…
vsnyc
  • 1,997
  • 20
  • 30
10
votes
3 answers

Error with Play 2.4 Tests : The CacheManager has been shut down. It can no longer be used

Our application is built on Play 2.4 with Scala 2.11 and Akka. Database used is MySQL. Cache is used heavily in our application.We use Play's default EhCache for caching. Our sample code snippet : import play.api.Play.current import…
10
votes
1 answer

Why does Scala 2.11.2 give me compilation error for floating point number in scientific notation?

I've just recently updated a Scala project from 2.10 to 2.11.2. For the following code: if( x < 1.e-150 ) // conditional ops... I'm getting the error e is not a member of Int Previously scientific notion has worked ok. I suspect it is not a…
ZenMasterZed
  • 183
  • 8
10
votes
1 answer

How will xml modularisation in scala 2.11 play with xml literals?

Reading the release notes for Scala 2.11.0-RC1, I noticed that the splitting-off of scala xml to a separate jar is starting with the 2.11 series. Will this affect the use of xml literals, in 2.11 or down the line? Clearly, if you use xml literals…
Richard Close
  • 1,835
  • 10
  • 17
9
votes
1 answer

Scala unapplySeq extractor syntax

I (inadvertently) came across a bit of pattern matching syntax I did not expect to compile and now cannot figure out. It appears related to unapplySeq. Note the case x List(_,_) part in this simple example: val xs = List(1, 2, 3) …
Brian Kent
  • 3,574
  • 1
  • 23
  • 31
9
votes
1 answer

Is there any trick to use macros in the same file they are defined?

I have the following code: object Macros { import scala.language.experimental.macros import scala.reflect.macros.blackbox def hello(): Unit = macro hello_impl def hello_impl(c: blackbox.Context)(): c.Expr[Unit] = { import…
ale64bit
  • 6,023
  • 2
  • 21
  • 43
9
votes
2 answers

How to fix the Product Type Inferred error from Scala's WartRemover tool

I'm using WartRemover tool to avoid possible errors in my Scala 2.11 code. Specifically, I want to know how to fix the "Product Type Inferred" error. Looking at the repo documentation, I can only see the failure example, but I would like to know…
mayacr86
  • 949
  • 8
  • 23
8
votes
1 answer

When is crosspaths set to true?

I failed to find a good documentation about the use and purpose of crosspaths. Can someone point me to the documentation or answer these specific questions. My Scala version is 2.11.6, but when crosspaths is set to true, I see two source folders -…
adefor
  • 289
  • 2
  • 9
1
2 3
13 14