- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
problem with 2.8.0-beta1-prerelease Eclipse Save All
Thu, 2010-01-28, 23:02
I just installed the new 2.8-beta1-prerelease of Scala, and installed the new Eclipse plugins
(from http://www.scala-lang.org/scala-eclipse-plugin-beta-preview) on Eclipse 3.5, then restarted Eclipse.
I visited my current project and after tweaking the dependencies (I was using Maven, so it was
using 2.7.7), I rebuilt all. The new compiler seems stricter in its use of imports (which is
A Good Thing). That is, my code had several source files that reference classes that the new compiler
cannot find but which the 2.7.x compiler could. most were of the sort where I
import com.sas.x.y.z.Type
then later I reference a type Type2 that resides in com.sas.x.y.z.Type2, or
in com.sas.x.y.Type2.
I started to apply the fixes to my imports, but each save would cause
Eclipse to rebuild the project (which takes 10 to 30 seconds sometimes), so I
decided to make changes to all the files, then save them all at the same time.
After patching all my erroneous imports, I did a File->Save All and Eclipse
hung. The IDE was unresponsive and did not refresh, leaving large white areas.
It stayed that way for several minutes (I waited 10 or so) before I just killed it.
However, my changes were not saved.
Anyone seen something similar or know of a workaround?
It's not something I can reproduce and file a Trac on, sorry.
(well, perhaps I could create a large example of dummy
packages and try to reproduce it, but that would take a bit of time.)
Java runtime is Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Fri, 2010-01-29, 00:07
#2
Re: problem with 2.8.0-beta1-prerelease Eclipse Save All
On Fri, 2010-01-29 at 00:43 +0200, Spiros Tzavellas wrote:
> Hi David,
>
> I cannot comment on the "Save All" issue that you had, since I rarely
> use it, but 30 seconds build every time you save a file it is a lot.
He said 10 to 30 seconds, I've seen that too and I had no maven builder.
It's the reason why I was asking for the option not to compile dependent
projects.
Ismael
Fri, 2010-01-29, 00:17
#3
Re: problem with 2.8.0-beta1-prerelease Eclipse Save All
On Thu, 2010-01-28 at 17:02 -0500, David J. Biesack wrote:
> I started to apply the fixes to my imports, but each save would cause
> Eclipse to rebuild the project (which takes 10 to 30 seconds sometimes), so I
> decided to make changes to all the files, then save them all at the same time.
Did many other projects depend on the project where you were fixing the
import? Also, do you have Java files in your projects or dependencies to
Java projects in your workspace?
Ismael
Fri, 2010-01-29, 14:27
#4
Re: problem with 2.8.0-beta1-prerelease Eclipse Save Al
> Date: Fri, 29 Jan 2010 00:43:17 +0200
> From: Spiros Tzavellas
> CC:
>
> Hi David,
>
> I cannot comment on the "Save All" issue that you had, since I rarely
> use it, but 30 seconds build every time you save a file it is a lot.
yes, I know.
I think this is mostly due to the use of scala.util.parsing.combinator
which seem to force lots of work by the compiler, resolving intrinsics, etc.
Scope-wise, I have 74 source files yielding 784 .class files.
> Since you are using Maven this might be caused by the Maven builder.
I have the Maven builder disabled. I use it primarily for dependencies,
running tests, generating API doc, and for our continuous integration builds,
not for day to day development.
> Open a Maven console, edit and save a file and watch the output. If
> you see that Maven is compiling you Scala files then it might be a
> good idea to remove the Maven builder from your project. If I am
> correct m2eclipse has an option to skip the maven-compiler-plugin when
> saving a file but this does not work for Scala. Personally, I have
> lots of Scala/Maven projects and I always remove the Maven builder
> from Eclipse. The only problem I can think of is when you are using
> filtered resources.
no filtered resources either...
> Hope this helps.
Fri, 2010-01-29, 14:37
#5
Re: problem with 2.8.0-beta1-prerelease Eclipse Save All
> From: Ismael Juma
> CC:
> Date: Thu, 28 Jan 2010 23:04:25 +0000
>
> Did many other projects depend on the project where you were fixing the
> import? Also, do you have Java files in your projects or dependencies to
> Java projects in your workspace?
>
> Ismael
My Scala project has just Scala source, no .java. However, it depends on a Java project,
and a third Scala project depends on it. All three were open in my workspace at the time.
After I restarted Eclipse, I returned to my files and fixed their imports, saving
each one along the way, and I've had no freezes.
Hi David,
I cannot comment on the "Save All" issue that you had, since I rarely
use it, but 30 seconds build every time you save a file it is a lot.
Since you are using Maven this might be caused by the Maven builder.
Open a Maven console, edit and save a file and watch the output. If
you see that Maven is compiling you Scala files then it might be a
good idea to remove the Maven builder from your project. If I am
correct m2eclipse has an option to skip the maven-compiler-plugin when
saving a file but this does not work for Scala. Personally, I have
lots of Scala/Maven projects and I always remove the Maven builder
from Eclipse. The only problem I can think of is when you are using
filtered resources.
Hope this helps.