GithubHelp home page GithubHelp logo

Comments (5)

tpolecat avatar tpolecat commented on September 7, 2024

Well that's very strange. What version of sbt and scala are you using? Anything potentially weird in your build?

from tut.

swaldman avatar swaldman commented on September 7, 2024

I get the same NPE with tut plugin v0.4.1. The error is dependent upon whether I have

fork := true

set in build.sbt. If I don't set fork to true, the problem goes away.

When I do set fork to true, I get some extra information about the problem from the file tut is trying to generate:

For now, just a test of tut.

```scala
scala> println("Hello World!")
[init] error: error while loading Object, Missing dependency 'object scala in compiler mirror', required by /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/rt.jar(java/lang/Object.class)

Failed to initialize compiler: object scala in compiler mirror not found.
** Note that as of 2.8 scala does not assume use of the java classpath.
** For the old behavior pass -usejavacp to scala, or if using a Settings
** object programatically, settings.usejavacp.value = true.

Reading around a bit, it looks like this problem might be addressed by calling a method called embedDefaults on the Settings object that is passed to the compiler. See this StackOverflow question, sbt docs and further discussion.

from tut.

tpolecat avatar tpolecat commented on September 7, 2024

Ah, interesting. Thanks for tracking it down. I will check it out.

from tut.

tpolecat avatar tpolecat commented on September 7, 2024

Seen also by @johnynek
https://gitter.im/tpolecat/tut?at=5924a22cfcbbe1891c3a4450

from tut.

tpolecat avatar tpolecat commented on September 7, 2024

Fix is to add scala-reflect to the IMain classpath. See bazelbuild/rules_scala#202 (comment)

from tut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.