Scala 2.12.0.M5 , MissingPropertyException : daemonServer

plugins
not-a-bug

(Ralic Lo) #1

I was wondering what happened for such compile error… and wonder if it’s possible to avoid this…
Please advise.

Error Msg

Warning:<i><b>root project 'TestNG-1': Unable to build Scala project configuration</b>
Details: groovy.lang.MissingPropertyException: No such property: daemonServer for class: org.gradle.api.tasks.scala.ScalaCompileOptions</i>

Platform Used

Gradle Version: 3.0
Operating System: OSX

build.gradle


apply plugin: 'scala'

dependencies {
    compile 'org.scala-lang:scala-library:2.12.0-M5'
    compile 'com.typesafe.zinc:zinc:0.3.11'
    testCompile "org.scala-lang:scala-library:2.12.0-M5"

}

tasks.withType(ScalaCompile) {
    configure(scalaCompileOptions.forkOptions) {
        memoryMaximumSize = '1g'
        jvmArgs = ['-XX:MaxPermSize=512m']
    }
}


(Stefan Wolf) #2

Hi,

thank you for reporting!

I tried with the exact same build file and I do not get a warning. I am a little bit surprised why you add the zinc compiler to the compile configuration and not to the zinc configuration and why you add scala-library twice - once for compile and once for testCompile. It would also be great if you could provide a stackstrace (run with -s) or a build scan.

Regards,
Stefan


(Ralic Lo) #3

Hi Stefan,

I was unable to test scala using TestNG. The original error issue has been resolved as below.
The warning still comes up even removing zinc’s dependency. Since it’s just a warning that doesn’t affect compile and test I am running, it’s not a problem for now.

I already dumped the debug messages using “-d” parameter. Please see attached link for the log.
https://drive.google.com/file/d/0B2PC2QjV54CcTjlCTlJsOURRSkk/view?usp=sharing

apply plugin: 'scala'

dependencies {
    // Scala Support
    //    compile 'org.scala-lang:scala-library:2.11.8' // for scala 2.11
    compile 'org.scala-lang:scala-library-all:2.12.0-M5' // for scala 2.12
    compile 'org.scalatest:scalatest-app_2.12.0-M5:3.0.0'
    testCompile "org.scala-lang:scala-library-all:2.12.0-M5"
    testCompile 'org.scalatest:scalatest-app_2.12.0-M5:3.0.0'
}

tasks.withType(ScalaCompile) {
    configure(scalaCompileOptions.forkOptions) {
        memoryMaximumSize = '1g'
    }
}

IDEA integration with Scala plugin broken since Gradle 3.0 (No such property: daemonServer)
(Stefan Wolf) #4

Hi Ralic,

good to hear that this works for you now. I am still a little bit confused by your error report. Looking at the debug log I do not find a line with Warning:. Moreover, I still do think that it is not a good idea to have org.scala-lang:scala-library-all:2.12.0-M5 both on compile and testCompile configurations. I would also completely remove org.scalatest:scalatest-app_2.12.0-M5:3.0.0 from the compile configuration because it should only be used in tests.

The build file I would suggest would be as follows:

apply plugin: 'scala'

dependencies {
    // Scala Support
    compile 'org.scala-lang:scala-library-all:2.12.0-M5' // for scala 2.12
    testCompile 'org.scalatest:scalatest-app_2.12.0-M5:3.0.0'
}

tasks.withType(ScalaCompile) {
    configure(scalaCompileOptions.forkOptions) {
        memoryMaximumSize = '1g'
    }
}

Does this work for you?


(Stefan Wolf) #5

Hi Ralic,

we had another bug report about that: IDEA integration with Scala plugin broken since Gradle 3.0 (No such property: daemonServer)

It made me realize that this only happens when you import the project into IDEA. See my answer to the other forum entry for a solution to your problem.

Cheers,
Stefan


(Ralic Lo) #6

Hi Stefan,

Yes, It works using the configuration you mentioned, and that is what I
used as final setting.

Thanks !