sbt/project
Grzegorz Kossakowski a37d8d4770 Fix unstable existential type names bug.
Fix the problem with unstable names synthesized for existential
types (declared with underscore syntax) by renaming type variables
to a scheme that is guaranteed to be stable no matter where given
the existential type appears.

The sheme we use are De Bruijn-like indices that capture both position
of type variable declarion within single existential type and nesting
level of nested existential type. This way we properly support nested
existential types by avoiding name clashes.

In general, we can perform renamings like that because type variables
declared in existential types are scoped to those types so the renaming
operation is local.

There's a specs2 unit test covering instability of existential types.
The test is included in compiler-interface project and the build
definition has been modified to enable building and executing tests
in compiler-interface project. Some dependencies has been modified:

  * compiler-interface project depends on api project for testing
    (test makes us of SameAPI)
  * dependency on junit has been introduced because it's needed
    for `@RunWith` annotation which declares that specs2 unit
    test should be ran with JUnitRunner

SameAPI has been modified to expose a method that allows us to
compare two definitions.

This commit also adds `ScalaCompilerForUnitTesting` class that allows
to compile a piece of Scala code and inspect information recorded
callbacks defined in  `AnalysisCallback` interface. That class uses
existing ConsoleLogger for logging. I considered doing the same for
ConsoleReporter. There's LoggingReporter defined which would fit our
usecase but it's defined in compile subproject that compiler-interface
doesn't depend on so we roll our own.

ScalaCompilerForUnit testing uses TestCallback from compiler-interface
subproject for recording information passed to callbacks. In order
to be able to access TestCallback from compiler-interface
subproject I had to tweak dependencies between interface and
compiler-interface so test classes from the former are visible in the
latter. I also modified the TestCallback itself to accumulate apis in
a HashMap instead of a buffer of tuples for easier lookup.

An integration test has been added which tests scenario
mentioned in #823.

This commit fixes #823.
2013-10-29 16:39:50 +01:00
..
Docs.scala Docs: sitemap generator, basic robots.txt. Fixes #916. 2013-10-17 15:00:48 -04:00
Proguard.scala Use sbt 0.13.0 to build the 0.13 branch. 2013-09-10 08:30:00 -04:00
Release.scala Use sbt 0.13.0 to build the 0.13 branch. 2013-09-10 08:30:00 -04:00
Sbt.scala Fix unstable existential type names bug. 2013-10-29 16:39:50 +01:00
SiteMap.scala Docs: sitemap generator, basic robots.txt. Fixes #916. 2013-10-17 15:00:48 -04:00
Status.scala stamp-version should fail if current version is a release 2013-06-03 10:36:21 -04:00
Sxr.scala Restore sxr support and fix links to sxr'd sources. Fixes #863. 2013-09-24 11:34:14 -04:00
Transform.scala auto-generate conscript launchconfigs from launcher boot.properties 2013-06-28 00:01:19 -04:00
Util.scala Fix unstable existential type names bug. 2013-10-29 16:39:50 +01:00
build.properties Use sbt 0.13.0 to build the 0.13 branch. 2013-09-10 08:30:00 -04:00
p.sbt Use sbt 0.13.0 to build the 0.13 branch. 2013-09-10 08:30:00 -04:00