Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:scalac: bad option: -P (IntelliJ IDEA)

After upgrade to IntelliJ IDEA 14.1 a project compilation stuck with an error message:

Error:scalac: bad option: -P:/Users//.m2/repository/org/scalamacros/paradise_2.10.4/2.1.0-M1/paradise_2.10.4-2.1.0-M1.jar

There is an additional parameter for scala compiler in:

Preferences 
 -> Build, Execution, Deployment 
    -> Compiler
       -> Scala compiler
          -> Additional compiler options = <some parameters>

So, now you know from where the parameter comes from and it's up to you to decide should you remove/change for something else or not.

Hope it saved you time ;-)

like image 889
btbvoy Avatar asked Nov 18 '14 13:11

btbvoy


2 Answers

Just change the scala compiler parameters to

-Xplugin:/your/user/home/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar

(of course giving your valid home folder) in

Preferences 
 -> Build, Execution, Deployment 
    -> Compiler
       -> Scala compiler
          -> Additional compiler options = <some parameters>

(as said in the question)

This solves the problem for me. It seems the -P flag is for specifying a plugin option while -Xplugin is for setting a plugin file location.

like image 77
Gábor Hermann Avatar answered Sep 17 '22 11:09

Gábor Hermann


In my case it wasn't work - but i solved this problem! Delete scala_compiler.xml in .ieda dir. And it works fine!

Maybe someone will find this useful

like image 33
aarexer Avatar answered Sep 20 '22 11:09

aarexer