-
Notifications
You must be signed in to change notification settings - Fork 308
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
Issue/remove continuations plugin support #617
Issue/remove continuations plugin support #617
Conversation
Test FAILed. |
Test FAILed. |
Thanks, @dotta! |
Test PASSed. |
Test PASSed. |
@hseeberger This PR may be of interest for sbt-eclipse, as we are changing the way we handle the scalac |
val source = scalaCompilationUnit("cps/CPS.scala") | ||
openAndWaitUntilTypechecked(source) | ||
assertTrue(Option(source.getProblems).toList.nonEmpty) | ||
} | ||
|
||
@Test | ||
def failingToBuildSourceThatRequiresContinuationPlugin() { | ||
def failingToBuildSourceThatRequiresContinuationPlugin() = runIfInstalledScalaVersionGreaterOrEquals(SCALA_2_11_0) { |
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.
I wonder if we need this test. It looks to me we are simply testing scalac
behaviour. Is there anything on our side that's involved here, other than the ability to build an existing project?
Great to see all this code going away! One of the dark corners of the IDE is now a little brighter! |
Pushed up `libraryEntries` method so that it can be used by the two subclasses of `ScalaClasspathContainerInitializer`
Actually, there is some more clean-up I can do in the test. Hold your thumb (up) a little longer ;-) |
Test PASSed. |
LGTM |
Test PASSed. |
The Scala IDE used to package the continuations plug-in to match the Scala distribution. While this conveniency was appreciated by the few using continuations in their projects, it imposed a technical debt on the Scala IDE codebase (have a look at how the compiler `Settings` used to be instantiated). Recently, the continuations plug-in has been refactored and splitted into two separate JARs (a compiler plug-in, and a library). After this modularization, the Scala IDE codebase could no longer be compiled inside Eclipse because the continuations library isn't included in the project's classpath. Of course, we could implement a workaround to restore the functionality, but it just doesn't seem worth the time, considering the Scala Team has deprecated the continuations plug-in and will effectively drop supporting it the moment 2.12 is released. Hence, the decision of dropping the out-of-the-box support in the Scala IDE. From now on, if you want to use continutions in a project, you will have to provide the location of the continuations JAR via the -Xplugins setting. Finally, a couple of tests exercicing the behavior of both the presentation compiler and the build compiler when compiling a sourcefile that requires the continuations plug-in are now executed only for Scala 2.11 or later. This is needed because the continuations.jar is no longer loaded when starting the compiler inside Eclipse, and that turns out to affect semantic of programs using continuations in Scala 2.10, because the compiler does no longer report an error if a source file (requiring continuations) is compiled without passing the flag to enable the plugin. Why? Because up until Scala 2.10 the compilation error is reported by the continuations.jar (!!). Of course, that error cannot be reported if the continuations.jar isn't available anymore (which is the whole point of this commit). The behavior with Scala 2.11 is different because the continuations library has been moved out of the scala library (see scala/scala@858a5d5), and hence a compilation error is reported whenever a source is compiled without the continuations library in the classpath. That explains why the tests are now only executed on 2.11+. This commit undos all changes related to supporting continuations made by @adriaanm in scala-ide#604 Fix #1002012 Fix #1002011
@dragos Thanks! I've squashed the commits and will merge this PR the moment I get a green status from the buildbot. |
Test PASSed. |
…support Issue/remove continuations plugin support
Removed special support for Scala continuations
The Scala IDE used to package the continuations plug-in to match the Scala
distribution. While this conveniency was appreciated by the few using
continuations in their projects, it imposed a technical debt on the Scala IDE
codebase (have a look at how the compiler
Settings
used to be instantiated).Recently, the continuations plug-in has been refactored and splitted into two
separate JARs (a compiler plug-in, and a library). After this modularization,
the Scala IDE codebase could no longer be compiled inside Eclipse because the
continuations library isn't included in the project's classpath. Of course, we
could implement a workaround to restore the functionality, but it just doesn't
seem worth the time, considering the Scala Team has deprecated the
continuations plug-in and will effectively drop supporting it the moment 2.12
is released. Hence, the decision of dropping the out-of-the-box support in the
Scala IDE.
From now on, if you want to use continutions in a project, you will have to
provide the location of the continuations JAR via the -Xplugins setting.
Finally, a couple of tests exercicing the behavior of both the presentation
compiler and the build compiler when compiling a sourcefile that requires the
continuations plug-in are now executed only for Scala 2.11 or later. This is
needed because the continuations.jar is no longer loaded when starting the
compiler inside Eclipse, and that turns out to affect semantic of programs
using continuations in Scala 2.10, because the compiler does no longer report
an error if a source file (requiring continuations) is compiled without passing
the flag to enable the plugin. Why? Because up until Scala 2.10 the compilation
error is reported by the continuations.jar (!!). Of course, that error cannot
be reported if the continuations.jar isn't available anymore (which is the
whole point of this commit). The behavior with Scala 2.11 is different because
the continuations library has been moved out of the scala library (see
scala/scala@858a5d5),
and hence a compilation error is reported whenever a source is compiled without
the continuations library in the classpath. That explains why the tests are now
only executed on 2.11+.
This commit undos all changes related to supporting continuations made by
@adriaanm in #604
Fix #1002012
Fix #1002011