I'm working with a project which uses a custom macro for building its AST nodes. The macro is written using macroparadise. Currently the project is stored in version control as a eclipse Scala-IDE project (we are trying to change this to use SBT, but that's not gonna happen immediately). We want to include the macro with the project to make building easy without setup.
How do I specify a compiler plugin using a plugin archive or path relative to the project or workspace?
I have tried a range of different things:
- -Xplugin:OrcScala/lib/paradise_2.12.2-2.1.0.jar
- -Xpluginsdir OrcScala/lib/
- -Xplugin:${resource_loc:/OrcScala/lib/paradise_2.12.2-2.1.0.jar}
- and many other combinations and variations, including providing these options using the builtin Xplugins/etc fields in the advanced tab of the project.
None of these work. The only thing that seems to work is providing the full absolute path. I suspect this is because all the paths are resolve with respect to the current working directory of the project instead of some part of the workspace. Scala-IDE does help me with this in that if I put a relative path in the Xplugin field it will replace it with an absolute path (by prepending the workspace path) when the preferences are OPENED (not when they are closed interestingly). However, it then saves the absolute path in the file meaning that the project configuration will be broken for any other users.
Is there a known way to make this work?
Thanks!
-Arthur