15 Replies Last post: Dec 21, 2012 1:10 AM by James Kleeh  
Cristian Vasile Mocanu Newbie 35 posts since
Feb 12, 2009
Currently Being Moderated

Dec 3, 2012 12:55 PM

"Make project automatically" - only while not running/debugging

In build IU-123.45, I see an addition to the "make project automatically" option: "only works while not running / debugging".

Does this mean that if we have any run configuration started, this option won't do anything?

 

If this is so, then this option is quite useless for me. This is because I always have my web app running together with JRebel.

I suspect many others will also not be benefitted of this feature.

 

Could you explain why this restriction?

Is there any chance this restriction will be lifted soon?

Eugene Zhuravlev JetBrains 4,038 posts since
Oct 12, 2001
Currently Being Moderated
Dec 4, 2012 7:35 PM in response to: Cristian Vasile Mocanu
Re: "Make project automatically" - only while not running/debugging

Hi Cristian,

 

> Could you explain why this restriction?

 

Sure. The main goal is to have all changes that are done to class files under control. When you run the application you want to be sure that it is run exactly on the same set of classes that was present on disk before you started your program. If you need to update classes, you invoke make explicitly and all classe are updated on disk as they should. But here you define when to update and not the program. Another point is that classes are updated on disk in non-atomic way. First old classes are removed in order to avoid compiler to use them for resolve, then compiler is run and classes are generated. So at some random points of time while the application is running the class set on disk may be incomplete or half-updated. If at this point the running application performs class loading, you may end up with some weird state where application is not functioning properly, so you'll have to restart it. If there was a way to determine "safe"  points of time where automatic class generation won't harm running application, we would not have put this restriction. But for now we believe that the current way of working is the best solution.

 

Regards,

  Eugene.

Eugene Zhuravlev JetBrains 4,038 posts since
Oct 12, 2001
Currently Being Moderated
Dec 4, 2012 7:57 PM in response to: Cristian Vasile Mocanu
Re: "Make project automatically" - only while not running/debugging

> Does this mean that the new compiler mode is basically unusable together with JRebel?

 

In terms that you expect the make to start "automatically" - yes. By explicitly running make (ctrl-F9) all classes will be updated and JRebel will reload them.

Eugene Zhuravlev JetBrains 4,038 posts since
Oct 12, 2001
Currently Being Moderated
Dec 4, 2012 9:26 PM in response to: Cristian Vasile Mocanu
Re: "Make project automatically" - only while not running/debugging

> To be clear: only classes that needs recompiling (+dependencies) will be deleted and recompiled, correct?

 

Yes, exactly. This is what we call "incremental compilation". Though I must admit that the set of recompiled classes is not "strict" and depending on particular changes may be larger than actually needed: there is always a tradeoff between the precision and the speed of analysis. The same situation was with the previous implementation, so this is not a "degradation". Of course, we strive not to compile what is not needed to be compiled and for some cases the new implementation beats the old one.

James Kleeh Newbie 5 posts since
Dec 20, 2012
Currently Being Moderated
Dec 20, 2012 10:14 PM in response to: Eugene Zhuravlev
Re: "Make project automatically" - only while not running/debugging

Is it possible to make this a setting?

 

This is terribly inconvenient. I really liked it the way it was. This is enough for me to switch back to the older build or start using 11 again...

James Kleeh Newbie 5 posts since
Dec 20, 2012
Currently Being Moderated
Dec 20, 2012 11:54 PM in response to: Cristian Vasile Mocanu
Re: "Make project automatically" - only while not running/debugging

How would I do that?

James Kleeh Newbie 5 posts since
Dec 20, 2012
Currently Being Moderated
Dec 21, 2012 12:22 AM in response to: Eugene Zhuravlev
Re: "Make project automatically" - only while not running/debugging

This is horrifying.

 

I run Build - Make and I get some error about how Hot Swap Failed - Operation not supported by VM.

 

I build Grails applications - Are you saying if I want to debug my application I HAVE TO RESTART THE SERVER EVERYTIME I MAKE A CODE CHANGE???????

 

Please give me some answers here - I have been reccommending IntelliJ to everyone I know and I would hate to be seen as giving bad advice. When it's not broke don't fix it.

James Kleeh Newbie 5 posts since
Dec 20, 2012
Currently Being Moderated
Dec 21, 2012 1:03 AM in response to: Cristian Vasile Mocanu
Re: "Make project automatically" - only while not running/debugging

Before this new feature I could change nearly anything in my grails projects without having to restart the grails application (in debug or run mode). Now I have to restart to get any changes to take affect. What is the problem?

James Kleeh Newbie 5 posts since
Dec 20, 2012
Currently Being Moderated
Dec 21, 2012 1:10 AM in response to: James Kleeh
Re: "Make project automatically" - only while not running/debugging

http://youtrack.jetbrains.com/issue/IDEA-97889

 

Possibly this is the issue instead of what this thread was created for.

More Like This

  • Retrieving data ...