question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Power mode seems to have gotten broken

See original GitHub issue

steps

Launch sbt Run console Type :power

problem

scala> :power
<console>:1: error: identifier expected but $XMLSTART$< found.
       import <none>._
              ^
<console>:12: error: not found: value intp
       import scala.tools.nsc._, scala.collection.JavaConverters._, intp.global.{ error => _, _ }, definitions.{ getClass => _, _ }, power.rutil._, replImplicits._, treedsl.CODE._
                                                                    ^
<console>:12: error: not found: value definitions
       import scala.tools.nsc._, scala.collection.JavaConverters._, intp.global.{ error => _, _ }, definitions.{ getClass => _, _ }, power.rutil._, replImplicits._, treedsl.CODE._
                                                                                                   ^
<console>:12: error: not found: value power
       import scala.tools.nsc._, scala.collection.JavaConverters._, intp.global.{ error => _, _ }, definitions.{ getClass => _, _ }, power.rutil._, replImplicits._, treedsl.CODE._
                                                                                                                                     ^
<console>:12: error: not found: value replImplicits
       import scala.tools.nsc._, scala.collection.JavaConverters._, intp.global.{ error => _, _ }, definitions.{ getClass => _, _ }, power.rutil._, replImplicits._, treedsl.CODE._
                                                                                                                                                    ^
<console>:12: error: not found: value treedsl
       import scala.tools.nsc._, scala.collection.JavaConverters._, intp.global.{ error => _, _ }, definitions.{ getClass => _, _ }, power.rutil._, replImplicits._, treedsl.CODE._
                                                                                                                                                                     ^
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._

expectation

scala> :power
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._

notes

I’d like to bisect between 1.1.1 and 1.1.2, though I can’t do it at this point. I just wanted to raise awareness, as this breaks https://github.com/marconilanna/REPLesent at the sbt console

sbt version: 1.1.2+

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
joshuaconnercommented, May 13, 2020

@ivan-awake i created a file ~/.sbt/1.0/plugins/console.sbt with the following content and it seems to work:

initialize ~= (_ => sys.props("scala.repl.maxprintstring") = "10000" )

(adapted from this SO comment by @SethTisue - thanks Seth!)

0reactions
mvillafuertemcommented, Jun 2, 2022

Is there an update on this? I have the same errors with the latest sbt version. Thanks

[info] welcome to sbt 1.6.2 (Oracle Corporation Java 1.8.0_202)
...
[info] Starting scala interpreter...
Welcome to Scala 2.13.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_202).
Type in expressions for evaluation. Or try :help.

scala> :power
              ^
       error: identifier expected but $XMLSTART$< found.
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._

scala> val a = 1

       }}
         ^
<synthetic>:11: error: input ended while parsing XML

(To diagnose errors in synthetic code, try adding `// show` to the end of your input.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS 16/15 Low Power Mode Lagging? Here's Fix - Tenorshare
Solution 1: Check Whether Low Power Mode is On · Solution 2: Forced Restart Your iPhone Running iOS 16/15 · Solution 3: Manage...
Read more >
What Happens if You Keep Your iPhone in Low Power Mode ...
It's easy to set your iPhone to stay in Low Power Mode permanently, but you'll lose features and functionality.
Read more >
Is Low Power Mode BAD for your Battery?? - YouTube
Top 5 iPhone Battery MYTHS! https://youtu.be/BBHvl_ofsRIHow to Save Battery Life in iOS 14!! https://youtu.be/dPwae24NvjsIn this video I ...
Read more >
Have I broken it? - Apple Support Communities
I suspect that you have Low Power Mode enabled. If you do, then it is designed to turn off that mode once the...
Read more >
Why does it seem like the batteries on iPhone devices drain ...
Low Power Mode reduces the amount of power that your iPhone uses when the battery gets low.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found