Commit Graph
272 Commits
Author SHA1 Message Date
Mark Harrah 4057fef4ab temporary option to disable classpath lookup in incremental compiler. Ref #710 2013-03-14 16:48:30 -04:00
Mark Harrah eb5f5a4ba8 Provided details of why external binaries are detected as modified in incremental compiler debug output. 2013-03-13 12:25:15 -04:00
Mark Harrah 448e287809 toString for Stamp types 2013-03-13 12:14:19 -04:00
Mark Harrah 44c3f298c5 Include jars from java.ext.dirs in incremental classpath. Fixes #678.
Ideally, we wouldn't need to construct the classpath ourselves and instead
reuse the classpath construction code from a compiler (scalac or javac).
However, we need to ensure that we only call the compiler when needed.
Because we need to construct the classpath even when compilation might
not happen, we have to duplicate classpath construction.
2013-03-06 10:19:18 -05:00
Grzegorz Kossakowski b1411e8f35 Revert "Revert "Fix sbt/sbt#676: swapped declarations and members in ClassToAPI.""
This reverts commit 9dd5f076ea which was a revert
itself so we are back to the state before those two reverts.

The problem that caused revert that happened in 9dd5f076ea
has been fixed in 88061dd262.
2013-03-06 10:19:17 -05:00
Grzegorz Kossakowski cf356a96d9 Fix problem with initialization order in ClassToAPI.scala.
In `ClassToAPI` both `Private` and `Protected` vals had forward
reference to `Unqualified` so they would get `null` as a result.
Fixed that by rearranging the order of vals being declared.

This fixes a problem described in 9dd5f076ea.
2013-03-06 10:19:17 -05:00
Mark Harrah 584de0f254 Revert "Fix sbt/sbt#676: swapped declarations and members in ClassToAPI."
This reverts commit beb87f2789.  It causes java/options to fail.

CC @gkossakowski
2013-03-06 10:19:17 -05:00
Grzegorz Kossakowski 6442344905 Fix sbt/sbt#676: swapped declarations and members in ClassToAPI.
As described in sbt/sbt#676, arguments to `mergeMap` and `merge` methods
were swapped causing wrong structures being created for Java compiled
class files.

This commit fixes sbt/sbt#676 and makes pending test to pass now.
2013-03-06 10:19:17 -05:00
Mark Harrah eb8b71e787 Call non-deprecated isRawType instead of isRaw 2013-03-06 09:33:33 -05:00
Mark Harrah 2b0c8c29b6 Fix incremental compilation problem with package objects inheriting from invalidated sources in a subpackage.
Resolution of https://issues.scala-lang.org/browse/SI-4695 seems to be to deprecate
inheriting from a class in a subpackage.  This commit is an alternative solution,
possibly to be reverted or restricted if resolution of SI-4695 changes or if this
proves to be too conservative in practice.

Review by @gkossakowski.  With separate inheritance/function call dependency tracking,
this probably should only pull in package objects with inheritance dependencies on
invalidated files.
2013-03-06 09:33:31 -05:00
Grzegorz Kossakowski 534b554ebb 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-12 16:12:34 -05:00
Adriaan Moors f9ed4f70d7 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-12 16:11:00 -05:00
Lex Spoon b4b5da16d0 Fix -Yrangepos. Unlike other settings, it requires that a mixin be added to Global. 2012-12-12 16:04:15 -05:00
Mark Harrah 6b0a2c7113 Handle removed files when skipping to recompiling all files. 2012-12-12 15:57:51 -05:00
Mark Harrah cd7d915ef3 Recompile everything when invalidated sources exceed a certain fraction of all sources 2012-12-12 15:55:32 -05:00
nau 1102bc84cb Update compile/inc/Incremental.scala
Fix for http://stackoverflow.com/questions/12972183/sbt-always-does-full-rebuild-because-of-modified-binary-dependency-rt-jar
def externalBinaryModified uses java.io.File.equals() to check if files are the same. It's better to use File.getCanonicalPath in this case.
2012-12-12 15:52:24 -05:00
Mark Harrah 7ae33c03c7 replace Symbol.nameString calls with simpleName(Symbol). Fixes #577.
nameString is only for printing and has different behavior when scalac is
given -uniqid.
2012-12-12 15:51:10 -05:00
Mark Harrah d41cec14b5 note about Scala build and compiler interface 2012-09-04 13:43:02 -04:00
James Roper 5297daf94d Reported file name when an error occurs while opening a corrupt zip file in Locate 2012-09-04 13:31:03 -04:00
Mark Harrah 671157bd29 2.10 compatibility 2012-09-04 13:26:33 -04:00
Mark Harrah d6a45e82c3 require a smaller set of sources in the third (transitive) step of inc. compilation 2012-09-04 13:25:44 -04:00
Mark Harrah cbbccaf092 three-stage incremental compilation 2012-09-04 13:25:44 -04:00
Eugene Vigdorchik c8058cce44 Convert println() to log.debug() 2012-09-04 13:25:44 -04:00
Mark Harrah d8f5c39465 remove most occurrences of ScalaObject 2012-07-01 15:16:41 -04:00
Mark Harrah 3f12f2eb9f drop compilation tests
1. overlapped with integration tests
2. slower than integration tests
3. more fragile than integration tests
2012-07-01 15:16:41 -04:00
Mark Harrah b405110e7b compilation timings 2012-06-23 13:52:09 -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
Peter Vlugter 737b1b09bd Add scala library when compiling compiler interface sources 2012-05-25 07:21:05 -04:00
Mark Harrah 9ee30636b3 don't put scala-library.jar on the boot classpath unless it is on the classpath 2012-05-21 22:23:44 -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 5ff33fad3e Second try at printing message when stack trace suppressed.
Problems:

  1. Without a message, users don't find 'last'
  2. Showing a message for every error clutters output.

This tries to address these issues by:

1. Only showing the message when other feedback has not been provided and
   'last' would not usually be helpful.  This will require ongoing tweaking.
   For now, all commands except 'compile' display the message.  'update' could
   omit the message as well, but perhaps knowing about 'last' might be
   useful there.

2. Including the exact command to show the output:
    last test:compile
   and not just
    last <task>

3. Highlighting the command in blue for visibility as an experiment.

Review by @ijuma and @retronym, please.
2012-05-19 18:20:19 -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 7bed381bec cleanup compilation tests 2012-05-12 23:12:29 -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
Peter Vlugter 1ed64e4d5f Use Maybe rather than Option in IC 2012-05-07 19:09:25 -04:00
Peter Vlugter fdf9be166f Add helper methods to IC for reading analysis cache files 2012-05-06 21:41:38 -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 ddcf885fb9 fresh scope for each inherited definition when tagging type variables 2012-04-28 18:58:52 -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