repl tab completion in 2.11

126 views
Skip to first unread message

Lukas Rytz

unread,
May 18, 2014, 4:34:14 PM5/18/14
to scala-i...@googlegroups.com
I have issues with tab-completion in the 2.11-repl, can others reproduce that?

Lukas


2.10 works fine:

lucmac:~ luc$ scala10
Welcome to Scala version 2.10.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :power
** Power User mode enabled - BEEP WHIR GYVE **
** :phase has been set to 'typer'.          **
** scala.tools.nsc._ has been imported      **
** global._, definitions._ also imported    **
** Try  :help, :vals, power.<tab>           **

scala> repl.
LoopCommand             Result                  addClasspath            addReplay               addedClasspath          
addedClasspath_=        asInstanceOf            asyncEcho               chooseReader            closeInterpreter        
command                 commands                createInterpreter       echoCommandMessage      enablePowerMode         
helpCommand             history                 historyCommand          in                      in_=                    
interpretAllFrom        interpretStartingWith   interpreter             interpreter_=           intp                    
intp_=                  isAsync                 isInstanceOf            loadCommand             loadFiles               
loop                    main                    pasteCommand            power                   powerCmd                
powerCommands           printWelcome            process                 prompt                  replay                  
replayCommandStack      replayCommandStack_=    replayCommands          replayQuestionMessage   reset                   
resetCommand            savingReader            savingReplayStack       searchHistory           setPrompt               
settings                settings_=              shCommand               stabilizeIMain          standardCommands        
toString                verbosity               withFile                



2.11 i get nothing

lucmac:~ luc$ scala11
Welcome to Scala version 2.11.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :power
** Power User mode enabled - BEEP WHIR GYVE **
** :phase has been set to 'typer'.          **
** scala.tools.nsc._ has been imported      **
** global._, definitions._ also imported    **
** Try  :help, :vals, power.<tab>           **

scala> repl.


Rodrigo Cano

unread,
May 18, 2014, 4:39:50 PM5/18/14
to scala-i...@googlegroups.com
Yes,  same here. Also, when tab completion is requested it freezes for some seconds.


--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Som Snytt

unread,
May 18, 2014, 5:55:03 PM5/18/14
to scala-internals
I think power mode member completion on identifiers has always been broken on 2.11.

The banner says to try `power.<tab>` and that never worked for me.  I considered editing the banner.

Other kinds of completion still work, like imports

scala> import scala.concurrent
import scala.concurrent

scala> concur<tab>rent


There are a few related issues I looked at; you can pile on.

Maybe it's because of

scala> 1
res0: Int = 1

scala> $intp runtimeClassAndTypeOfTerm "res0"
scala.ScalaReflectionException: value res0 is not a class
  at scala.reflect.api.Symbols$SymbolApi$class.asClass(Symbols.scala:272)
  at scala.reflect.internal.Symbols$SymbolContextApiImpl.asClass(Symbols.scala:82)
  at scala.tools.nsc.interpreter.IMain.classOfTerm(IMain.scala:1044)
  at scala.tools.nsc.interpreter.IMain.runtimeClassAndTypeOfTerm(IMain.scala:1077)
  ... 32 elided



Reply all
Reply to author
Forward
0 new messages