Test failures on 2.12, but not on 2.11/2.10 – Any changes in handling of boxing?

131 views
Skip to first unread message

Simon Ochsenreither

unread,
Aug 9, 2016, 7:36:55 AM8/9/16
to scala-internals
Hi,

I'm seeing test failures in my library when I compile against 2.12, but not against 2.11/2.10.

The curious thing is that the test failures had a valid reason, and I fixed it. It seems like somehow the fix is "undone" on 2.12.

How to reproduce:

Here is the change that fixed it on 2.11/2.10, but not on 2.12: https://github.com/soc/scala-java-time/commit/f30a74613f86e2950fbccc1a34030369b31bb1a5

(Basically, someone is using java.lang.Long to store nulls. scala.Long would unbox to 0, changing the expected behavior.)

Any ideas?

Thanks!

Simon

Lukas Rytz

unread,
Aug 9, 2016, 7:54:09 AM8/9/16
to scala-i...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-internals+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sébastien Doeraene

unread,
Aug 9, 2016, 11:27:46 AM8/9/16
to scala-internals

There was also a change in the implicit unboxing methods in Predef (PR by @densh IIRC) but I don't have a computer to look it up ATM.

Sébastien

Simon Ochsenreither

unread,
Aug 10, 2016, 7:37:25 PM8/10/16
to scala-internals

Sébastien Doeraene

unread,
Aug 10, 2016, 8:03:22 PM8/10/16
to scala-internals

Yes, that one.

Sébastien


Le 11 août 2016 07:37, "Simon Ochsenreither" <simon.och...@gmail.com> a écrit :
--

Simon Ochsenreither

unread,
Aug 11, 2016, 9:02:17 AM8/11/16
to scala-internals
I'm kind of at loss, how the change could undo the change I did for 2.11, because the change that fixed it on 2.10/2.11 is a valid fix for a bug that crept into the codebase during translation from Java to Scala. How else would I fix the behavior if the fix on 2.10/2.11 stops working on 2.12?

Lukas Rytz

unread,
Aug 11, 2016, 9:09:35 AM8/11/16
to scala-i...@googlegroups.com
I can't offer a guess, but a minimzation would probably help..

On Thu, Aug 11, 2016 at 3:02 PM, Simon Ochsenreither <simon.och...@gmail.com> wrote:
I'm kind of at loss, how the change could undo the change I did for 2.11, because the change that fixed it on 2.10/2.11 is a valid fix for a bug that crept into the codebase during translation from Java to Scala. How else would I fix the behavior if the fix on 2.10/2.11 stops working on 2.12?

--

Simon Ochsenreither

unread,
Aug 11, 2016, 10:03:16 AM8/11/16
to scala-internals
Yes, I'm trying to distill this down, but it's 50.000 lines of code, and it's related to formatting, so that code section touches every other one, because if it doesn't touch it, it won't be able to format it.

Adriaan Moors

unread,
Aug 11, 2016, 8:49:08 PM8/11/16
to scala-internals
Perhaps use git bisect to narrow down the range of scala commits that broke it?

On Thu, Aug 11, 2016 at 7:03 AM Simon Ochsenreither <simon.och...@gmail.com> wrote:
Yes, I'm trying to distill this down, but it's 50.000 lines of code, and it's related to formatting, so that code section touches every other one, because if it doesn't touch it, it won't be able to format it.

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

Simon Ochsenreither

unread,
Aug 13, 2016, 8:19:23 AM8/13/16
to scala-internals

Perhaps use git bisect to narrow down the range of scala commits that broke it?

I'm pretty sure that the boxing commit is the culprit, the issue is figuring out what exactly broke. Because currently I'm just seeing some action-at-the-distance and some symptoms, but no "and this is the place where things go wrong". (And I'm kind of unsure whether there is a place I can pin-point, because the bug in the codebase has been "fixed" on 2.11, it's just that the "fix" is ignored on 2.12. (And if the fix stops working permanently, I'm not sure, how one is supposed to fix these issues in the future at all.)

Adriaan Moors

unread,
Aug 13, 2016, 1:23:08 PM8/13/16
to scala-internals
Good luck -- keep us posted!

On Sat, Aug 13, 2016 at 5:19 AM Simon Ochsenreither <simon.och...@gmail.com> wrote:

Perhaps use git bisect to narrow down the range of scala commits that broke it?

I'm pretty sure that the boxing commit is the culprit, the issue is figuring out what exactly broke. Because currently I'm just seeing some action-at-the-distance and some symptoms, but no "and this is the place where things go wrong". (And I'm kind of unsure whether there is a place I can pin-point, because the bug in the codebase has been "fixed" on 2.11, it's just that the "fix" is ignored on 2.12. (And if the fix stops working permanently, I'm not sure, how one is supposed to fix these issues in the future at all.)

--
Reply all
Reply to author
Forward
0 new messages