Re: [scala-ide-user] Mismatch between compiler results of 2.10-RC1 Scala IDE and Scala compiler

186 views
Skip to first unread message

iulian dragos

unread,
Oct 28, 2012, 5:03:46 PM10/28/12
to scala-i...@googlegroups.com


On Fri, Oct 26, 2012 at 9:05 PM, Peter <empen...@gmail.com> wrote:
I'm experiencing differences regarding compiler errors when compiling the same code base with

Scala 2.10.0-RC1 / SBT
and
Scala IDE 2.1.0 Milestone 2 for Eclipse 3.7 for Scala 2.10.0-RC1 (http://download.scala-ide.org/releases-210/milestone/org.scala-ide.sdt.update-site.zip)

What am I missing?

What are the differences? 



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

Peter

unread,
Oct 29, 2012, 4:42:39 AM10/29/12
to scala-i...@googlegroups.com
Hi Iulian,

while the code base compiles fine in the Scala IDE, compiling it via SBT I get

[error] not enough arguments for method 'findEntry': ...
[error] Unspecified value parameter 'correspond'

How could the cause of the distinct behavior detected? Do you need to reproduce it or can I check some internals before?

iulian dragos

unread,
Oct 29, 2012, 11:24:35 AM10/29/12
to scala-i...@googlegroups.com
It unexpected. Is `findEntry` a method that has default parameters? A reproducible test case would for sure help!

iulian
 

Peter

unread,
Oct 29, 2012, 4:41:50 PM10/29/12
to scala-i...@googlegroups.com
Iulian:


Is `findEntry` a method that has default parameters?

There are two overloaded versions of findEntry. The first is defined in scala.collection.mutable.FlatHashTable, the other in scalax.collection.mutable.ExtHashSet. Default parameters are not involved.
 
A reproducible test case would for sure help!

Please find the code base mentioned at http://subversion.assembla.com/svn/scala-graph/trunk

For compiling with the Scala IDE, you just need to place a project at Core/src without any library dependencies.
For compiling with SBT 0.12.1, first refer to project/readMe.txt and then execute on the SBT console
> project Graph-core
> compile

You'll find 11 significant [error] lines while warnings should be ignored all together.

Thanks, Peter


Peter

unread,
Oct 30, 2012, 3:02:20 AM10/30/12
to scala-i...@googlegroups.com
Sorry, I forgot to mention that, preparing SBT compile, you also need to set scala_2_9 to false in Version.scala.

Peter

unread,
Nov 4, 2012, 12:12:40 PM11/4/12
to scala-i...@googlegroups.com
I can now tell the specific reason for the error reported by the SBT compilation: https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/mI0N5nM7Ifg.

But I still cannot explain the difference between Scala IDE, not detecting any error, and Scala.

Mirco Dotta

unread,
Nov 4, 2012, 12:17:51 PM11/4/12
to scala-i...@googlegroups.com

On Nov 4, 2012, at 6:12 PM, Peter wrote:

> I can now tell the specific reason for the error reported by the SBT compilation: https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/mI0N5nM7Ifg.
>
> But I still cannot explain the difference between Scala IDE, not detecting any error, and Scala.

Maybe a mismatch between the Scala library version used in your Sbt build definition and the one in the IDE (i.e., Scala 2.10.0-RC1).

-- Mirco

Peter

unread,
Nov 4, 2012, 12:44:54 PM11/4/12
to scala-i...@googlegroups.com

Maybe a mismatch between the Scala library version used in your Sbt build definition and the one in the IDE (i.e., Scala 2.10.0-RC1).

I've never set any specific version to the Scala Library either in Eclipse or in SBT. Do I have to? I'm just setting the compiler version.
In SBT, scala-version == scala-binary-version == 2.10.0-RC1

SBT also reports:
[warn] Binary version (2.10) for dependency org.scala-lang#scala-library;2.10.0-RC1
[warn]  in com.assembla.scala-incubator#graph-core_2.10.0-RC1;1.5.2 differs from Scala binary version in project (2.10.0
-RC1).

Peter

unread,
Nov 4, 2012, 12:59:41 PM11/4/12
to scala-i...@googlegroups.com
Mirco, just the other way round: I have a bad reference to the 2.10.0-M7 Scala Library in Eclipse!

Mirco Dotta

unread,
Nov 4, 2012, 1:00:33 PM11/4/12
to scala-i...@googlegroups.com
On Nov 4, 2012, at 6:44 PM, Peter wrote:


Maybe a mismatch between the Scala library version used in your Sbt build definition and the one in the IDE (i.e., Scala 2.10.0-RC1).

I've never set any specific version to the Scala Library either in Eclipse or in SBT. Do I have to? I'm just setting the compiler version.
In SBT, scala-version == scala-binary-version == 2.10.0-RC1

In Sbt, by setting the scala-version, you are effectively setting both the Scala library and compiler version. In Eclipse, the answer depends 
on how you configured your project's classpath: make sure you only have one scala-library.jar, and that its version is indeed 2.10.0-RC1.

Mirco Dotta

unread,
Nov 4, 2012, 1:02:45 PM11/4/12
to scala-i...@googlegroups.com
Great! Then, you did not really update to the latest M2 for Scala 2.10.0-RC1 ;-)

Peter

unread,
Nov 4, 2012, 1:15:17 PM11/4/12
to scala-i...@googlegroups.com
Eclipse Installation Details:
Scala IDE for Eclipse    2.1.0.m2-2_10-201209130850-f6ab297

Plugin from:
http://scala-ide.org/download/milestone.html#scala_ide_21_milestone_2
via zip
http://download.scala-ide.org/releases-210/milestone/org.scala-ide.sdt.update-site.zip
titled "For Scala 2.10.0-RC1"

Is that not correct for RC1?

Mirco Dotta

unread,
Nov 4, 2012, 1:27:31 PM11/4/12
to scala-i...@googlegroups.com
The moment Scala 2.10.0-RC1 we have released an updated M2 bundled with Scala 2.10.0-RC1.

However, the zip file http://download.scala-ide.org/releases-210/milestone/org.scala-ide.sdt.update-site.zip
was NOT updated. That's why you are getting the old Scala library, it's our mistake.

Please, file a ticket on our issue tracker (https://scala-ide-portfolio.assembla.com/spaces/scala-ide/support/tickets)
and, use the following update site to get the Scala IDE M2 with Scala 2.10.0-RC1:

http://download.scala-ide.org/sdk/e37/scala210/dev/site/

Sorry for the trouble that this caused.

-- Mirco
Reply all
Reply to author
Forward
0 new messages