sbt, the interactive build tool
Go to file
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
cache deprecations 2013-02-25 09:24:04 -05:00
compile Fix unstable existential type names bug. 2013-10-29 16:39:50 +01:00
interface Fix unstable existential type names bug. 2013-10-29 16:39:50 +01:00
ivy Better representation of no cross-version suffix in suffix conflict error message. 2013-10-23 09:46:43 -04:00
launch Read https+ftp proxy environment variables into system properties. Fixes #886. 2013-10-08 18:41:13 -04:00
licenses move remaining pieces of sbt subproject to sbt_pending and fix notices 2010-09-21 21:55:50 -04:00
main Fix serialization in Sync. 2013-10-28 15:00:17 -04:00
project Fix unstable existential type names bug. 2013-10-29 16:39:50 +01:00
run Fix NPE in TrapExit due to improper scoping of null check. 2013-10-08 18:41:13 -04:00
sbt Fix unstable existential type names bug. 2013-10-29 16:39:50 +01:00
scripted Recover from failed 'reload' command in the scripted sbt handler. 2013-09-18 10:27:19 -04:00
src Changes for 0.13.1-M1 2013-10-28 08:44:23 -04:00
tasks fix task execution test compilation 2013-06-28 00:01:19 -04:00
testing remove dead code in TestFramework 2013-10-11 18:48:48 -04:00
util Merge remote-tracking branch 'gkossakowski/separate-dependency-phase' into 0.13 2013-10-24 16:57:32 -04:00
.gitattributes Added .gitattributes file. 2013-04-25 00:06:51 +08:00
.gitignore support defining Projects in .sbt files 2012-12-09 20:40:41 -05:00
CONTRIBUTING.md Restore sxr support and fix links to sxr'd sources. Fixes #863. 2013-09-24 11:34:14 -04:00
LICENSE * move Environment classes to util/env module 2010-07-14 19:24:50 -04:00
NOTICE * move Environment classes to util/env module 2010-07-14 19:24:50 -04:00
README.md clean up CONTRIBUTING and README 2013-06-28 19:06:56 -04:00
api.specification Macro def aware recompilation. 2012-03-04 17:35:51 +01:00
scripted.specification New scripted test framework 2009-11-09 09:34:52 -05:00

README.md

sbt 0.13

This is the 0.13.x series of sbt.

  • Setup: Describes getting started with the latest binary release.
  • See CONTRIBUTING for how to build from source, open an issue, fix or add documentation, or submit a pull request.
  • FAQ: Explains how to get help and more.
  • Google Code: hosts sbt 0.7.7 and earlier versions