I'm using IntelliJ 11.1.3 to develop a Scala compiler plugin. I have one module configured to generate the plugin itself as a jar file. Aside from some spurious errors produced by IntelliJ (an issue for another day) this is working fine. I have another module configured to use the plugin on some sample code. This second module is intended to be a quick and dirty test of the plugin and a kind of sandbox for experimenting with the plugin.
In the settings for my second module, in the Scala facet dialog, I've added my plugin's jar file to the list of "Compiler Plugins." Based on the errors I'm getting this seems to work fine in the sense that my plugin is being located and loaded when I compile the module. My plugin reads a configuration file the name of which is passed via a -P option to the compiler. I've set up this option in the "Additional compiler options" box.
The system behaves as if the configuration file is not being found. It looks like the options in the file are not processed. So my question has two parts:
First, are the "Additional compiler options" applied before or after the options that include the plugin on the compiler's final command line? I may be wrong but I have a belief that the options that load the plugin must appear before the options sent to the plugin itself. If scalac's command line is being constructed in some other way that might account for what I'm seeing (and if it does... is there a workaround?)
Second, I'd like to see the raw output of the compiler somehow. I could easily add a few choice println statements to my plugin to output debugging information during compilation. However IntelliJ's message window seems to only show a highly digested view of the output (basically a list of errors and warnings). I suppose I could embed my plugin's debug output into error messages but that seems like a hack. Surely there is a simple way of just viewing the raw output, yes?