2.12.0-RC1 REPL :setting and :replay broken?

71 views
Skip to first unread message

Jasper-M

unread,
Sep 30, 2016, 9:45:48 AM9/30/16
to scala-internals
Please see the following REPL transcript.
The problems seem to be:
  1. the -feature flag is not set
  2. after :replay the REPL seems to be broken; typed text no longer appears in the prompt, can't scroll through history with arrows, can't exit with Ctrl+D.


Welcome to Scala 2.12.0-RC1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_101).
Type in expressions for evaluation. Or try :help.

scala> trait Foo {
     |   def foo[C[A] <: Traversable[A]](c: C[String])
     | }
warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
defined trait Foo

scala> :setting -feature

scala> trait Foo {
     |   def foo[C[A] <: Traversable[A]](c: C[String])
     | }
warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
defined trait Foo

scala> :replay -feature
Replaying: trait Foo {
  def foo[C[A] <: Traversable[A]](c: C[String])
}
warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
defined trait Foo

Replaying: trait Foo {
  def foo[C[A] <: Traversable[A]](c: C[String])
}
warning: there was one feature warning; for details, enable `:setting -feature' or `:replay -feature'
defined trait Foo


scala> 
scala> <console>:12: error: not found: value foo
       foo
       ^

scala> <console>:1: error: illegal character '\u0004'
\u0004\u0004\u0004\u0004\u0004
^
<console>:1: error: illegal character '\u0004'
\u0004\u0004\u0004\u0004\u0004
 ^
<console>:1: error: illegal character '\u0004'
\u0004\u0004\u0004\u0004\u0004
  ^
<console>:1: error: illegal character '\u0004'
\u0004\u0004\u0004\u0004\u0004
   ^
<console>:1: error: illegal character '\u0004'
\u0004\u0004\u0004\u0004\u0004
    ^

scala> 

Jasper-M

unread,
Sep 30, 2016, 10:10:24 AM9/30/16
to scala-internals
I get the same results in scala 2.11.8, by the way. Only then those features weren't promoted by the warnings.

Op vrijdag 30 september 2016 15:45:48 UTC+2 schreef Jasper-M:

som-snytt

unread,
Oct 6, 2016, 12:18:07 PM10/6/16
to scala-internals

This works for me. If -feature -deprecation are both not set by user, both are on for REPL in 2.12. SI-8829

Is there an interaction with sbt or something else?

$ scalam
Welcome to Scala 2.12.0-RC1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_92).

Type in expressions for evaluation. Or try :help.

scala> trait F { def f[C[A] <: Traversable[A]](c: C[String]) }
<console>:11: warning: higher-kinded type should be enabled
by making the implicit value scala.language.higherKinds visible.
This can be achieved by adding the import clause 'import scala.language.higherKinds'
or by setting the compiler option -language:higherKinds.
See the Scaladoc for value scala.language.higherKinds for a discussion
why the feature should be explicitly enabled.
       trait F { def f[C[A] <: Traversable[A]](c: C[String]) }
                       ^
defined trait F

scala> :replay -language:higherKinds
Replaying: trait F { def f[C[A] <: Traversable[A]](c: C[String]) }
defined trait F

Jasper-M

unread,
Oct 8, 2016, 12:42:04 PM10/8/16
to scala-internals
I have tried it with sbt 0.13.6 and 0.13.12, in an empty project with only `scalaVersion := "2.12.0-RC1"` in the build.sbt. I go to the REPL with either `console` or `consoleQuick`. All the same result as my first mail.
I am on Ubuntu 14.04. In ~/.sbt/0.13/plugins/plugins.sbt I have `addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")`. That's all I know.

Op donderdag 6 oktober 2016 18:18:07 UTC+2 schreef som-snytt:

som-snytt

unread,
Oct 9, 2016, 1:07:28 AM10/9/16
to scala-internals

Thanks, I do see the symptom under sbt.

I'll open a ticket somewhere. Though the readme for sbt says, Don't open an Issue.
Reply all
Reply to author
Forward
0 new messages