-
Notifications
You must be signed in to change notification settings - Fork 1.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
posTwice
testNonCyclic
fails if dotc.CompilationUnit
does not import Types.Type
#3383
Labels
Comments
nicolasstucki
added a commit
that referenced
this issue
Jan 3, 2018
Fix #3383: Don't fail on unreported errors
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jan 8, 2018
#3778 showed that this issue is not completely fixed. Now |
To consider this issue as fixed we should include 354e2eb. |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 17, 2018
smarter
added a commit
to smarter/dotty
that referenced
this issue
Feb 2, 2019
Problem reintroduced after last commit.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 3, 2019
To avoid deadlocks when combining objects, lambdas and multi-threading, lambdas in objects are compiled to instance methods of the module class instead of static methods (see tests/run/deadlock.scala and scala/scala-dev#195 for details). This has worked well for us so far but this is problematic for serialization: serializing a lambda requires serializing all the values it captures, if this lambda is in an object, this means serializing the enclosing object, which fails if the object does not extend Serializable. Because serializing objects is basically free since scala#5775, it seems like the simplest solution is to simply make all objects Serializable, this certainly seems preferable to deadlocks. For some reason, this commit causes the issue described in scala#3383 to reappear, we add a workaround for that in Trees.scala.
smarter
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 3, 2019
To avoid deadlocks when combining objects, lambdas and multi-threading, lambdas in objects are compiled to instance methods of the module class instead of static methods (see tests/run/deadlock.scala and scala/scala-dev#195 for details). This has worked well for us so far but this is problematic for serialization: serializing a lambda requires serializing all the values it captures, if this lambda is in an object, this means serializing the enclosing object, which fails if the object does not extend Serializable. Because serializing objects is basically free since scala#5775, it seems like the simplest solution is to simply make all objects Serializable, this certainly seems preferable to deadlocks. For some reason, this commit causes the issue described in scala#3383 to reappear, we add a workaround for that in Trees.scala.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If we remove the unused import
import dotty.tools.dotc.core.Types.Type
indotty.tools.dotc.CompilationUnit
thetestNonCyclic
fails inposTwice
.Note that the error manifests itself in another class.
The text was updated successfully, but these errors were encountered: