read eval print loop - settings.maxPrintString for Scala 2.9 REPL -


i'd disable truncation of string values in scala repl.

the following thread suggested typing settings.maxprintstring = 0:

how force interpreter show complete stack trace?

unfortunately, doesn't seem work scala 2.9:

welcome scala version 2.9.1.final (java hotspot(tm) 64-bit server vm, java 1.6.0_29). type in expressions have them evaluated. type :help more information.  scala> settings.maxprintstring = 0 <console>:10: error: not found: value settings val $ires0 = settings.maxprintstring              ^ <console>:7: error: not found: value settings        settings.maxprintstring = 0        ^ 

is there need import?

i tried :power, makes settings available, doesn't seem support maxprintstring:

scala> :power ** power user mode enabled - beep boop spiz ** ** :phase has been set 'typer'.          ** ** scala.tools.nsc._ has been imported      ** ** global._ , definitions._ imported ** ** try  :help,  vals.<tab>,  power.<tab>    **  scala> settings res0: scala.tools.nsc.settings =  settings {   -d = .   -yrich-exceptions = true   -classpath = bin:lib/*   -encoding = utf-8 }   scala> settings.maxprintstring = 0 <console>:31: error: value maxprintstring not member of scala.tools.nsc.settings val $ires9 = settings.maxprintstring                       ^ <console>:28: error: value maxprintstring not member of scala.tools.nsc.settings        settings.maxprintstring = 0 

i see scala.tools.nsc.interpretersettings.maxprintstring exists, i'm not sure how appropriate instance of interpretersettings modify.

  ~/code/scala scala29 welcome scala version 2.9.1.final (java hotspot(tm) 64-bit server vm, java 1.6.0_29). type in expressions have them evaluated. type :help more information.  scala> :power ** power user mode enabled - beep boop spiz ** ** :phase has been set 'typer'.          ** ** scala.tools.nsc._ has been imported      ** ** global._ , definitions._ imported ** ** try  :help,  vals.<tab>,  power.<tab>    **      scala> vals.isettings.maxprintstring maxprintstring     maxprintstring_=     scala> vals.isettings.maxprintstring = 10000 vals.isettings.maxprintstring: int = 10000 

or

$ scala -uniqid -xprint:typer -yshow-syms -dscala.repl.maxprintstring=64000 

where sample output show truncation without higher limit.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -