Compiler plugin development question.

I'm developing a plugin for the Scala compiler using IntelliJ. I'm using IntelliJ 11.1.2 with the Scala plugin 0.5.756 and Scala 2.9.1. My main module creates the plugin itself. Aside from a few spurious errors indicated by IntelliJ that seems to be working fine. I also have a second module that is intended to be compiled with the plugin. It serves as a kind of quick test on the sanity of my plugin. I'm having some problems setting up that module.

My plugin requires a configuration file, the name of which is passed as a plugin parameter to the compiler. In the module settings, in the dialog on the Scala facet there is a box where I can add additional compiler options. Below that box is another box where I can specify compiler plugins. I added the jar file for my plug (as generated by the main module) to the list of plugins. I added the option required to specify the configuration file in the "other compiler options" box. However, this doesn't seem to work. The plugin appears to load because I'm getting errors from it about how it can't find certain files that it needs. Apparenly it doesn't know about the configuration file.

Specifically I'm using this additional option: -P:myPlugin.jar:configFile:relative\path\to\config.cfg. Here I assume the compiler executes in the project root but I've tried some other possibilities (like the module root) with no success.

I have an ant build script that does what is necessary and that works fine. I can run the ant targets from inside IntelliJ and that's reasonably workable so this isn't a critical issue for me. Still... it seems like it should work, yes?

Peter

2 comments
Comment actions Permalink

Of course it should work. Thank you for the report.
I created the issue: http://youtrack.jetbrains.com/issue/SCL-4377

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Thanks. I added myself as a watcher of that issue.

0

Please sign in to leave a comment.