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.

Unexpected error when compiling root after upgrading to 1.4.0

See original GitHub issue

I killed the bloop process listed by ps aux | grep bloop. I removed the .bloop folder. I ran sbt bloopInstall on a project that otherwise works with sbt and then I asked bloop to compile the project and got this error message.

[E] Unexpected error when compiling root: 'Unexpected exception when computing compile inputs for root'
[E] Failed to compile 'root'

How can I get more detailed information? I don’t know what --debug does but I couldn’t get it to work. --verbose doesn’t seem to help. The project itself is rather larger and constructing a small reproducible example will be difficult. I’d prefer to learn how to tell bloop to show me what the issue is.

# rm -rf .bloop      
# sbt bloopInstall
[info] Loading settings for project global-plugins from plugins.sbt ...
[info] Loading global plugins from /Users/dking/.sbt/1.0/plugins
[info] Loading settings for project hail-build from plugins.sbt,metals.sbt ...
[info] Loading project definition from /Users/dking/projects/hail/hail/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to hail (in build file:/Users/dking/projects/hail/hail/)
[success] Generated .bloop/root.json
[success] Generated .bloop/root-test.json
[success] Total time: 1 s, completed May 11, 2020 6:44:00 PM
# bloop compile --verbose root 
No server running at 127.0.0.1:8212, let's fire one...
Resolving ch.epfl.scala:bloop-frontend_2.12:1.4.0...
Starting bloop server at 127.0.0.1:8212...
Attempting a connection to the server...
Attempting a connection to the server...
Attempting a connection to the server...
Attempting a connection to the server...
[D] Loading 2 projects from '/Users/dking/projects/hail/hail/.bloop'...
[D] Loading project from '/Users/dking/projects/hail/hail/.bloop/root.json'
[D] Loading project from '/Users/dking/projects/hail/hail/.bloop/root-test.json'
[D] Cache miss for scala instance org.scala-lang:scala-compiler:2.11.12.
[D]   => /Users/dking/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/jline/jline/2.14.3/jline-2.14.3.jar
[D]   => /Users/dking/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar
[D]   => /Users/dking/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.5/scala-xml_2.11-1.0.5.jar
[D]   => /Users/dking/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.12/scala-compiler-2.11.12.jar
[D]   => /Users/dking/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12.jar
[D]   => /Users/dking/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.11.12/scala-reflect-2.11.12.jar
[D] Loading previous analysis for 'root-test' from '/Users/dking/projects/hail/hail/target/streams/test/bloopAnalysisOut/_global/streams/inc_compile_2.11.zip'.
[D] Loading previous analysis for 'root' from '/Users/dking/projects/hail/hail/target/streams/compile/bloopAnalysisOut/_global/streams/inc_compile_2.11.zip'.
[D] Computing sources and classpath hashes for root
[E] Unexpected error when compiling root: 'Unexpected exception when computing compile inputs for root'
[E] Failed to compile 'root'
[D] Elapsed: 1092.785509 ms
# 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jvicancommented, May 15, 2020

Thanks for that information @danking and thank you everyone who chimed in. I’ve just released v1.4.1 which should have this issue fixed. The root cause behind this issue is that 1.4.0 is not working for Java 8 users, but it is working for Java 11 users. This error was caused by a GraalVM version upgrade which changed its default from Java 8 to Java 11. As a result, our build process released our artifacts with Java 11. Please take into account v1.4.1 might not yet be available as it needs to hit Maven Central first.

2reactions
davesmith00000commented, May 12, 2020

No worries! 😃

So just for you, I have now:

  • Put my machine back into a broken state with 1.4.0, checked both editor wasn’t responding and that I couldn’t bloop compile <project>.
  • bloop exit
  • rm -fr .bloop/
  • rm -fr .metals/
  • bloop about (starts up bloop again “let’s fire one…”)
  • bloop compile <project> fails due to lack of project files
  • sbt bloopInstall to generate
  • bloop compile <project> fails in the described way, see below.
> bloop compile <project>
[E] Unexpected error when compiling <project>: 'Unexpected exception when computing compile inputs for <project>'
[E] Failed to compile '<project>'
  • Switch back to good-old 1.4.0-RC1 and everything immediately comes back to life.

Might be worth pointing out that this is an SBT multi project crossproject too. So it’s building multiple JVM and JS versions of libraries that form respective dependency chains. There are 40 bloop json files generated including test versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem while installing ROOT!
Hello ! Can anyone help me? This error appeared while installing root. What should I do to avoid it? [ 85%] Built target...
Read more >
scalacenter/bloop - Gitter
I'm having trouble installing a local build off current master using brew upgrade --build-from-source . I'm getting this error: Error: An exception occurred ......
Read more >
Jorge Vicente Cantero on Twitter: "@slandelle Sure! I'm open to ...
Unexpected error when compiling root after upgrading to 1.4.0 · Issue #1276 ... that otherwise works with sbt and then I asked bloop...
Read more >
Unable to load class AndroidComponentsExtension after ...
After upgrading, I get a build error: Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'. This is ...
Read more >
Changelog - Cypress Documentation
Read more about 12.0 in our blog post. Breaking Changes: Cypress dropped support for Node.js 12, 15 and 17. Those versions have reached...
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