autowire
autowire copied to clipboard
The addition of dependency to autowire causing problem with compilation
adding dependency "com.lihaoyi" %% "autowire" % "0.2.3" make compilation fails with error:
object creation impossible, since method PerRunReporting in trait Reporting of type => this.PerRunReporting is not defined [error] val g = new scala.tools.nsc.Global(settings,reporter){ [error] ^
scala version: 2.11.1
The last version of autowire which works for me is 0.1.2
do you have any temporary workaround I can use?
Have you tried cleaning and re-compiling? I don't see how adding a dependency should do anything
Hm, I've never used the "clean" command. What I've observed is: when I change version to any higher than 0.1.2 I get the error and when I change it back to 0.1.2 or lower everything compiles without problems. In few days I will try to prepare minimal project setup on which I will be able to reproduce this behaviour and send it to you - I can't do this now
Closing this for now, feel free to re-open when you have a minimal example ^_^
I had a lot of work and I forgot about that :) Here https://www.dropbox.com/s/8erqzshe3jxjnan/autowire-issue-example.tar.gz you have project witch fails to compile for me with message:
[error] /home/run/tmp/autowire-issue-example/scalajvm/app/controllers/Application.scala:40: object creation impossible, since method PerRunReporting in trait Reporting of type => this.PerRunReporting is not defined
[error] val g = new scala.tools.nsc.Global(settings,reporter){
[error] ^
[error] one error found
[error] (issue-jvm/compile:compile) Compilation failed
when you change autowire dependency to 0.1.2 version it compiles without problems
whoa that looks unusual. You are instantiating the compiler in your code? I'd guess that the version of scala-reflect
Autowire pulls in (2.11.2 I think?) Is stomping over the version your code is expecting. Would it be correct to say you're pulling in a version of scala-reflect
and your scalaVersion
isn't 2.11.2?