Seal collection classes that were annotated with deprecatedInheritance in 2.11.0#5021
Conversation
|
I'm all for it, but when I started on my (long) list of dealing with deprecated stuff and cleanups, all of them were vetoed because of the special status for 2.12. Can someone clarify whether that position has changed recently? |
it depends on the specifics. if you can share that list, I could look it over. |
Not well, not well at all. Ironically enough we're depending on this functionality in a library that you wrote. Was under the impression (from discussion several months ago) that it was too late to remove tuple inheritance for 2.12 and planned accordingly. |
|
@godenji You forked an old version of Slick or ScalaQuery and made it work on 2.12? Slick hasn't required Tuple subclasses anymore for a long time. |
|
@szeiger forked ScalaQuery, have built against 2.9, 2.10, and 2.11, and intend to do the same for 2.12. This change will break it. In the scheme of things this is a total adhoc last minute change (really, 2.12 RC is 3 months away). |
|
Thanks for the feedback, @godenji! This is exactly why we have PRs like this. Our intention is certainly not to gratuitously break code in 2.12, but to set the scene for 2.13 to simplify collections and other parts of the library. We won't go ahead with the changes that negatively affect the community, and certainly not if they hamper cross-building between 2.11/2.12. For the record, I don't think the change is ad-hoc or last-minute (since it was announced using deprecation in 2.11). |
|
on making tuples final, I think should this probably wait for 2.13, actually? reassigning to M5 since M4 is getting very close and to give time for discussion. |
|
@adriaanm sure, I understand the rationale for the change. I assume that removing tuple inheritance in 2.13 won't hinder existing 2.12 optimizations (i.e. 2.13 collections overhaul is where actual performance improvement from the removal will be realized). |
|
@SethTisue it seems there are already some quite juicy speedups on the horizon 🎉 |
|
What about the collection classes? deprecatedInheritance was added to them in 2.11, same as the tuples, so they're all in the same boat when in comes to cross-compiling between 2.11 and 2.12. |
no; we optimize allocations of tuples, in which case we know that the specific tuple type (not a subtype) is instantiated. |
yes, good point. but I haven't heard — well, maybe I have, but this PR doesn't contain or link to it — the case for the prosecution — why is it good to do this in 2.12 and not just wait for 2.13? I'm aware of why we want |
@godenji link? |
@SethTisue sure, right here
and
|
5445d73 to
54d6167
Compare
|
Removed tuple changes. |
|
They were all annotated with `@deprecatedInheritance` in 2.11.0. Some deprecated classes are moved to new source files in order to seal the parent class. The package-private class `DoublingUnrolledBuffer` is moved from `scala.collection.parallel.mutable` to `scala.collection.mutable` in order to seal `UnrolledBuffer`.
54d6167 to
cb1a452
Compare
|
Updated the failing test to extend mutable collections instead. |
|
LGTM |
|
FTR, I finally got time to resolve TupleN issue in ScalaQuery. Here's the Gitter reference. @retronym says in 2.12 M5 can revisit issue for making TupleN final. Apologies for the blocker, hopefully not too late... |
This includes collection classes and tuples. Also add a
genprodcommand to generate the latter from the sbt build. See the individual commits for details.