Contributing to Scala IDE

115 views
Skip to first unread message

Matthias Langer

unread,
Oct 6, 2014, 10:05:25 AM10/6/14
to scala-...@googlegroups.com
Hello everybody,

I'm currently thinking about helping out with Scala IDE here and there. I should have plenty of time in the next few weeks to get familiar with the project. In the long run I expect that I have about a day per week to spare for the project. Note that although I have lot's of experience with software development (mostly Java), I have not yet worked on large Scala projects or Eclipse plugins.

So here are my questions for you:
1) Are you currently looking for contributors?
2) Does it make sense to involve myself with the project given the time constraints from above?

If 1) & 2) are positive, I need some help with setting up org.scala-ide.sdt.core in Eclipse (see eclipse-settings.txt). I get two compilation errors:

"
class ScalaClassFile needs to be abstract, since method getScalaWordFinder in trait IScalaCompilationUnit of type ()scala.tools.eclipse.contribution.weaving.jdt.IScalaWordFinder is not defined ScalaClassFile.scala /org.scala-ide.sdt.core/src/org/scalaide/core/internal/jdt/model line 24 Scala Problem
"

"
class ScalaSourceFile needs to be abstract, since method getScalaWordFinder in trait IScalaCompilationUnit of type ()scala.tools.eclipse.contribution.weaving.jdt.IScalaWordFinder is not defined ScalaSourceFile.scala /org.scala-ide.sdt.core/src/org/scalaide/core/internal/jdt/model line 75 Scala Problem
"

Note that I'm working with the most recent sources from git: https://github.com/mlangc/scala-ide Can you give me any hint how to fix these errors?

Regards,
Matthias




eclipse-settings.txt

francois...@typesafe.com

unread,
Oct 6, 2014, 12:05:51 PM10/6/14
to scala-...@googlegroups.com
Hi Matthias,

Sure, we are looking for new contributors ! And thanks for having a look at the Scala-IDE project.

Your time investment is fine, we have areas big and small where your effort can find a valuable outlet.

- You’re not seeing those errors on the command-line, but in Eclipse aren’t you ?

- have you run the build once on the command-line, as described in :


before running it in Eclipse ?



FG


--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-dev/01c32717-9781-4acc-b131-ecf2b9436b00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<eclipse-settings.txt>

iulian dragos

unread,
Oct 6, 2014, 1:13:30 PM10/6/14
to scala-ide-dev
Also, make sure you are using the latest nightly build. Right now it's
moving pretty fast, and the way dependencies are solved is that the
"installed" bundles can be used as dependencies (unless you have the
corresponding project in the workspace, in which case it takes
precedence). Your errors look like some classes were deleted from the
...aspects bundle.
> https://groups.google.com/d/msgid/scala-ide-dev/1412611548706.398d9e14%40Nodemailer.
>
> For more options, visit https://groups.google.com/d/optout.



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

francois...@typesafe.com

unread,
Oct 6, 2014, 1:15:20 PM10/6/14
to scala-...@googlegroups.com
Yes, they were, so, at the moment (i.e. from now to the release of 4.0.0), to avoid any desync with the nightly, it’s best to have :
- debug
- aspects
- core 

and their respective test projects open in the IDE.


FG


Matthias Langer

unread,
Oct 7, 2014, 5:31:10 AM10/7/14
to scala-...@googlegroups.com
Thanks everybody for your help! I did run build-all.sh before importing the projects in Eclipse, and it worked, although I'm getting test failures since syncing with the repository lately. Importing debug and aspects did indeed solve my Eclipse related build problems in core, but now I have problems the debug project:

Description Resource Path Location Type
not found: type EquinoxWeavingApplicationLaunchConfiguration ScalaEclipseApplicationLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 11 Scala Problem

Description Resource Path Location Type
not found: type EquinoxWeavingJUnitLaunchConfigurationDelegate ScalaEclipseJUnitLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 11 Scala Problem

Description Resource Path Location Type
object ew is not a member of package org.scalaide ScalaEclipseApplicationLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 5 Scala Problem

Description Resource Path Location Type
object ew is not a member of package org.scalaide ScalaEclipseJUnitLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 6 Scala Problem

Regards,
Matthias 


Simon Schäfer

unread,
Oct 7, 2014, 5:44:28 AM10/7/14
to scala-...@googlegroups.com

On 10/07/2014 11:31 AM, Matthias Langer wrote:
Thanks everybody for your help! I did run build-all.sh before importing the projects in Eclipse, and it worked, although I'm getting test failures since syncing with the repository lately. Importing debug and aspects did indeed solve my Eclipse related build problems in core, but now I have problems the debug project:
Did you install the Scala IDE generated by the build into your Eclipse? It is located in org.scala-ide.sdt.update-site/target/site.

Description Resource Path Location Type
not found: type EquinoxWeavingApplicationLaunchConfiguration ScalaEclipseApplicationLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 11 Scala Problem

Description Resource Path Location Type
not found: type EquinoxWeavingJUnitLaunchConfigurationDelegate ScalaEclipseJUnitLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 11 Scala Problem

Description Resource Path Location Type
object ew is not a member of package org.scalaide ScalaEclipseApplicationLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 5 Scala Problem

Description Resource Path Location Type
object ew is not a member of package org.scalaide ScalaEclipseJUnitLaunchConfigurationDelegate.scala /org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching line 6 Scala Problem

Regards,
Matthias 


--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

Matthias Langer

unread,
Oct 7, 2014, 9:02:17 AM10/7/14
to scala-...@googlegroups.com
Thank you very much. I've two more questions:

1) Is working with Scala IDE generated by the build generally recommended when working on the project? I'm asking because I finally was able to import org.scala-ide.sdt.core into Eclipse 4.4.1.M20140925-0400 with Scala IDE 4.0.0.m3-2_11-201407241647-33f4f20. 
Using this setup I was able to run the Scala IDE within Eclipse (as outlined here: http://scala-ide.org/docs/dev/setup/setup.html#run-the-scala-ide-within-eclipse). 

2) When running org.scalaide.TestsSuite from within Eclipse I got 4 failures (tell me if you are interested in the details). Is this expected?

Regards,
Matthias


Simon Schäfer

unread,
Oct 7, 2014, 9:12:17 AM10/7/14
to scala-...@googlegroups.com

On 10/07/2014 03:02 PM, Matthias Langer wrote:
Thank you very much. I've two more questions:

1) Is working with Scala IDE generated by the build generally recommended when working on the project? I'm asking because I finally was able to import org.scala-ide.sdt.core into Eclipse 4.4.1.M20140925-0400 with Scala IDE 4.0.0.m3-2_11-201407241647-33f4f20. 
Using this setup I was able to run the Scala IDE within Eclipse (as outlined here: http://scala-ide.org/docs/dev/setup/setup.html#run-the-scala-ide-within-eclipse).
It is not recommended, it is required. When a new feature is added or removed to Scala IDE (or even to scalac) there is a chance that your IDE can't compile the newest sources anymore. You don't need to update your installed Scala IDE every time you update your master to upstream/master but you should keep in mind that when you see unexpected compilation errors you should first update your installed nightly.


2) When running org.scalaide.TestsSuite from within Eclipse I got 4 failures (tell me if you are interested in the details). Is this expected?
If they are from the completion test than you don't need to care, they fail on my system too. I don't know why though.

Regards,
Matthias


--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

Matthias Langer

unread,
Oct 7, 2014, 9:25:51 AM10/7/14
to scala-...@googlegroups.com
Am Dienstag, 7. Oktober 2014 15:12:17 UTC+2 schrieb Simon Schäfer:

On 10/07/2014 03:02 PM, Matthias Langer wrote:
Thank you very much. I've two more questions:

1) Is working with Scala IDE generated by the build generally recommended when working on the project? I'm asking because I finally was able to import org.scala-ide.sdt.core into Eclipse 4.4.1.M20140925-0400 with Scala IDE 4.0.0.m3-2_11-201407241647-33f4f20. 
Using this setup I was able to run the Scala IDE within Eclipse (as outlined here: http://scala-ide.org/docs/dev/setup/setup.html#run-the-scala-ide-within-eclipse).
It is not recommended, it is required. When a new feature is added or removed to Scala IDE (or even to scalac) there is a chance that your IDE can't compile the newest sources anymore. You don't need to update your installed Scala IDE every time you update your master to upstream/master but you should keep in mind that when you see unexpected compilation errors you should first update your installed nightly.

OK, I'll keep that in mind, thanks! 

2) When running org.scalaide.TestsSuite from within Eclipse I got 4 failures (tell me if you are interested in the details). Is this expected?
If they are from the completion test than you don't need to care, they fail on my system too. I don't know why though.

Hmm, I got failures like

java.lang.AssertionError: expected 2 link, found 0 expected:<2> but was:<0>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.scalaide.core.hyperlink.HyperlinkTester$class.checkScalaLinks(HyperlinkTester.scala:65)
at org.scalaide.core.hyperlink.HyperlinkDetectorTests$.checkScalaLinks(HyperlinkDetectorTests.scala:16)
at org.scalaide.core.hyperlink.HyperlinkTester$$anon$1$$anonfun$andCheckAgainst$default$2$2.apply(HyperlinkTester.scala:43)
at org.scalaide.core.hyperlink.HyperlinkTester$$anon$1$$anonfun$andCheckAgainst$default$2$2.apply(HyperlinkTester.scala:43)
at org.scalaide.core.hyperlink.HyperlinkTester$$anon$1$$anonfun$andCheckAgainst$2.apply(HyperlinkTester.scala:52)
at org.scalaide.core.hyperlink.HyperlinkTester$$anon$1$$anonfun$andCheckAgainst$2.apply(HyperlinkTester.scala:48)
or

java.lang.AssertionError: Wrong all sources jars expected:<List(C:/Program Files/Eclipse/luna/plugins/org.scala-lang.scala-actors.source_2.11.2.v20140721-095018-73fb460c1c.jar, C:/Program Files/Eclipse/luna/plugins/org.scala-lang.scala-compiler.source_2.11.2.v20140721-095018-73fb460c1c.jar, C:/Program Files/Eclipse/luna/plugins/org.scala-lang.scala-library.source_2.11.2.v20140721-095018-73fb460c1c.jar, C:/Program Files/Eclipse/luna/plugins/org.scala-lang.scala-reflect.source_2.11.2.v20140721-095018-73fb460c1c.jar)> but was:<List()>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.scalaide.core.project.ScalaInstallationTest.checkMultiBundleInstallation(ScalaInstallationTest.scala:137)
at org.scalaide.core.project.ScalaInstallationTest.multiBundleInstallationsTest(ScalaInstallationTest.scala:81)

Simon Schäfer

unread,
Oct 7, 2014, 10:10:47 AM10/7/14
to scala-...@googlegroups.com

On 10/06/2014 04:05 PM, Matthias Langer wrote:
> 2) Does it make sense to involve myself with the project given the
> time constraints from above?
That depends on what component you want to work on. Do you already have
a plan?

I could need some help with shipping save actions [1] and auto edits
[2]. The largest concern so far is the new API. It was designed to be
easier to use than the Eclipse API but it still needs some cleanups. You
could test if the API works at all for a newcomer by implementing your
own save action or auto edit. Open bugs can be found in [3] and [4] if
you are interested in fixing one of them.

[1]: https://github.com/scala-ide/scala-ide/pull/761
[2]: https://github.com/scala-ide/scala-ide/pull/770
[3]:
https://www.assembla.com/spaces/ae55a-oWSr36hpeJe5avMc/tickets?tickets_report_id=u1200023&tag_id=520813
[4]:
https://www.assembla.com/spaces/ae55a-oWSr36hpeJe5avMc/tickets?tickets_report_id=u1200023&tag_id=471493

iulian dragos

unread,
Oct 7, 2014, 11:20:38 AM10/7/14
to scala-ide-dev
On Tue, Oct 7, 2014 at 3:25 PM, Matthias Langer
<matthia...@codecentric.de> wrote:
> Am Dienstag, 7. Oktober 2014 15:12:17 UTC+2 schrieb Simon Schäfer:
>>
>>
>> On 10/07/2014 03:02 PM, Matthias Langer wrote:
>>
>> Thank you very much. I've two more questions:
>>
>> 1) Is working with Scala IDE generated by the build generally recommended
>> when working on the project? I'm asking because I finally was able to import
>> org.scala-ide.sdt.core into Eclipse 4.4.1.M20140925-0400 with Scala IDE
>> 4.0.0.m3-2_11-201407241647-33f4f20.
>> Using this setup I was able to run the Scala IDE within Eclipse (as
>> outlined here:
>> http://scala-ide.org/docs/dev/setup/setup.html#run-the-scala-ide-within-eclipse).
>>
>> It is not recommended, it is required. When a new feature is added or
>> removed to Scala IDE (or even to scalac) there is a chance that your IDE
>> can't compile the newest sources anymore. You don't need to update your
>> installed Scala IDE every time you update your master to upstream/master but
>> you should keep in mind that when you see unexpected compilation errors you
>> should first update your installed nightly.
>
>
> OK, I'll keep that in mind, thanks!

I update regularly to the latest nightly build. I rarely build my own
these days. It works well.
The two failures are related: the first one fails to find a hyperlink
to something coming from the Scala library. The second one says that
it couldn't find source attachments to the ScalaInstallation. I'm not
sure why that would be the case, but you can check that those files
are inded in the plugins directory, and that the test configuration
has all the required plugins.

iulian

Matthias Langer

unread,
Oct 8, 2014, 1:29:34 AM10/8/14
to scala-...@googlegroups.com


Am Dienstag, 7. Oktober 2014 16:10:47 UTC+2 schrieb Simon Schäfer:

On 10/06/2014 04:05 PM, Matthias Langer wrote:
> 2) Does it make sense to involve myself with the project given the
> time constraints from above?
That depends on what component you want to work on. Do you already have
a plan?

As of implementing specific features? No, at the moment I want to become acquainted with to project, most likely by fixing minor bugs or by implementing simple features. Thanks a lot for your links: I'm going to look at them in detail today!

Matthias Langer

unread,
Oct 8, 2014, 3:05:20 AM10/8/14
to scala-...@googlegroups.com
The two failures are related: the first one fails to find a hyperlink
to something coming from the Scala library. The second one says that
it couldn't find source attachments to the ScalaInstallation. I'm not
sure why that would be the case, but you can check that those files
are inded in the plugins directory, and that the test configuration
has all the required plugins.

 Thanks for the hint, after installing the sources into Eclipse all test failures are gone.

iulian dragos

unread,
Oct 8, 2014, 3:13:27 AM10/8/14
to scala-ide-dev
By the way, kudos for picking up this project and pushing through with
the setup! We're super excited to have more people contributing, IDEs
are large beasts that need a lot of love!

I'll try to come up with a list of bugs/features that are good
starting points these days, in addition to Simon's suggestions. We're
a bit in a rush to get 4.0-RC1 out of the door, but I should find some
time these days.

iulian


>
> --
> You received this message because you are subscribed to the Google Groups
> "Scala IDE Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scala-ide-de...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/scala-ide-dev/a2f09a27-79d8-465c-af9b-ab39ebb586ae%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



Matthias Langer

unread,
Oct 9, 2014, 2:46:18 AM10/9/14
to scala-...@googlegroups.com
Thanks a lot for your help so far. Unfortunately I'm still having trouble with the setup. The process seems to be somewhat fragile, as I'm seeing different results on different systems. I guess that this might be connected to the different nightlies, different JVMs and Maven versions, and of course different states of the GIT repository I'm working with. So I have some general questions fist:

-) Are there known problems with Java8?
-) Are there known problems with certain Maven versions?
-) Are there known problems with certain Eclipse versions?
-) What JDK, Maven, Eclipse versions are you using for development?

After these general questions, I have some more questions about the problem I'm currently experiencing on particular on a system where I just tried to setup the project: The issue I'm having is that after importing core and debug into Eclipse, I get the error message:

Unable to find a scala library. Please add the scala container or a scala library jar to the build path.

So I added the scala-library manually, which seemingly worked, but compiling debug I got

!ENTRY org.scala-ide.sdt.core 4 0 2014-10-09 08:36:36.086
!MESSAGE Error in Scala compiler
!STACK 0
java.lang.StackOverflowError
        at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:110)
        at scala.reflect.internal.tpe.TypeMaps$typeVarToOriginMap$.apply(TypeMaps.scala:977)
        at scala.reflect.internal.tpe.TypeMaps$TypeMap.applyToSymbolInfo(TypeMaps.scala:218)
        at scala.reflect.internal.tpe.TypeMaps$TypeMap.loop$1(TypeMaps.scala:227)
        at scala.reflect.internal.tpe.TypeMaps$TypeMap.noChangeToSymbols(TypeMaps.scala:229)
        at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:243)
        at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:128)
        at scala.reflect.internal.tpe.TypeMaps$typeVarToOriginMap$.apply(TypeMaps.scala:977)
        at scala.reflect.internal.Types$Type.isGround(Types.scala:962)
        at scala.reflect.internal.Types$Type.findMember(Types.scala:1016)
        at scala.reflect.internal.Types$Type.memberBasedOnName(Types.scala:631)
        at scala.reflect.internal.Types$Type.nonPrivateMember(Types.scala:607)
        at scala.tools.nsc.typechecker.Infer$Inferencer.followApply(Infer.scala:619)
        at scala.tools.nsc.typechecker.Infer$Inferencer$InferMethodAlternativeTwice$1.scala$tools$nsc$typechecker$Infer$Inferencer$InferMethodAlternativeTwice$$followType(Infer.scala:1393)
        at scala.tools.nsc.typechecker.Infer$Inferencer$InferMethodAlternativeTwice$1.scala$tools$nsc$typechecker$Infer$Inferencer$InferMethodAlternativeTwice$$rankAlternatives(Infer.scala:1396)
        at scala.tools.nsc.typechecker.Infer$Inferencer$InferMethodAlternativeTwice$1$$anonfun$36.apply(Infer.scala:1399)
        at scala.tools.nsc.typechecker.Infer$Inferencer$InferMethodAlternativeTwice$1$$anonfun$36.apply(Infer.scala:1399)
        at scala.tools.nsc.typechecker.Infer$class.improves$1(Infer.scala:62)
        at scala.tools.nsc.typechecker.Infer$$anonfun$4.apply(Infer.scala:65)
        at scala.tools.nsc.typechecker.Infer$$anonfun$4.apply(Infer.scala:65)
        at scala.math.Ordering$$anon$9.compare(Ordering.scala:200)
        at java.util.TimSort.countRunAndMakeAscending(Unknown Source)
        at java.util.TimSort.sort(Unknown Source)
        at java.util.Arrays.sort(Unknown Source)
        at scala.collection.SeqLike$class.sorted(SeqLike.scala:618)
        at scala.collection.AbstractSeq.sorted(Seq.scala:41)
        at scala.collection.SeqLike$class.sortWith(SeqLike.scala:575)
        at scala.collection.AbstractSeq.sortWith(Seq.scala:41)
        at scala.tools.nsc.typechecker.Infer$class.scala$tools$nsc$typechecker$Infer$$bestAlternatives(Infer.scala:65)
        at scala.tools.nsc.typechecker.Infer$Inferencer$InferMethodAlternativeTwice$1.bestForExpectedType(Infer.scala:1399)
        at scala.tools.nsc.typechecker.Infer$Inferencer$InferMethodAlternativeTwice$1.tryOnce(Infer.scala:1411)
        at scala.tools.nsc.typechecker.Contexts$Context$TryTwice.apply(Contexts.scala:357)
        at scala.tools.nsc.typechecker.Infer$Inferencer.inferMethodAlternative(Infer.scala:1415)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3227)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)
        at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:3231)
        at scala.tools.nsc.typechecker.Typers$Typer.handleOverloaded$1(Typers.scala:3228)

How would you cope with an error like this?

Thanks for your help,
Matthias

iulian dragos

unread,
Oct 9, 2014, 4:21:12 AM10/9/14
to scala-ide-dev

On Thu, Oct 9, 2014 at 8:46 AM, Matthias Langer <matthia...@codecentric.de> wrote:

Thanks a lot for your help so far. Unfortunately I'm still having trouble with the setup. The process seems to be somewhat fragile, as I'm seeing different results on different systems. I guess that this might be connected to the different nightlies, different JVMs and Maven versions, and of course different states of the GIT repository I'm working with. So I have some general questions fist:

-) Are there known problems with Java8?

I’m running on Java 8

-) Are there known problems with certain Maven versions?

I’m running 3.0.4

-) Are there known problems with certain Eclipse versions?

You should use Eclipse Luna (4.4.x), but Kepler should also work. However, due to source incompatibilities between the two versions, we have different source folders. You should add src-kepler and remove src-luna from source folders in the sdt.core project.

-) What JDK, Maven, Eclipse versions are you using for development?

Regardless of the version, you need the Plugin Development Environment in order to work on Scala IDE (or any Eclipse plugin). the simplest is to download “Eclipse Standard”, which now is called Eclipse IDE for Eclipse Committers, thanks Eclipse guys for making this so much harder and not documenting it!

To make sure you have the right version, open plugin.xml and check that you can edit Extensions, Runtime, etc. using a form-based UI, not plain text. You should also have a Classpath Container called Plug-in Dependencies.


After these general questions, I have some more questions about the problem I'm currently experiencing on particular on a system where I just tried to setup the project: The issue I'm having is that after importing core and debug into Eclipse, I get the error message:

Unable to find a scala library. Please add the scala container or a scala library jar to the build path.

My guess is that the PDE is not installed. Here’s how it works: Plugin dependencies are resolved from the MANIFEST.MF file, using either installed bundles (form the running instance of Eclipse), or projects in the workspace. All they need to have is a valid MANIFEST file, with the same bundle symbolic name. In this case, the Scala library was not resolved correctly, so the classpath is missing an entry. Adding one manually will just hide the original problem.


So I added the scala-library manually, which seemingly worked, but compiling debug I got

!ENTRY org.scala-ide.sdt.core 4 0 2014-10-09 08:36:36.086
!MESSAGE Error in Scala compiler
!STACK 0
java.lang.StackOverflowError

This is a regression in 2.11.3-SNAPSHOT, and was reported a couple of days ago SI-8890.

Let me know if this helps.

iulian

Matthias Langer

unread,
Oct 9, 2014, 7:32:58 AM10/9/14
to scala-...@googlegroups.com
 JDK, Maven, Eclipse versions are you using for development?

Regardless of the version, you need the Plugin Development Environment in order to work on Scala IDE (or any Eclipse plugin). the simplest is to download “Eclipse Standard”, which now is called Eclipse IDE for Eclipse Committers, thanks Eclipse guys for making this so much harder and not documenting it!

To make sure you have the right version, open plugin.xml and check that you can edit Extensions, Runtime, etc. using a form-based UI, not plain text. You should also have a Classpath Container called Plug-in Dependencies.

I'm sorry, I guess this was my fault, as I simply forgot to install the Plugin Development Environment. After fixing my Eclipse installation, importing the core project worked without problems. Running the unit tests for core from within eclipse worked except for two failures (I also get test failures when running build-all.sh also resulted in test failures although I did not check if the correspond to the failures I'm seeing in Eclipse):

java.lang.AssertionError: Second compilation should show one error expected:<List(value a is not a member of test.B)> but was:<ArrayBuffer()>

    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.scalaide.core.sbtbuilder.DeprecationWarningsTests.undoChangeCleansErrorMarkers(DeprecationWarningsTests.scala:135)  


org.junit.ComparisonFailure: expected:<[T1.scala [in traits [in src [in simple-structure-builder]]]
  package traits
  interface T1
    scala.Nothing notImplemented()
    int x
    int x()
    long y
    long y()
    java.lang.Object t
    java.lang.Object t()
    scala.collection.immutable.List xs
    scala.collection.immutable.List<java.lang.Object> xs()
    scala.Nothing m(int, int)
    scala.Nothing n(int, int, int)
    java.lang.Object T
    java.lang.Object U
    java.lang.Object Z
    class Inner
      Inner()
    class InnerWithGenericParams
      scala.collection.immutable.List xs
      InnerWithGenericParams(traits.T1, scala.collection.immutable.List<java.lang.Object>)
C1.scala [in traits [in src [in simple-structure-builder]]]
  package traits
  import scala.annotation.*
  import scala.reflect.BeanProperty
  import org.junit.Test
  class C
    int _x
    traits.C.T _y
    C(int, T)
    C(T)
    int x
    int x()
    int lz
    int lz()
    java.lang.String v
    java.lang.String v()
    void v_$eq(java.lang.String)
    java.lang.Object volVar
    java.lang.Object volVar()
    void volVar_$eq(java.lang.Object)
    java.lang.String CONSTANT
    java.lang.String CONSTANT()
    int beanVal
    int beanVal()
    int getBeanVal()
    int beanVar
    int beanVar()
    void beanVar_$eq(int)
    int getBeanVar()
    void setBeanVar(int)
    boolean nullaryMethod()
    void method()
    void annotatedMethod()
    int curriedMethod(int, int)
    boolean nullaryMethod1()
    void method1()
    void method2()
    int curriedMethod1(int, int)
    class InnerC
      int x
      int x()
      InnerC(traits.C<T>, int)
    java.lang.Object T
    java.lang.Object U
    scala.runtime.Null. map(scala.Function1<scala.collection.immutable.List<java.lang.Object>,U>)
    scala.runtime.Null. takeArray(scala.collection.immutable.List<java.lang.String>[])
    scala.Null takeArray2(byte[][])
    java.lang.Object localClass(int)
      class java.lang.Object
        $anon()
        void run()
    int localMethod(int)
    long localVals(int])> but was:<[C1.scala [in traits [in src [in simple-structure-builder]]]
  package traits
  import scala.annotation.*
  import scala.reflect.BeanProperty
  import org.junit.Test
  class C
    int _x
    traits.C.T _y
    C(int, T)
    C(T)
    int x
    int x()
    int lz
    int lz()
    java.lang.String v
    java.lang.String v()
    void v_$eq(java.lang.String)
    java.lang.Object volVar
    java.lang.Object volVar()
    void volVar_$eq(java.lang.Object)
    java.lang.String CONSTANT
    java.lang.String CONSTANT()
    int beanVal
    int beanVal()
    int getBeanVal()
    int beanVar
    int beanVar()
    void beanVar_$eq(int)
    int getBeanVar()
    void setBeanVar(int)
    boolean nullaryMethod()
    void method()
    void annotatedMethod()
    int curriedMethod(int, int)
    boolean nullaryMethod1()
    void method1()
    void method2()
    int curriedMethod1(int, int)
    class InnerC
      int x
      int x()
      InnerC(traits.C<T>, int)
    java.lang.Object T
    java.lang.Object U
    scala.runtime.Null. map(scala.Function1<scala.collection.immutable.List<java.lang.Object>,U>)
    scala.runtime.Null. takeArray(scala.collection.immutable.List<java.lang.String>[])
    scala.Null takeArray2(byte[][])
    java.lang.Object localClass(int)
      class java.lang.Object
        $anon()
        void run()
    int localMethod(int)
    long localVals(int)
T1.scala [in traits [in src [in simple-structure-builder]]]
  package traits
  interface T1
    scala.Nothing notImplemented()
    int x
    int x()
    long y
    long y()
    java.lang.Object t
    java.lang.Object t()
    scala.collection.immutable.List xs
    scala.collection.immutable.List<java.lang.Object> xs()
    scala.Nothing m(int, int)
    scala.Nothing n(int, int, int)
    java.lang.Object T
    java.lang.Object U
    java.lang.Object Z
    class Inner
      Inner()
    class InnerWithGenericParams
      scala.collection.immutable.List xs
      InnerWithGenericParams(traits.T1, scala.collection.immutable.List<java.lang.Object>])>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at org.scalaide.core.structurebuilder.StructureBuilderTest$$anonfun$testStructure$1.apply$mcV$sp(StructureBuilderTest.scala:131)
    at org.scalaide.core.FlakyTest$.retry(FlakyTest.scala:40)
    at org.scalaide.core.structurebuilder.StructureBuilderTest.testStructure(StructureBuilderTest.scala:125)
  
Since I was also able to run the Scala IDE within Eclipse and import a simple Scala project there, I guess that I'm mostly done with the setup. Of course I'm still somewhat lost in the complexity of the project, but I'll do my best to catch up. Just be prepared for lot's of additional questions ;-).

iulian dragos

unread,
Oct 9, 2014, 8:28:01 AM10/9/14
to scala-ide-dev
What OS are you using? I'm on Mac OS and all tests pass inside Eclipse. Same goes for the Linux people, but I don't know for windows.

Unfortunately, we do have some flaky tests, and sometimes they pass a second time. I'm not sure this is the case here though.

--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

iulian dragos

unread,
Oct 9, 2014, 8:29:53 AM10/9/14
to scala-ide-dev

  
Since I was also able to run the Scala IDE within Eclipse and import a simple Scala project there, I guess that I'm mostly done with the setup. Of course I'm still somewhat lost in the complexity of the project, but I'll do my best to catch up. Just be prepared for lot's of additional questions ;-).

You could also try your hand at working on some of the simpler plugins: scala-worksheet, play2 and scala-search. They can all use some love, and they're much smaller (though they do depend on `core`, so you might need to foray inside the dungeon from time to time).
 

--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-dev/27731e1c-26a9-4b91-a6ca-ba593392d4d4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Matthias Langer

unread,
Oct 10, 2014, 3:26:03 AM10/10/14
to scala-...@googlegroups.com


Am Dienstag, 7. Oktober 2014 16:10:47 UTC+2 schrieb Simon Schäfer:
 
I could need some help with shipping save actions [1] and auto edits
[2]. The largest concern so far is the new API. It was designed to be
easier to use than the Eclipse API but it still needs some cleanups. You
could test if the API works at all for a newcomer by implementing your
own save action or auto edit. Open bugs can be found in [3] and [4] if
you are interested in fixing one of them.

[1]: https://github.com/scala-ide/scala-ide/pull/761
[2]: https://github.com/scala-ide/scala-ide/pull/770
[3]:
https://www.assembla.com/spaces/ae55a-oWSr36hpeJe5avMc/tickets?tickets_report_id=u1200023&tag_id=520813
[4]:
https://www.assembla.com/spaces/ae55a-oWSr36hpeJe5avMc/tickets?tickets_report_id=u1200023&tag_id=471493

Hi Simon, thank you very much, save actions look like a good starting point to me. My plan is to first find out if I can make sense of the API by adding a trivial save action. If this works, I might start fixing minor bugs or implementing simple features.
 

Rafał Krzewski

unread,
Oct 10, 2014, 4:52:21 AM10/10/14
to scala-...@googlegroups.com
For the record, yesterday I've built Scala IDE locally on Linux (master ed1d6d3 merged into platform/luna 3a44c97) and all tests passed.

Cheers,
Rafał

iulian dragos

unread,
Oct 10, 2014, 5:18:32 AM10/10/14
to scala-ide-dev
On Fri, Oct 10, 2014 at 10:52 AM, Rafał Krzewski <rafal.k...@gmail.com> wrote:
For the record, yesterday I've built Scala IDE locally on Linux (master ed1d6d3 merged into platform/luna 3a44c97) and all tests passed.

platform/luna is no longer needed. master can build on both kepler and luna since ad1347a. I guess we should delete the branch. Anyone against that?

iulian

 

For more options, visit https://groups.google.com/d/optout.

Matthias Langer

unread,
Oct 10, 2014, 5:23:36 AM10/10/14
to scala-...@googlegroups.com

Well, implementing a Save Action that adds a comment at the start of the file was easy enough using the links you provided. My first impression of the new API is quite good.. Let's see if I can implement something more useful like #1002277...

Simon Schäfer

unread,
Oct 10, 2014, 5:33:18 AM10/10/14
to scala-...@googlegroups.com
 Glad to hear that it worked for you. #1002277 very likely requires a fix in scala-refactoring, so if you want to work on that you have to get scala-ide/scala-refactoring up and running in your workspace. You should be able to reproduce the failure with a test in ReusingPrinterTest [1].

[1]: https://github.com/scala-ide/scala-refactoring/blob/master/org.scala-refactoring.library/src/test/scala/scala/tools/refactoring/tests/sourcegen/ReusingPrinterTest.scala

Matthias Langer

unread,
Oct 10, 2014, 5:54:33 AM10/10/14
to scala-...@googlegroups.com
I'm seeing no test failures with with 4cce06b on master when running build-all.sh on the command line. In Eclipse however there is still one failure:

Should I look into this in more detail, or just ignore it at the moment?




--
You received this message because you are subscribed to a topic in the Google Groups "Scala IDE Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-ide-dev/fK-nsbtDxas/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-ide-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-dev/eb4c73d6-04c2-48f1-b7bb-d2ceaa5fba24%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Matthias Langer | IT Consultant

codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
tel: +49 (0) 212.23362811 | fax: +49 (0) 212.23362879 | mobil: +49 (0) 163.6681500
www.codecentric.de | blog.codecentric.de | www.meettheexperts.de | www.more4fi.de    

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

Matthias Langer

unread,
Oct 17, 2014, 6:11:51 AM10/17/14
to scala-...@googlegroups.com
Hi Simon, I think this should fix #1002277:
https://github.com/mlangc/scala-refactoring/commit/e820e270dca6a10089ed86758c2eeb40f5d1144f

I'm still not very happy with the code duplication in add_return_type_to_def_with_brace() and add_return_type_to_def() but I'm not sure if removing it is worth the effort.
Reply all
Reply to author
Forward
0 new messages