What is the only true way to develop Scala Plugin?

I wanted to hack a bit the scala plugin so I carefully read both Getting Started with Plugin Development the Setting up Scala plugin project in IntelliJ IDEA and carefully followed them.

The IDEA itself built like a charm, so I moved to Scala Plugin (I was trying to build intellij-scala master (e77d6f63)). Alas it wasn't that trivial as documented.

At first I tried to build it against idea master - it failed. I tried rebuilding once again since the bottom of the doc mentioned the bug in FSC. But rebuilding didn't help, I still got build errors.

Then I thought that the bug was about FSC which I wasn't probably using as IDEA 12 featured new external build mode enabled by default. So I went to settings, disabled it, tried the build once again and got another number of errors (how come?). Then just for the completness I tried the ant build and got yet another set errors.

I decided that building against IDEA master wasn't supported so I linked LedaSDK to my IDEA installation directory and tried all the three build types once again. Yay! One of them succeeded!

The final set of compilation tests were performed against the 12.1.2 source code tarball I got from http://www.jetbrains.org/display/IJOS/Download (I wanted the source code during development and, well, this time I was just curious to get the error numbers).

Here are the results:

IDEA master
(a45be839)
Idea 12.1.4
(link to my dev env)
IDEA 12.1.2
(from a tarball)
headless / ant 397 errors 347 errors 347 errors
within IDEA / fsc 150 errors, 8 warnings no errors, 74 warnings no errors, 72 warnings
within IDEA / external build 72 errors, 11 warnings 22 errors, 11 warnings 22 errors, 11 warnings


So finally I was able to build the plugin (source tarball + plain old FSC, no fancy external build server). But it took me quite a while to get it done. I wish the following issues were addressed in the Scala Plugin dev doc, that would definitely lower the entry barrier to new developers:

Is building against Idea-master not supported?

Is external build mode not supported?

Why all the three build methods produce different set of errors even though the same compiler is used?


Anyway, thank you for the great product you provide. Expect for pull requests :).

P.S.: My dev environment:
Ubuntu 12.04 x86_64
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
1 comment

You are right, master is for IDEA 12.1. So it requires IDEA 12 in LedaSDK folder.
For IDEA 13 you need to use IDEA13 branch, it requires IDEA 13 in IDEA13SDK folder.

Ant is not supported. I just removed it to avoid problems in future.
External build should be ok. Can you provide errors log?

Best regard,
Aleksandr Podkhaliuzin.

0

Please sign in to leave a comment.