Skip to content

Commit 12ceec1

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 467d867 commit 12ceec1

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
@@ -149,6 +149,7 @@ private sealed trait VerboseSettings:
149149
val Vprofile: Setting[Boolean] = BooleanSetting("-Vprofile", "Show metrics about sources and internal representations to estimate compile-time complexity.")
150150
val VprofileSortedBy = ChoiceSetting("-Vprofile-sorted-by", "key", "Show metrics about sources and internal representations sorted by given column name", List("name", "path", "lines", "tokens", "tasty", "complexity"), "")
151151
val VprofileDetails = IntSetting("-Vprofile-details", "Show metrics about sources and internal representations of the most complex methods", 0)
152+
val VreplMaxPrintElements: Setting[Int] = IntSetting("-Vrepl-max-print-elements", "Number of elements to be printed before output is truncated.", 1000)
152153

153154
/** -W "Warnings" settings
154155
*/
@@ -231,7 +232,6 @@ private sealed trait XSettings:
231232
val XprintSuspension: Setting[Boolean] = BooleanSetting("-Xprint-suspension", "Show when code is suspended until macros are compiled.")
232233
val Xprompt: Setting[Boolean] = BooleanSetting("-Xprompt", "Display a prompt after each error (debugging option).")
233234
val XreplDisableDisplay: Setting[Boolean] = BooleanSetting("-Xrepl-disable-display", "Do not display definitions in REPL.")
234-
val XreplMaxPrintElements: Setting[Int] = IntSetting("-Xrepl-max-print-elements", "Number of elements to be printed before output is truncated.", 1000)
235235
val XverifySignatures: Setting[Boolean] = BooleanSetting("-Xverify-signatures", "Verify generic signatures in generated bytecode.")
236236
val XignoreScala2Macros: Setting[Boolean] = BooleanSetting("-Xignore-scala2-macros", "Ignore errors when compiling code that calls Scala2 macros, these will fail at runtime.")
237237
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)