Commit Graph

128 Commits

Author SHA1 Message Date
Mark Harrah 4dc75343ae Record and persist public inheritance dependencies.
Includes placeholders for adding public inherited dependencies for Java classes.
2013-04-26 22:35:27 -04:00
Mark Harrah c355bef200 Track public inherited dependencies.
There is a public inherited dependency on each (normalized) base
class of a public template (class, module, trait, structural type).
2013-04-26 22:35:27 -04:00
Mark Harrah 0e1f211fe5 move to compiler's built-in moduleSuffix method 2013-04-26 18:52:16 -04:00
Grzegorz Kossakowski 3ba9348740 Do not normalize types in the api extraction phase.
In summary this commit:

  * drops type normalization in api phase but keeps dealiasing
  * fixes #736 and marks corresponding test as passing

I discussed type normalization with @adriaanm and according to him
sbt shouldn't call that method. The purpose of this method to
convert to a form that subtyping algorithm expects. Sbt doesn't need
to call it and it's fairly expensive in some cases.

Dropping type normalization also fixes #726 by not running into
stale cache in Scala compiler problem described in SI-7361.
2013-04-27 00:31:31 +02:00
Grzegorz Kossakowski fbe4dedd11 Remove trailing whitespace in API.scala 2013-04-27 00:31:31 +02:00
Mark Harrah bef8ce05b9 Properly track 'abstract override' modifier. Ref #726. 2013-04-15 14:12:15 -04:00
Mark Harrah 6def08e029 remove resident compiler code
The infrastructure for resident compilation still exists,
but the actual scalac-side code that was backported is removed.
Future work on using a resident scalac will use that invalidation
code directly from scalac anyway.
2013-04-09 20:13:06 -04:00
Mark Harrah 008c2928b6 note that mixing RangePositions into Global isn't necessary in 2.11 2013-03-13 12:40:03 -04:00
Mark Harrah f2d29d8678 Export approximate command lines executed for 'doc', 'compile', and 'console' 2013-02-28 17:59:38 -05:00
Jason Zaugg c597b48eda Stop using Predef.error
We'd like to remove this from 2.11.0.

This patch should be backported to 0.12.3.
2013-01-28 22:29:48 +01:00
Mark Harrah 070a87dda4 Call non-deprecated isRawType instead of isRaw 2013-01-16 10:26:32 -05:00
Grzegorz Kossakowski 4c1c31e190 Fix for dependency on class file corresponding to a package. (#620)
While trying to determine binary dependencies sbt lookups class files
corresponding to symbols. It tried to do that for packages and most of the
time would fail because packages don't have corresponding class file
generated. However, in case of case insensitive file system, combined
with special nesting structure you could get spurious dependency.
See added test case for an example of such structure.

The remedy is to never even try to locate class files corresponding to
packages.

Fixes #620.
2012-12-10 13:53:52 -05:00
Grzegorz Kossakowski ef39aeb9c1 Follow source layout convention supported by Eclipse.
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Adriaan Moors f7be122eb4 Run apiExtractor after pickler (configurable)
Extract the api after picklers, since that way we see the same symbol
information/structure irrespective of whether we were typechecking
from source / unpickling previously compiled classes.

Previously, the apiExtractor phase ran after typer.

Since this fix is hard to verify with a test (it's based on the
conceptual argument above, and anecdotal evidence of incremental
compilation of a big codebase), we're providing a way to restore the
old behaviour: run sbt with -Dsbt.api.phase=typer.

This fixes #609.
2012-12-06 19:35:51 -05:00
Adriaan Moors cb0e723923 Fix #610: represent refinement typerefs stably
goal:

a representation of a type reference to a refinement class that's stable
across compilation runs (and thus insensitive to typing from source or
unpickling from bytecode)

problem:

the current representation, which corresponds to the owner chain of the
refinement:

  1. is affected by pickling, so typing from source or using unpickled
  symbols give different results (because the unpickler "localizes"
  owners -- this could be fixed in the compiler in the long term)

  2. can't distinguish multiple refinements in the same owner (this is
  a limitation of SBT's internal representation and cannot be fixed in
  the compiler)

solution:

expand the reference to the corresponding refinement type: doing that
recursively may not terminate, but we can deal with that by
approximating recursive references (all we care about is being sound for
recompilation: recompile iff a dependency changes, and this will happen
as long as we have one unrolling of the reference to the refinement)
2012-12-06 19:11:12 -05:00
Lex Spoon b7250bb528 Fix -Yrangepos. Unlike other settings, it requires that a mixin be added to Global. 2012-12-03 20:34:11 -05:00
Mark Harrah d6072275aa replace Symbol.nameString calls with simpleName(Symbol). Fixes #577.
nameString is only for printing and has different behavior when scalac is
given -uniqid.
2012-10-15 12:42:27 -04:00
Mark Harrah 18a03f0e25 API extraction: handle any type that is annotated, not just the spec'd simple type. Fixes #559. 2012-10-05 09:06:35 -04:00
Mark Harrah 42042a9d85 2.8.1 compatibility for compiler interface 2012-08-27 08:33:33 -04:00
Eugene Vigdorchik 1b814ae8b1 Extend reporter to be used by the IDE. 2012-07-24 15:35:06 -04:00
Eugene Vigdorchik b5a29987e6 Changes required to use sbt as-is from Scala-IDE. 2012-07-13 14:33:26 -04:00
Mark Harrah 0de4444665 sync resident compiler code 2012-06-18 08:18:39 -04:00
Mark Harrah f53d20a7a3 disable resident-compiler related code paths when it isn't being used. fixes #486.
The underlying issue with the resident compiler needs fixing, however.
2012-06-16 23:40:52 -04:00
Mark Harrah 919ac33c1a compiler interface compatibility hardening 2012-06-10 23:06:35 -04:00
Mark Harrah b7df87e2d8 compiler interface source compatibility with Scala 2.8.1/0 2012-06-02 19:03:57 -04:00
Mark Harrah 4bc993e0ba Revert "remove unneeded unlinking in compiler interface"
Unlinking is actually needed.

This reverts commit 1581d1b7e1.
2012-06-02 19:03:57 -04:00
Mark Harrah 1581d1b7e1 remove unneeded unlinking in compiler interface 2012-05-30 07:41:02 -04:00
Mark Harrah 2db0101eb8 resident compiler that passes all tests
core logic from odersky/scala/topic/inkling
2012-05-30 07:13:15 -04:00
Mark Harrah 63895a3d77 source compatibility with 2.8.1, where resident mode can't be supported 2012-05-19 18:20:20 -04:00
Mark Harrah 50ddd485af add a missing 'lazy' 2012-05-13 22:38:00 -04:00
Mark Harrah 208b46fd10 resident mode: package objects 2012-05-13 21:31:40 -04:00
Mark Harrah 864580aae1 approximate type parameters and references by name
not as accurate, but simpler.
2012-05-12 23:12:29 -04:00
Mark Harrah 00d0918714 workaround separate compilation and raw types 2012-05-12 23:12:29 -04:00
Mark Harrah 99a04466f1 move to revised warning interface in the compiler 2012-05-06 14:15:03 -04:00
Mark Harrah e537cbc474 second part of fix for excessive recompilations 2012-04-30 20:34:48 -04:00
Mark Harrah 5c8f212cf3 convert stray println to debug logging statement 2012-04-28 20:17:43 -04:00
Mark Harrah 408d11557d handle Java sources not compiled in Mixed configuration 2012-04-28 18:58:52 -04:00
Mark Harrah 6769c94208 basis for a resident compiler
unstable, but can be tested with -Dsbt.resident.limit=n
 n is the maximum Globals kept around
2012-04-28 18:58:52 -04:00
Mark Harrah 1cbb7ce93c print-warnings task for Scala 2.10+ to avoid needing to rerun 'compile' to see deprecation/unchecked warnings 2012-03-17 19:31:55 -04:00
Jason Zaugg a1cc62a598 Avoid copy-paste of Flags.MACRO with source-compatibility trickery. 2012-03-04 19:07:33 +01:00
Jason Zaugg 067917a0fb Macro def aware recompilation.
- Read macro modifier from method definition.
 - Always recompile downstream files after a file containing macro defs is recompiled.
 - Source is extended with a hasMacro attribute. Mark suggests that this might be better
   tracked in Relations, but I'm not sure how to make that change.
2012-03-04 17:35:51 +01:00
Mark Harrah d61ae7899f drop 2.7 compatibility in compiler reporter 2012-02-07 21:56:37 -05:00
Mark Harrah c17bf071d7 simpler compatibility fix works ok 2012-02-04 21:10:30 -05:00
Mark Harrah b5c4e5290e fix compiler interface to work with 2.10.0-SNAPSHOT 2012-01-19 11:00:24 -05:00
soc 8ec1b9a841 Fix messages like “class class ...”. 2012-01-04 16:20:22 +01:00
Mark Harrah cf450a963f drop more 2.7 compatibility code 2011-11-27 17:48:01 -05:00
Mark Harrah 6405f2a6cb cleanup 2.7 warn fatal setting compatibility 2011-11-04 18:39:25 -04:00
Mark Harrah 82ad44a701 preserve API information needed for detecting annotations on defs. fixes #232 2011-10-19 22:23:47 -04:00
Mark Harrah 1578341a10 add cleanupCommands setting to specify commands to run before interpreter exits. fixes #219 2011-10-16 17:27:36 -04:00
Mark Harrah 9d0cb47e0a force REPL startup to be synchronous. fixes #175. 2011-09-12 19:48:10 -04:00