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

[nomaster] SI-7064 Reflection: forward compat for 2.10.1 #2068

Merged
merged 9 commits into from Feb 7, 2013

Conversation

xeno-by
Copy link
Member

@xeno-by xeno-by commented Feb 4, 2013

No description provided.

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.
@xeno-by
Copy link
Member Author

xeno-by commented Feb 4, 2013

review @paulp @retronym

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.
@xeno-by
Copy link
Member Author

xeno-by commented Feb 5, 2013

Unfortunately pendingSuperCall will have to be disabled. It's probably possible to support both old-style and new-style encodings of primary constructor bodies in 2.10.1. But it'll be definitely impossible to support the new-style encoding in 2.10.0.

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.

This reverts commit 838cbe6.

Conflicts:
	src/reflect/scala/reflect/api/Trees.scala
@xeno-by
Copy link
Member Author

xeno-by commented Feb 5, 2013

Unfortunately the changes were much vaster than I remembered. I was forced to revert them altogether.

@retronym
Copy link
Member

retronym commented Feb 5, 2013

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.
@adriaanm
Copy link
Contributor

adriaanm commented Feb 6, 2013

PLS REBUILD/pr-checkin-per-commit@1093ce0b7c0d5e78dbd4cacc5c90cb264298afb0

@scala-jenkins
Copy link

(kitty-note-to-self: ignore 13201720)
🐱 Roger! Rebuilding pr-checkin-per-commit for 1093ce0. 🚨

@adriaanm
Copy link
Contributor

adriaanm commented Feb 7, 2013

BUILDLOG?

@xeno-by
Copy link
Member Author

xeno-by commented Feb 7, 2013

PLS SYNCH

@scala-jenkins
Copy link

(kitty-note-to-self: ignore 13219523)
pr-rangepos-per-commit:

pr-checkin-per-commit:

@scala-jenkins
Copy link

(kitty-note-to-self: ignore 13226666)
🐱 Synchronaising! 🙏

adriaanm added a commit that referenced this pull request Feb 7, 2013
[nomaster] SI-7064 Reflection: forward compat for 2.10.1
@adriaanm adriaanm merged commit 33608ff into scala:2.10.x Feb 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants