You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= problem =
It is annoying to restart the REPL just to see some deprecation message, especially when there is already some amount of code evaluated.
= analysis =
There should be some way to activate things like "-migration", "-deprecation" without having to restart the REPL, maybe via some REPL command (those starting with ":").
= enhancement recommendation =
Add something like that.
The text was updated successfully, but these errors were encountered:
@retronym said:
There is already a way, although it's not well publicized.
scala>caseclassA
warning: there were 1 deprecation warnings; re-run with-deprecation for details
defined classA
scala>:power
**PowerUser mode enabled -BEEPBOOPWHIR**** scala.tools.nsc._ has been imported **** global._ and definitions._ also imported ****New vals!Try repl, intp, global, power ****New cmds!:help to discover them ****New defs!Type power.<tab> to reveal **
scala> settings.deprecation.value =true
scala>caseclassA
<console>:1:warning: case classes without a parameter list have been deprecated;
use either case objects or case classes with `()' as parameter list.caseclassA
^
Migration:
scala> settings.Xmigration28.value =true
scala>Iterator.empty.collect { case x => x }
<console>:22:warning: method collect in traitIterator has changed semantics:
This collect implementation bears no relationship to the one before 2.8.
The previous behavior can be reproduced with toSeq.
Iterator.empty.collect { case x => x }
^
res0:Iterator[Nothing] = empty iterator
Commit Message Bot (anonymous) said:
(extempore in r25467) Don't discard deprecation/unchecked warnings regardless of settings.
Changed warnings code to accumulate them rather than thoughtlessly
discarding them and issuing its well-known taunt. In the repl you
can take advantage of this with the :warnings command, which will show
the suppressed warnings from the last line which had any. Be advised
that at the moment it has some issues: unchecked warnings aren't
making it out, and near repl startup neither are deprecation warnings,
so don't open a bunch of tickets please.
= problem =
It is annoying to restart the REPL just to see some deprecation message, especially when there is already some amount of code evaluated.
= analysis =
There should be some way to activate things like "-migration", "-deprecation" without having to restart the REPL, maybe via some REPL command (those starting with ":").
= enhancement recommendation =
Add something like that.
The text was updated successfully, but these errors were encountered: