9 Replies Last post: Dec 13, 2010 2:12 PM by Thomas Vultura  
Alexander Podkhalyuzin JetBrains 1,153 posts since
Jun 7, 2008
Currently Being Moderated

Jan 26, 2010 8:22 PM

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.

Barry Kaplan Novice 319 posts since
Sep 28, 2006
Currently Being Moderated
Jan 27, 2010 3:13 AM in response to: Alexander Podkhalyuzin
Re: FSC initial support

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.

Barry Kaplan Novice 319 posts since
Sep 28, 2006
Currently Being Moderated
Jan 27, 2010 4:32 AM in response to: Barry Kaplan
Re: FSC initial support

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.

Dennis  Haupt Apprentice 716 posts since
Jan 19, 2004
Currently Being Moderated
Jan 27, 2010 5:39 PM in response to: Alexander Podkhalyuzin
Re: FSC initial support

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.

Barry Kaplan Novice 319 posts since
Sep 28, 2006
Currently Being Moderated
Jan 27, 2010 9:05 PM in response to: Alexander Podkhalyuzin
Re: FSC initial support

> 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.)

Barry Kaplan Novice 319 posts since
Sep 28, 2006
Currently Being Moderated
Jan 27, 2010 9:08 PM in response to: Barry Kaplan
Re: FSC initial support

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

Barry Kaplan Novice 319 posts since
Sep 28, 2006
Currently Being Moderated
Jan 27, 2010 9:18 PM in response to: Alexander Podkhalyuzin
Re: FSC initial support

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?

Dennis  Haupt Apprentice 716 posts since
Jan 19, 2004
Currently Being Moderated
Feb 19, 2010 5:13 PM in response to: Alexander Podkhalyuzin
Re: FSC initial support

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

Thomas Vultura Newbie 62 posts since
Feb 12, 2010
Currently Being Moderated
Dec 13, 2010 2:12 PM in response to: Alexander Podkhalyuzin
Re: FSC initial support

What's the state of automating the compilation server start-up?

Can we expect anything to happen in the near future?


More Like This

  • Retrieving data ...