summaryrefslogtreecommitdiff
path: root/bincompat-forward.whitelist.conf
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2014-07-09 14:43:12 +0200
committerPhilipp Haller <hallerp@gmail.com>2014-07-15 14:03:49 +0200
commit5762110d0dc2cb492e34d5595c473aa0f9ca786a (patch)
tree974c218830fcab44f386c11be28a82b0ec3acc71 /bincompat-forward.whitelist.conf
parent87bba9418ca891c436f386207b3b9e70b4a64c71 (diff)
downloadscala-5762110d0dc2cb492e34d5595c473aa0f9ca786a.tar.gz
scala-5762110d0dc2cb492e34d5595c473aa0f9ca786a.tar.bz2
scala-5762110d0dc2cb492e34d5595c473aa0f9ca786a.zip
SI-5919 TypeTags and Exprs should be serializable
- Make TypeCreator and TreeCreator extend Serializable. - When replacing a SerializedTypeTag with a TypeTag or WeakTypeTag, do not use scala.reflect.runtime.universe.rootMirror, since it is unlikely to find user classes; instead, create a runtime mirror using the context ClassLoader of the current thread. Use the same logic for SerializedExpr. - Remove writeObject/readObject methods from SerializedTypeTag and SerializedExpr since they are unused. - Add @throws annotation on writeReplace and readResolve methods. - Handle SecurityException if the current thread cannot access the context ClassLoader. - To make type tags of primitive value classes serializable, make PredefTypeCreator a top-level class. Otherwise, it would retain a reference to the enclosing Universe, rendering the TypeCreator non-serializable. Binary compatibility: - Keep nested PredefTypeCreator class to avoid backward binary incompatible change. - Keep `var` modifiers on the class parameters of SerializedTypeTag for backward binary compatibility. - Adds filter rules to forward binary compatibility whitelist: - `TypeCreator`, `PredefTypeCreator`, and `TreeCreator` must now extend from `Serializable`. - Must have new class `scala.reflect.api.PredefTypeCreator` to avoid problematic outer reference.
Diffstat (limited to 'bincompat-forward.whitelist.conf')
-rw-r--r--bincompat-forward.whitelist.conf17
1 files changed, 17 insertions, 0 deletions
diff --git a/bincompat-forward.whitelist.conf b/bincompat-forward.whitelist.conf
index 30dac79974..0b90cf4c8b 100644
--- a/bincompat-forward.whitelist.conf
+++ b/bincompat-forward.whitelist.conf
@@ -254,6 +254,23 @@ filter {
{
matchName="scala.reflect.runtime.JavaUniverse.PerRunReporting"
problemName=MissingMethodProblem
+ },
+ // see SI-5919
+ {
+ matchName="scala.reflect.api.TypeTags$PredefTypeCreator"
+ problemName=MissingTypesProblem
+ },
+ {
+ matchName="scala.reflect.api.TreeCreator"
+ problemName=MissingTypesProblem
+ },
+ {
+ matchName="scala.reflect.api.TypeCreator"
+ problemName=MissingTypesProblem
+ },
+ {
+ matchName="scala.reflect.api.PredefTypeCreator"
+ problemName=MissingClassProblem
}
]
}