FSC initial support

It's small announcement for all IntelliJ Scala plugin users.
I've just added initial support for fsc. And it's not simple to use, and it's possibly buggy or fsc is possibly buggy (I can't build with fsc our plugin sources, but other small project I can). So it's disabled by default (and I think it will be always disabled by default).
This feature will be available from next nightly build: 0.3.515 and upper.
Using this feature:
1. use same compilers for all modules (this is not right, and possibly settings for fsc will be moved to Scala Facet Page settings to have more flexible options to configure your project)
2. create run configuration: Compile Server with enough VM memory and to run it. (this will be removed, I think it's simpler to create Compile Server automatically, but maybe it's good idea to have ability to run Compile Server as you want)
3. then you should flag appropriate checkbox in Scala Compiler settings (see Settings -> Compiler -> Scala Compiler). As I said it will be moved to Facet settings.

Then you can use compiler as usually. Just don't stop compile server and compilation will be very fast...

Any suggestions are welcome. And I hope that somebody will be able to set up fsc in his project.

Best regards,
Alexander Podkhalyuzin.

9 comments
Comment actions Permalink

Great! I'll give it a try.

However I just thunked back to 93.84 because editing in 94.192 has gotten unbearably slow. I haven't tried to figure out why yet though.

0
Comment actions Permalink

Well, its must not be 94.xxx as editing certain files with 93.xx is just as slow. These are same files that always give me problems from build to build.

0
Comment actions Permalink

i finished version 1.0 of my tetris attack ai with your scala plugin.
what went good:
the plugin never crashed or messed up my sources
it was pretty stable

what really didn't please me:
extract method & refactor method signature aren't implemented yet

the debugger is pretty much useless. it cannot evaluate most expressions ( -> foo$1bar$anonfun$whatever$2$3myfield) but can show them in the inspection view if i start at a reachable object (in most cases, "this") so this should be fixable easily. also, it cannot access many variables and fields that are/should be in the current scope (i cannot access contructor parameters inside a method of a class). i understand that in scala, you might be deeply nested somewhere behind 5 invisible functions and therefore, "this" doesn't apply to what a java programmer expects it to, but even in a simple case it did not work.
another problem: the debugger wants you to put "." and "()" there as if you were using java. i cannot simply select some code and evaluate it. this one should be easy to fix since the parser already understands what the code means.

if you need morale support, i'll be there.

0
Comment actions Permalink

> 2. create run configuration

Can you clarify a bit on this. Do we need to define the compiler classpath via the VM args, or should it be found via the project? (There doesn't seem to be a project/module associated with the FSC config.)

0
Comment actions Permalink

Never mind, I had a typo on my -Xmx. Seems to be running now!

0
Comment actions Permalink

I'm not getting anywhere with this. I've tried

A.1 Create an Scala Compilation Server target with -Xms/x args
A.2 Run the target
A.3 Try to compile

And I get Scalac internal error

A.1 Create an Scala Compilation Server target with -Xms/x args
A.2  DON"T Run the target
A.3 Try to compile

And I get Scalac internal error

I'm not specifying a socket port because I dont' see how to set in the run configuration. Is that required?

0
Comment actions Permalink

Look at the stacktrace of your compilation. If it's fatal error during connecting to Compilation Server then fsc can't connect to Compilation Server. Be sure that compilation server proccess is working during compilation. Don't stop compilation server and don't run two compilation servers together (however, sometimes it's reasonable). If you have another error. Then it's possible that you have problems to compile your project with fsc. Try it in your ant build. Compilation Server should work during all your working with project.
I also can suggest you to try fsc with new project with for example one file. If you find a way to run fsc on this project then you'll find solution how to run on your own.This is still experimental feature. And this needs improvements (also just scalac needs improvements to simplify working with compilation).

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

my java classes refused to compile because they couldn't find the scala classes. if i repeat make, they do. rebuild project fails, probably because i have a whitespace in my directory name (the error msg said something like "directory does not exist"). i cannot reproduce the first error but the second.
mix scala & java classes, rebuild project, make, error message, make again -> fine
without fsc, everything works

0
Comment actions Permalink

What's the state of automating the compilation server start-up?
Can we expect anything to happen in the near future?


0

Please sign in to leave a comment.