-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Replace Cloneable/Serializable traits with type aliases #6729
Conversation
de9ca64
to
ed2ab05
Compare
This PR doesn't actually compile currently, I get: [debug] /home/smarter/opt/scala/build/quick/classes/reflect:/home/smarter/opt/scala/build/quick/classes/library
scala.reflect.internal.MissingRequirementError: class scala.Serializable not found.
at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
at scala.reflect.internal.Mirrors$RootsBase.ensureClassSymbol(Mirrors.scala:96)
at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:101)
at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:104)
at scala.reflect.internal.Mirrors$RootsBase.requiredClass(Mirrors.scala:107)
at scala.reflect.internal.Definitions$DefinitionsClass.SerializableClass$lzycompute(Definitions.scala:375)
at scala.reflect.internal.Definitions$DefinitionsClass.SerializableClass(Definitions.scala:375)
at scala.reflect.internal.Definitions$DefinitionsClass.isPossibleSyntheticParent$lzycompute(Definitions.scala:1378)
at scala.reflect.internal.Definitions$DefinitionsClass.isPossibleSyntheticParent(Definitions.scala:1378) This also happened at some point in #5288 but was apparently resolved: #5288 (comment). Assuming it actually worked then I don't see why it's failing now. Is it possible that the resolving rules have changed such that |
Opened #6730 to try to solve the bootstrapping conundrum. |
In the future (scala#6729) scala.Serializable and scala.Cloneable will be type aliases. To be able to bootstrap this change, we need a STARR that does not crash when this change is made.
57fef38
to
d65ecca
Compare
I think we should merge #6730 and do the change here after M5. Why doesn't this PR remove the Serializable / Cloneable traits? |
java.io.Serializable. To be able to bootstrap this change, we need a STARR that does not crash when this change is made.
d65ecca
to
a846fa4
Compare
Done. This required tweaking #6730 more. |
a846fa4
to
8b34b6c
Compare
Looks good! Let's reopen this after releasing M5. I marked scala/bug#9080 as blocker and assigned it to RC1 to make sure we don't forget. |
8b34b6c
to
39d5c16
Compare
Fixes scala/bug#9080. This commit is adapted from scala#5288 and is thus: Co-authored-by: Simon Ochsenreither <simon@ochsenreither.de>
39d5c16
to
82fd591
Compare
Reopened and rebased now that M5 is out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Somewhat to my surprise, git bisect is blaming this PR for shapeless's current brokeness in the community build: milessabin/shapeless#857. Reverting 82fd591 confirms it. I'll try and work out what's going on. |
It appears that the problem is that an intersection previously inferred as I can't see any obvious way of tweaking the test which will cross build before and after this PR. It's not a huge deal in this case, and I've commented out the test without any real loss, but it suggests that this change might cause bigger problems elsewhere in the community build. |
thanks, I'll keep an eye out for it. |
Fixes scala/bug#9080.
This commit is adapted from #5288 and is thus:
Co-authored-by: Simon Ochsenreither simon@ochsenreither.de