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
[nomaster] SI-7064 Reflection: forward compat for 2.10.1 #2068
Conversation
NonemptyAttachments in macro API used to be Attachments$NonemptyAttachments. However it's private, so noone outside scala.reflect.macros can access it, making it ineligible for the incompatibility criterion.
This forward compatibility fix is very easy. Have a new method in 2.10.1? Don't expose it in the public API, and you won't have any problems.
That method was unnecessary in the first place, because we already had emptyValDef in scala.reflect.api.Trees: https://github.com/scala/scala/blob/v2.10.0/src/reflect/scala/reflect/api/Trees.scala#L2367. That's a rudiment from the times when we were unsure what to put into scala.reflect.base and what goes into scala.reflect.api. Unfortunately, it's not just a harmless extraneous method. Reifier v2.10.0 emits `u.build.emptyValDef` when it needs to reify `emptyValDef`. Therefore we need to restore it to be forward compatible. However we don't need to rollback the changes to the reifier v2.10.1, which now simply calls `u.emptyValDef`, because, as mentioned above, that `emptyValDef` was already there in v2.10.0.
Unfortunately I don't think a revert is necessary - a simple boolean condition set to false should do. I think this way we'll have less problems merging later on. |
Unfortunately the changes were much vaster than I remembered. I was forced to revert them altogether. |
LGTM |
This reverts commit 0ebf72b. Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/Trees.scala
This reverts commit 40063b0. Conflicts: src/compiler/scala/tools/nsc/ast/parser/Parsers.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala
Makes sure that the compiler understands the 2.10.0 format of super constructor calls after the recent revert from the typemacro-compatible format.
PLS REBUILD/pr-checkin-per-commit@1093ce0b7c0d5e78dbd4cacc5c90cb264298afb0 |
(kitty-note-to-self: ignore 13201720) |
BUILDLOG? |
PLS SYNCH |
(kitty-note-to-self: ignore 13219523)
pr-checkin-per-commit:
|
(kitty-note-to-self: ignore 13226666) |
[nomaster] SI-7064 Reflection: forward compat for 2.10.1
No description provided.