Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for SI-6600, regression with ScalaNumber. #1562

Merged
merged 1 commit into from
Nov 3, 2012
Merged

Fix for SI-6600, regression with ScalaNumber. #1562

merged 1 commit into from
Nov 3, 2012

Conversation

paulp
Copy link
Contributor

@paulp paulp commented Nov 2, 2012

Not much in the end; I divided ScalaNumericConversions
into two traits such that the ScalaNumericAnyConversions can
be used in value classes, and ScalaNumericConversions can
override methods in ScalaNumber (since one trait cannot do
both those things.)

The fact that ScalaNumber is privileged for equality but a) extends
java.lang.Number and therefore b) cannot be a value class is something
we will want to revisit real soon.

Not much in the end; I divided ScalaNumericConversions
into two traits such that the ScalaNumericAnyConversions can
be used in value classes, and ScalaNumericConversions can
override methods in ScalaNumber (since one trait cannot do
both those things.)

The fact that ScalaNumber is privileged for equality but a) extends
java.lang.Number and therefore b) cannot be a value class is something
we will want to revisit real soon.
@paulp
Copy link
Contributor Author

paulp commented Nov 2, 2012

Review by @jsuereth

@scala-jenkins
Copy link

jenkins job pr-scala-testsuite-linux-opt: Success - https://scala-webapps.epfl.ch/jenkins/job/pr-scala-testsuite-linux-opt/1538/

@scala-jenkins
Copy link

Started jenkins job pr-rangepos at https://scala-webapps.epfl.ch/jenkins/job/pr-rangepos/830/

@scala-jenkins
Copy link

jenkins job pr-rangepos: Success - https://scala-webapps.epfl.ch/jenkins/job/pr-rangepos/830/

@jsuereth
Copy link
Contributor

jsuereth commented Nov 3, 2012

Lgtm and absolutely correct on revisiting in the future.

jsuereth added a commit that referenced this pull request Nov 3, 2012
Fix for SI-6600, regression with ScalaNumber.
@jsuereth jsuereth merged commit 0d90320 into scala:2.10.0-wip Nov 3, 2012
@baloo
Copy link

baloo commented Nov 16, 2012

This commit actually breaks compatibility between anyversion << 2.10-rc2 and 2.10-rc2. People may see errors like:

java.lang.NoClassDefFoundError: scala/math/ScalaNumericAnyConversions

while loading libs in rc2 in rc1 code.

This dependency on ScalaNumericAnyConversions is required as long as you use RichLong, RichInt, ... (see all subclasses of ScalaNumericAnyConversions) which may appear easily as they are implicits converting to them in Predef.

(I'm putting a comment so people may find answer on google.)

@paulp
Copy link
Contributor Author

paulp commented Nov 16, 2012

I imagine I'll have to repeat this a lot, but nobody should ever have expected binary compatibility between milestone and rc revisions of scala and the final release. We couldn't maintain it if we wanted to, not and actually fix things, which is kind of the point of releases before the final release. I'm sorry that sbt has a different idea about how things work.

@baloo
Copy link

baloo commented Nov 16, 2012

Yes, it's just i've spent 6 hours debugging it, to finally find my lib was compiled against rc2 while i was using rc1 in my main app. As said, it was more to put this info in google.

@paulp
Copy link
Contributor Author

paulp commented Nov 16, 2012

Rest assured I sympathize wholeheartedly. https://groups.google.com/d/msg/simple-build-tool/d_Kd6H_QMmM/4ixXdxIUCvMJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants