Commit Graph

581 Commits

Author SHA1 Message Date
eugene yokota d3cb46951b Merge pull request #2261 from Duhemm/fix-1171
Consider signatures of methods before and after erasure in ExtractAPI
2015-12-16 13:24:42 -05:00
Martin Duhem 69411c1876 Fix issues with Codacy 2015-11-12 18:50:03 +01:00
Martin Duhem a8d644eb45 Merge branch '0.13' into fix-1968 2015-11-12 09:15:47 +01:00
eugene yokota 222623071a Merge pull request #2271 from Duhemm/fix-2228
Report failed compilation if errors are registered.
2015-11-12 02:14:08 -05:00
Martin Duhem a244f4e141 Fix Codacy failure by specifying return type 2015-11-11 14:49:50 +01:00
Martin Duhem d125a36b6c Parse javac non-compile-errors in JavaErrorParser
Upon startup, javac may report errors because (for instance) because it
received incorrect flags. These errors were not correctly parsed by the
JavaErrorParser and were never reported to the user.

This commit fixes this problem by adding a new parsing rule in
JavaErrorParser: errors that start with the prefix "javac:" are now
correctly parsed and reported to the user.

Fixes sbt/sbt#2256
2015-11-11 14:33:30 +01:00
Martin Duhem 7af0fea54e Don't pass `-J<flag>` option to local Java compiler
These options can only be given to a forked Java compiler. If we run a
local java compiler, we filter these options out and emit a warning.

Fixes sbt/sbt#1968
2015-11-11 14:33:16 +01:00
Martin Duhem 4a4a3ca94e Report failed compilation if errors are registered.
In some cases, the local java compiler may report compilation errors,
but succeed in compiling the source files (for instance, if there are
encoding problems in the source). However, the command line javac will
report a failed compilation on the same input.

To have the local java compiler behave like the forked java compiler, we
now report the compilation as failed if error messages have been
registered during compilation.

Fixes sbt/sbt#2228
2015-11-11 14:21:54 +01:00
Stu Hood 9fbbaab58e Add a test that we`re able to parse inner classes. 2015-11-10 14:45:04 -08:00
Martin Duhem f5e7fdd62a Restore source compatibility with Scala 2.8 2015-11-09 16:30:11 +01:00
Martin Duhem bfc27f1179 Make sure AnyVal is involved before checking post erasure 2015-11-07 09:06:26 +01:00
Martin Duhem d41fda6584 Restore source compatibility with Scala 2.8 + cosmetic changes 2015-11-06 13:11:13 +01:00
Martin Duhem 499c5e7228 Correct fix against SO and macros problem 2015-11-06 11:27:40 +01:00
Martin Duhem f1c05cb5eb Fix source compatibility with Scala < 2.10 2015-11-05 09:26:38 +01:00
Martin Duhem 4299ff76aa Quick and dirty fix for SO 2015-11-05 07:39:50 +01:00
Martin Duhem 9764b7f6ef Don't inspect signatures post erasure if macros are involved 2015-11-04 17:45:08 +01:00
Martin Duhem 111511dc6d `afterPostErasure` didn't exist in 2.9 2015-11-04 15:04:59 +01:00
Martin Duhem efff171618 Restore source compatibility with Scala 2.11 2015-11-04 13:35:53 +01:00
Martin Duhem 46058029b5 Consider signatures of method before and after erasure in ExtractAPI
The signatures of methods that have value classes as arguments or return
type change during the erasure phase. Because we only registered
signatures before the erasure, we missed some API changes when a class
was changed to a value class (or a value class changed to a class).

This commit fixes this problem by recording the signatures of method
before and after erasure.

Fixes sbt/sbt#1171
2015-11-04 11:16:53 +01:00
Stu Hood 5a3b95cd6d Add support for parsing system classes. 2015-09-18 16:37:22 -07:00
fkorotkov cf8d7fbdff Use getPosition method to get an offset position instead of using line number 2015-09-10 16:35:09 -07:00
Martin Duhem 92ea782d94 Fix deprecation messages 2015-09-04 12:25:59 +02:00
Martin Duhem 152b040fe3 Rename binary form of compiler bridge
This will avoid all clashes between modules that may have the same name
as other components of sbt, or two different compiler bridges that would
happen to have the same name.
2015-09-04 12:23:06 +02:00
Martin Duhem 1c4a900ff5 Retrieve compiler bridge sources in temp directory
Note that they won't be downloaded again, because the component compiler
will look for a previously-compiled version of the compiler bridge
before trying to fetch the sources again. If they've already been
downlaoded, then they have been compiled and a compiled version of the
compiler bridge already exists.
2015-09-04 12:00:44 +02:00
Martin Duhem dcad8a5527 Specify the compiler bridge module in a setting
In order to restore reproducibility of builds, we no longer cascade over
the possibly available versions of the compiler bridge sources (a
specific version of the bridge sources may not be available one day, but
exist on the next day), but rather let the build definition configure
which module to use.

Fixes sbt/sbt#2196
2015-09-04 11:17:27 +02:00
Martin Duhem e31a9ba456 Download compiler interface sources in boot directory 2015-08-26 10:33:11 +02:00
Martin Duhem 41b7208a36 Hide Ivy logs in compiler-interface sources retrieval
Because in most cases there aren't version-specific sources, we expect
the retrieval to fail a number of times before succeeding. This
generates a lot of noise in sbt's log, so the logs will now be shown if
and only all the versions fail.
2015-08-26 09:40:53 +02:00
eugene yokota 9349094e65 Merge pull request #2158 from twitter-forks/stuhood/fix-error-message-when-name-hashing-is-enabled
Fix error when name hashing is enabled and mixed with non-enabled
2015-08-18 17:55:43 -04:00
Martin Duhem 8a31702253 Add overloads to restore binary compatibility 2015-08-17 16:31:09 +02:00
Martin Duhem 40ebc82531 Include private members in API hash of traits.
During compilation, scalac generates getters and setters for the fields
of traits, regardless of their access modifiers. Therefore, when a
field of a trait is modified, all its implementors must be recompiled to
take these changes into account.

Private fields of traits were not included in the API hash of traits,
and their implementors were thus not recompiled when modified.

This commit changes the way the API hash is computed for traits only, so
that the generated hash includes the private members of traits.

Fixes sbt/sbt#2155
2015-08-17 11:59:48 +02:00
Stu Hood 1b6dbc90c1 Fix error message when name hashing is enabled and mixed with non-enabled. 2015-08-15 11:55:31 -07:00
Pierre DAL-PRA 8f1fb2d232 Fix additional warnings 2015-08-07 00:23:14 +02:00
Pierre DAL-PRA 54d54b9f4f Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
Pierre DAL-PRA f0bd9001e6 Remove redundant collection conversions 2015-08-01 12:05:35 +02:00
Pierre DAL-PRA b9171e59ad Simplify operations on collections 2015-08-01 02:25:17 +02:00
eugene yokota 5824ef6d7f Merge pull request #2106 from Duhemm/interface-specific-sources-clean
Find most specific version of compiler interface sources
2015-07-17 10:25:16 -04:00
Josh Suereth d9360de473 Merge pull request #2108 from fkorotkov/javac-line-content
Line content from diagnostic classes if available
2015-07-17 09:27:12 -04:00
Pierre DAL-PRA 13b37cc987 Fix several warnings 2015-07-17 09:17:42 +02:00
fkorotkov e4f27ee2ca added a todo 2015-07-16 18:09:47 -04:00
fkorotkov 93ae6b2db0 catch Throwable 2015-07-16 17:34:33 -04:00
fkorotkov 5258b4c0d3 reverted check 2015-07-16 16:33:04 -04:00
fkorotkov c73f513016 review comments 2015-07-16 15:49:06 -04:00
fkorotkov 4c86117b79 Line content from diagnostic classes if available 2015-07-16 15:23:23 -04:00
Martin Duhem 90a8423d8e Find most specific version of compiler interface sources
This commit introduces a mechanism that allows sbt to find the most
specific version of the compiler interface sources that exists using
Ivy.

For instance, when asked for a compiler interface for Scala 2.11.8-M2,
sbt will look for sources for:

 - 2.11.8-M2 ;
 - 2.11.8 ;
 - 2.11 ;
 - the default sources.

This commit also modifies the build definition by removing the
precompiled projects and configuring the compiler-interface project so
that it publishes its source artifacts in a Maven-friendly format.
2015-07-16 11:18:48 +02:00
Stu Hood 7e7aca5f55 Mismatch APIs on type changes as well 2015-07-13 21:29:14 -07:00
Stu Hood a80c3e2bb8 Review feedback 2015-07-09 22:01:05 -07:00
Stu Hood aa11e9ca87 Improve comments 2015-07-07 10:56:51 -07:00
Stu Hood 592b19b35e Add non-string tests 2015-07-07 10:25:27 -07:00
Stu Hood 2982018e5a Parse ClassFile as a lazy val, and provide it to fieldToDef 2015-07-07 10:25:16 -07:00
Stu Hood cc052b598c Add test for stable APIs with identical constants 2015-07-06 16:54:02 -07:00
Stu Hood d52b6bfce7 Add tests missed during initial patch port 2015-07-06 12:50:14 -07:00
Stu Hood 6846bbd3ed Encode static-final constant fields as Singletons, so that when the api changes, they change. 2015-07-01 21:37:32 -07:00
James Roper 18fb684143 Update incremental compile debug message
sbt 0.13.1 was changed so that products were invalidated
not just when they were deleted, but also when they were
modified, however the debug message was not updated to
reflect this, causing people to think invalidated class files
had been deleted.
2015-04-15 14:29:10 +10:00
Benjy b70345c61b Warn when ignoring previous analysis for various reasons.
This can confuse users and is hard to debug. It seems better to be
explicit about why we're choosing not to do an incremental compile.
2015-03-17 23:55:25 +00:00
Indrajit Raychaudhuri 1f90ef6b43 Fix params order in `@deprecated` 2015-01-17 08:25:57 +05:30
eugene yokota be78b7fc4c Merge pull request #1759 from jedesah/topic/minor_cleanup
Minor code cleanup
2015-01-14 16:13:06 -05:00
Josh Suereth 488a62c8bf Merge pull request #1754 from Duhemm/fix-1655
Check for null type trees in dependency extraction
2014-12-04 17:57:44 -05:00
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
eugene yokota 7df9802f0c Merge pull request #1714 from sbt/wip/bytecode-enhancement
Expose mechanism whereby bytecode enhancement can be run *before* saving incremental compiler hashes.
2014-12-03 08:46:52 -05:00
Grzegorz Kossakowski 015c61ad69 Merge pull request #1736 from Duhemm/dependency-kind-compile
Abstract over dependency kind in Compile
2014-12-02 16:00:22 +01:00
Josh Suereth 59ba35ce90 Finish rearchitecting.
* IncrementalCompiler IC object now holds the actual logic to start incremental compilation (rather than AggresiveCompiler or other)
* MixedAnalyzingCompiler ONLY does anlaysis of Java/Scala code
* Moved the AnalyzingJavaCompiler into the integration library so that necessary dependencies are visible.
2014-12-01 13:35:51 -05:00
Josh Suereth 3c4bc23cdb First set of refactorings from review.
* Split Java analyzing compile into its own class.
* MixedAnalyzingCompiler now only does the mixing
* Start moving methods around to more-final locations
* Static analyzingCompile method now constructs a MixedAnalyzingCOmpiler and delegates to incremental compile.
2014-12-01 13:35:51 -05:00
Josh Suereth ae4721aba0 Adding more scaladoc to incremental compiler library. 2014-12-01 13:35:51 -05:00
Josh Suereth 067479f59e Debug issues with implicit usage for CompileSetup.
* Force CompileSetup Equiv typeclass to use Equiv relations defined locally.
* Add toString methods on many of the incremental compiler datatypes.
* Remove remaining binary compatibility issues in Defaults.scala.
2014-12-01 13:35:51 -05:00
Josh Suereth 045ac1d984 Tweak remaining binary compatibility issues with design. 2014-12-01 13:35:51 -05:00
Josh Suereth 40bf599f4a Deprecating old APIs and attempting to document behavior correctly.
* Removed as many binary incompatibilities as I could find.
* Deprecating old APIs
* Attempt to construct new nomenclature that fits the design of Incremental API.
* Add as much documentation as I was comfortable writing (from my understanding of things).
2014-12-01 13:35:51 -05:00
James Roper 0f784ab101 Allow bytecode enhancement to update analysis
This breaks the loading/saving of the incremental compiler analysis out
into separate task, thereby providing the necessary hooks for byte code
enhancement tasks to enhance bytecode and update the analysis before the
analysis gets stored to disk.
2014-12-01 13:35:50 -05:00
Martin Duhem 18c521dd4b Check for null type trees in dependency extraction
In some cases the dependency extraction may encounter a null `TypeTree`
(eg. arguments of macro annotations that are untyped). In such cases,
we simply ignore the node.

Fixes #1593, #1655.
2014-11-29 12:17:32 +01:00
Eugene Yokota 8c2149dfb6 Fixes #1743. Fixes IndexOutOfBoundsException on Java warning with no position
Enbugged in #1702.
The d.getPosition, d.getStartPosition uses -1 as NOPOS value, but they
weren’t being checked.
Added checkNoPos.
2014-11-20 20:54:06 -05:00
Martin Duhem 98c789b826 Abstract over dependency context in Compile
This commit completes the abstraction over dependency kinds in the
incremental compiler, started with #1340.
2014-11-19 10:35:07 +01:00
Martin Duhem deda8eee70 Remove trait `DependencyContext` in favor of enum
Since `DependencyContext` is needed in the compiler interface
subproject, it has to be defined in this same subproject.

`DependencyContext` is needed in this subproject because the
`AnalysisCallback` interface uses it.
2014-11-19 10:35:07 +01:00
Grzegorz Kossakowski b2c2ff698e Merge pull request #1340 from Duhemm/abstract-over-dependency-kind
Abstract over dependency kind in Analysis
2014-11-18 16:32:06 +01:00
Martin Duhem 191c3ed675 Use new infrastructure in `AnalysisTest`
A new infrastructure to register sources and their dependencies has
been introduced in `c09a391`.

This commit brings the required modifications to `AnalysisTest`,
so that it uses it.
2014-11-18 13:09:07 +01:00
Martin Duhem b1a608cf1d Use new infrastructure in `AnalysisCallback`
A new infrastructure to register sources and their dependencies has
been introduced in `c09a391`.

This commit brings the required modifications to `AnalysisCallback`,
so that it uses it.
2014-11-18 13:08:51 +01:00
Martin Duhem c09a3912d1 Implement abstraction over dependency kinds
This commit implements the abstraction over the dependency kinds and
deprecates the methods that were used to register files and their
dependencies.

Dependencies are now divided into two categories : Internal and
External dependencies. Moreover, each internal or external dependency
has a Context, which describes what introduced the dependency (for
instance, a dependency may be introduced by member reference or by
inheritance).

Dependencies must now be registered using the method `addSource` in
`Analysis` and in `Relations`. This method has the advantage of being
independent from the existing dependency contexts. That is, its
signature does not need to be modified whenever a new dependency
context is introduced.
2014-11-18 13:07:58 +01:00
Josh Suereth 3876082172 Merge branch 'wip/incremental-compiler-javac-cleanup' of https://github.com/jsuereth/xsbt into wip/incremental-compiler-javac-cleanup 2014-10-31 11:00:35 -04:00
Josh Suereth a2e7b324f3 Fixes for windows.
* Move error parser into its own file.
* Add the ability to parse Windows filenames.
* Remove existence check for the file as a mandatory.
* Add specific test for the parser.
2014-10-31 10:58:51 -04:00
Josh Suereth 75402b26f2 More fixes from review.
* Fix regex for end of line.
* Rename NewJavaTool and friends to remove the New.
2014-10-30 19:37:22 -04:00
Josh Suereth 8d158e5ab6 TODO cleanups based on @havocp's comments. 2014-10-30 13:28:41 -04:00
Josh Suereth 5f9f38f300 Fix cross-JDK issues around invalid URIs in JDK6 2014-10-29 21:55:14 -04:00
Josh Suereth 70cdce0830 Create a new API for calling Java toolchains.
* Create a new sbt.compiler.javac package
* Create new interfaces to control running `javac` and `javadoc` whether forked or local.
* Ensure new interfaces make use of `xsbti.Reporter`.
* Create new method on `xsbti.compiler.JavaCompiler` which takes a `xsbti.Reporter`
* Create a new mechanism to parse (more accurately) Warnings + Errors, to distinguish the two.
* Ensure older xsbti.Compiler implementations still succeed via catcing NoSuchMethodError.
* Feed new toolchain through sbt.actions.Compiler API via dirty hackery until we can break things in sbt 1.0
* Added a set of unit tests for parsing errors from Javac/Javadoc
* Added a new integration test for hidden compilerReporter key, including testing threading of javac reports.

Fixes #875, Fixes #1542,  Related #1178 could be looked into/cleaned up.
2014-10-29 20:06:08 -04:00
Martin Duhem 41f07be247 Port fix for #1544 from Dependency to ExtractUsedNames
The fix for sbt/sbt#1237 was unfortunately not completely correct,
and infinite loops could still occur during the extraction of used
names.

In sbt/sbt#1544, a fix that was robuster and easier to understand
was applied to `/compile/interface/src/main/scala/xsbt/Dependency.scala`
in a similar situation (cyclic chains of original trees in macro
expansions).

This commit ports this fix to `ExtractUsedNames.scala`.

Closes sbt/sbt#1640, sbt/sbt#1610.
2014-10-03 22:01:49 +02:00
Grzegorz Kossakowski 20f50100be Use Option.apply instead of Some.apply in ClassToAPI
When dealing with Java APIs (Java reflection in case of ClassToAPI), one
should always go through Option.apply that performs null check.

This is supposed to fix NPE reported in #1617. We don't have a reproduction
so this is just an educated guess.
2014-09-24 23:05:52 +02:00
Grzegorz Kossakowski f7c00ab581 Sketch of abstracting over dependency details in incremental compiler
This represents a sketch of the idea that we can abstract over details
of a specific dependency kind. The goal would that only a few
implementations of methods in incremental would be sensitive to specific
dependency kind:

  1. Dependency extraction logic
  2. Implementation of Relations which adds dependencies to specific
     relations (or abstract over specific relations)
  3. Invalidation algorithm (Incremental.scala) which has different
     of each kind of dependency
  4. TextAnalysisFormat

In particular, adding a new dependency kind would not affect signatures
of existing methods.

What needs to be done:

  - finish refactoring so the code compiles again and previous semantics
    are preserved
  - introduce deprecated overloads that preserve old method signatures
    (this is required for preserving binary compatibility)
2014-09-12 08:52:06 +02:00
Grzegorz Kossakowski 7885fd2558 Merge pull request #1572 from Duhemm/textanalysisformat-dependency-kinds
Don't hardcode existing relations in TextAnalysisFormat
2014-09-11 16:55:08 +02:00
Martin Duhem 82152b8905 Don't hardcode existing relations in TextAnalysisFormat
The previous implementation of TextAnalysisFormat contained the list
of all the existing relations that sbt knew of, and used this
information to write to and read from the disk the persisted analyses.

In this knew implementation, TextAnalysisFormat gets from the
Relations object what are the existing relations, and then persists
them to disk.

The previous situation was not optimal since it meant that, in order
to add a new dependency kind, one had to modify both the Relations
and TextAnalysisFormat.

Using this new implementation, no change to TextAnalysisFormat is
required whenever a new dependency kind is added.
2014-09-11 14:45:47 +02:00
Martin Duhem 8542c9b31a Fix SOE with macros in dependencies extraction
In some cases, expanded macros report that their original tree and
its expansion are the same, thus creating a cyclic chain. This chain
may then produce a SOE during dependencies or used names extraction.

This kind of problem was already reported in sbt/sbt#1237 and
sbt/sbt#1408. Unfortunately, the fix that was applied to the
dependencies extraction part was not sufficient.

Mark test 'source-dependencies/macro' as passing

Fixes #1544
2014-09-10 15:54:06 +02:00
Martin Duhem efa71548d1 Add unit tests for TextAnalysisFormat
Those tests use the random Analysis generator that is used in the
unit tests for the subproject `incremental-compiler`.

Random Analyses are serialized and then constructed back from this
representation.
2014-09-03 23:24:08 +02:00
Martin Duhem c55ae4fd18 Fix random Analysis generator for ScalaCheck
Unit tests in incremental-compiler subproject use a generator to
create random Analysis objects. This generator was unfortunately
not working properly and generated only empty Analyses (it failed
to generate any non-empty Analysis because of a bug in the `unique`
generator).
2014-09-03 23:10:22 +02:00
Eugene Yokota bb20310922 Run AnalysisTest without name hashing 2014-08-23 02:58:44 -04:00
Eugene Yokota 112052241c #1550. Fixes scripted/join that broke with #1546
Name hashing is now turned on by default, so I’m changing the value for
inc.Relations.empty, so inc.Analysis.empty functions as expected when
it’s joined with name hashing analyses.
2014-08-22 19:12:27 -04:00
Grzegorz Kossakowski c440c578fc Enable name hashing incremental compilation by default.
This commit changes the default value of `IncOptions.nameHashing` to be
set to true. It means, the improved incremental compilation algorithm
known as "name hashing" will be enabled by default.

In order to disable it, users should add this to their sbt configuration:

  incOptions := incOptions.value.withNameHashing(false)

Number of tests has been cleaned up as part of this change. All tests
that were marked as name hashing specific are removed. The list includes:

  * constants-name-hashing
  * import-class-name-hashing
  * java-static-name-hashing
  * macro-name-hashing
  * struct-name-hashing

We'll keep just regular version of those tests. The tests will just
exercise the default algorithm: name hashing. This is the first step
towards phasing out of the old incremental compilation algorithm.

Apart from that, a few tests changed its status due to enabling name
hashing algorithm.

The `constants` test has been marked pending due to issue described in
#1543.

The `import-class` test has been marked as passing because name hashing
tracks dependencies introduced by import statements correctly, now.

The `macro` test has been marked as pending due to issue described in
#1544.

The `struct` test has been marked as pending due to issue described in
#1545.

The `java-static` has been slightly modified to exercise just static field
and not run into the same issue as with `constants` test.

There are no other known issues related to name hashing so we conclude
that name hashing is ready to be shipped to all sbt, Scala IDE and zinc
users.
2014-08-22 02:08:07 +02:00
Martin Duhem 26e2449263 Never inspect twice the same macro application
In Scala 2.10.4, this macro can produce a stack overflow :

    def foo(a: Any): Any = macro impl
    def impl(c: Context)(a: c.Expr[Any]): c.Expr[Any] = a

Here, an application such as `foo(someVal)` will produce the expansion
`someVal`. As expected, `someVal` has `original` tree `foo(someVal)`,
but if we inspect this tree, we will find that `someVal` has an
original tree, but it shouldn't.

Moreover, in Scala 2.11, some macros have their own application as
`original` trees.

See sbt/sbt#1237 for a description of these problems.

This commit fixes these two problems.

Fixes sbt/sbt#1237
2014-08-18 09:22:16 +02:00
Brian McKenna 2fefaf5758 Change "Not a simple type" warning to log message
Workaround for -Xfatal-warnings being triggered because of #830.
2014-07-30 07:45:03 -06:00
Grzegorz Kossakowski 129c870a1d Break Incremental.scala into smaller files.
Incremental.scala contained all three strategies of incremental
compilation:

  * ant-style
  * the default one (before name hashing)
  * name hashing

Let's move all those classes into separate files. Also, move common code
into a separate file.
2014-05-21 16:23:55 +02:00
Grzegorz Kossakowski 7849361c82 Remove stale, commented out code from Incremental.scala
The commented out code was sitting here since 2010. It bit-rotted to the
point of not being useful anymore. Let's remove it.
2014-05-20 19:51:28 +02:00
Benjy 00f12c6046 Ensure sequences in analysis files are read in order.
For various reasons, we serialize sequences as:

0 -> foo
1 -> bar
...

Until now we were implicitly relying on the sequences being in order.
However external code may end up (due to bugs or otherwise) messing
with the ordering:

1 -> bar
0 -> foo
...

This change ensures that we don't get confused by that. Although
it's best if external code doesn't mess up the ordering, it's still
a good idea to be defensive about this.

Note that the sequences we serialize are short, so the extra sort
is not a performance concern.
2014-05-17 01:04:14 +00:00
Josh Suereth abffc3e1bd Bump expected 2.11 module versions so we can compile with 2.11
Add scala 2.11 test/build verification.

* Add 2.11 build configuratoin to travis ci
* Create command which runs `safe` unit tests
* Create command to test the scala 2.11 build
* Update scalacheck to 1.11.4
* Update specs2 to 2.3.11
* Fix various 2.11/deprecation removals
  and other changes.

Fix eval test failure in scala 2.11 with XML not existing.
2014-05-14 19:08:05 -04:00
Grzegorz Kossakowski 680713f666 Add Ant-style incremental compilation mode.
This commit implements an Ant-style incremental compilation mode. This mode
emulates what Ant's scalac command does. It recompiles just changed source
files and does not perform any invalidation of dependencies.
This is a very naive mode of incremental compilation that very often leads
to broken binaries.

The Ant-style mode is being introduced because Scala team needs it for
migration of Scala compiler to sbt. The name hashing algorithm doesn't
work well with Scala compiler sources due to deep inheritance chains.
There's a plan to refactor compiler's code to use more composition instead
of inheritance.

Once Scala compiler sources are refactored to work well with name hashing
algorithm, Ant-style mode will be deleted immediately.
2014-05-08 20:29:02 +02:00
Grzegorz Kossakowski ba88236b31 Add `antStyle` to IncOptions.
Add an option that enables (to be implemented) Ant-style mode of
incremental compilation.

This option is unsupported and may go away at any point in the future.

NOTE: Either `antStyle` or `nameHashing` mode can be enabled. This is
being enforced with runtime assertion.
2014-05-08 20:28:16 +02:00