Skip to content

Commit b39f1fd

Browse files
committed
use -V for the option prefix, which suggests "verbose" or "view"...
... for when you want to tweak output (as opposed to compiler behavior). as suggested in scala#16011 (comment)
1 parent 92faa2c commit b39f1fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ private sealed trait VerboseSettings:
139139
val Vhelp: Setting[Boolean] = BooleanSetting("-V", "Print a synopsis of verbose options.")
140140
val Xprint: Setting[List[String]] = PhasesSetting("-Vprint", "Print out program after", aliases = List("-Xprint"))
141141
val XshowPhases: Setting[Boolean] = BooleanSetting("-Vphases", "List compiler phases.", aliases = List("-Xshow-phases"))
142+
val VreplMaxPrintElements: Setting[Int] = IntSetting("-Vrepl-max-print-elements", "Number of elements to be printed before output is truncated.", 1000)
142143

143144
/** -W "Warnings" settings
144145
*/
@@ -221,7 +222,6 @@ private sealed trait XSettings:
221222
val XprintSuspension: Setting[Boolean] = BooleanSetting("-Xprint-suspension", "Show when code is suspended until macros are compiled.")
222223
val Xprompt: Setting[Boolean] = BooleanSetting("-Xprompt", "Display a prompt after each error (debugging option).")
223224
val XreplDisableDisplay: Setting[Boolean] = BooleanSetting("-Xrepl-disable-display", "Do not display definitions in REPL.")
224-
val XreplMaxPrintElements: Setting[Int] = IntSetting("-Xrepl-max-print-elements", "Number of elements to be printed before output is truncated.", 1000)
225225
val XverifySignatures: Setting[Boolean] = BooleanSetting("-Xverify-signatures", "Verify generic signatures in generated bytecode.")
226226
val XignoreScala2Macros: Setting[Boolean] = BooleanSetting("-Xignore-scala2-macros", "Ignore errors when compiling code that calls Scala2 macros, these will fail at runtime.")
227227
val XimportSuggestionTimeout: Setting[Int] = IntSetting("-Ximport-suggestion-timeout", "Timeout (in ms) for searching for import suggestions when errors are reported.", 8000)

compiler/src/dotty/tools/repl/ReplDriver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class ReplDriver(settings: Array[String],
115115
compiler = new ReplCompiler
116116
rendering = new Rendering(
117117
classLoader,
118-
maxPrintElements = rootCtx.settings.XreplMaxPrintElements.valueIn(rootCtx.settingsState)
118+
maxPrintElements = rootCtx.settings.VreplMaxPrintElements.valueIn(rootCtx.settingsState)
119119
)
120120
}
121121

0 commit comments

Comments
 (0)