Commit Graph

3667 Commits

Author SHA1 Message Date
Mark Harrah 322f6de655 Logic system supporting auto plugins and initial outline of AutoPlugin and Natures types.
* Not integrated into project loading
 * Doesn't yet check that negation is acyclic before execution
2014-01-24 14:30:12 -05:00
Dan Sanduleac ba4d57b120 Fix binary compatibility with 0.13 2014-01-23 12:07:37 +00:00
Josh Suereth 1d627797d7 Merge pull request #1093 from xerial/add-sbt-sonatype
Add link to sbt-sonatype plugin
2014-01-21 05:31:37 -08:00
Taro L. Saito 45cc2fd111 Add link to sbt-sonatype plugin 2014-01-21 22:15:11 +09:00
Josh Suereth 09d3487167 Merge pull request #1092 from gkossakowski/scala-2.11-compat
Build for Scala 2.11
2014-01-20 08:19:56 -08:00
Grzegorz Kossakowski ff0fd6eec6 Update dependencies to Scala 2.11.0-M7.
I had to sprinkle some excludes due to dependency of scala-compiler M7 on
M6 modules. Those excludes won't be needed by the time M8 is out.
2014-01-18 01:09:24 +01:00
Adriaan Moors 034eb26af9 Scala 2.11 modules now under org.scala-lang.modules
Using 1.0-RC2 for scala-xml, 1.0-RC1 for scala-parser-combinators.
2014-01-18 00:04:32 +01:00
Dan Sanduleac 0199a93ffb Expose overwrite flag in IvyActions.publish, and by default only overwrite if it's a snapshot 2014-01-17 10:45:57 +00:00
Josh Suereth c699e66342 Merge pull request #1082 from jsuereth/wip/sbt-server-api-fixes
Fixes to the internal API hooks for the sbt server.
2014-01-14 09:47:38 -08:00
Josh Suereth 2abe7574df Fixes to the internal API hooks for the sbt server.
* Alter the TaskProgress listener key to be `State => TaskProgress` so it
  can be instantiated from the current server/sbt state.
* Expose the xsbti.Reporter interface for compilation through to sbt builds.
2014-01-14 12:42:40 -05:00
Grzegorz Kossakowski cef1d28f22 Merge pull request #1076 from gkossakowski/bring-brack-incDebugProp
Bring back and deprecate `Incremental.incDebugProp`.
2014-01-13 07:40:05 -08:00
Grzegorz Kossakowski 9e7e93c632 Bring back and deprecate `Incremental.incDebugProp`.
The ae15eccd9c accidentally removed
`Incremental.incDebugProp` which broke Scala IDE build that relies on it.

We bring back that val but at the same time we deprecate it because we
have better mechanism for configuring incremental compiler now.

I also added a little comment with the history of `incDebugProp` which
explains proper migration path.
2014-01-13 16:29:16 +01:00
Jens Halm 0099b4ab55 add Laika documentation plugin to the list of community plugins 2014-01-09 08:16:32 -05:00
sam e308cc31c7 Added sbt-scoverage to list of plugins. 2014-01-08 18:01:19 -05:00
Grzegorz Kossakowski dcb327e6f4 Do not compute name hashes when name hashing is disabled
We should compute name hashes only when name hashing is enabled.
Otherwise, we just store an empty value for name hashes.
2014-01-08 17:37:43 -05:00
Josh Suereth b9489c6035 Fix compilation failure due to missing type annotation. 2014-01-07 21:42:24 -05:00
Grzegorz Kossakowski b581b60aa4 Merge pull request #1069 from benjyw/0.13-format-v4-A
Make analysis file portable.
2014-01-07 15:50:23 -08:00
Benjy 2e1809e17e Make analysis file portable.
Serializes CompileSetup as text instead of base64-encoded
binary-serialized object.

This is necessary so that file paths in the CompileSetup can be
rebased when porting analysis files between systems.
2014-01-07 22:39:47 +00:00
Grzegorz Kossakowski af39679549 Merge pull request #1042 from gkossakowski/name-hashing
Implement name hashing algorithm in incremental compiler
2014-01-06 15:40:18 -08:00
Grzegorz Kossakowski f4940df48d Make all APIChange subclasses final.
They should have been final from the beginning. We are fixing that
omission now.
2014-01-07 00:20:17 +01:00
Grzegorz Kossakowski 6cf79aba08 Mark test that passes when name hashing is enabled.
There's one test that starts to pass when we enable name hashing. It's
`import-class` which tests whether tracking of dependencies that arise
from imports is properly tracked. The name hashing algorithm uses different
dependency tracking compared to the old algorithm and the new dependency
extraction logic does handle import tree nodes properly so the test passes.

We "mark" the test passing by copying it and enabling the name hashing
flag in it. This is done similarly as in 940f7ff46d.
2014-01-07 00:20:17 +01:00
Grzegorz Kossakowski cd6b2a2a8c Mark tests that regress when name hashing is enabled.
There are number of scripted tests that fail if we switch to name hashing
being enabled by default. There's no easy way to mark those tests as
pending only when name hashing flag is enabled so I decided to "mark" them
by copying those tests, enabling name hashing in each of them and mark
those copies as pending.

Here's explanation of each failing test:

  * `constants` and `java-static` fail due to typer inlining constants
    so we can't track dependencies properly (see SI-7173)
  * `macro` fails for similar reasons as above: typer expands macros
    and we can't track dependencies properly
  * `struct` fails because it turns out that we need to handle structural
    types in a special way both at declaration and use sites. At the moment
    we handle them explicitly at declaration site so `struct-usage` passes
    but `struct` fails
2014-01-07 00:20:17 +01:00
Grzegorz Kossakowski a48ab0d38b Implement name hashing algorithm in incremental compiler.
Provide implementation of invalidation logic that takes computed
name hashes into account. The implementation is spread amongst two
classes:

  1. `IncrementalNameHashing` which implements a variant of
     incremental compilation algorithm that computes modified
     names and delegates to `MemberReferenceInvalidationStrategy`
     when invalidating member reference dependencies
  2. `MemberReferenceInvalidationStrategy` which implements the
     core logic of dealing with dependencies introduced by member
     reference. See documentation of that class for details.

The name hashing optimization is applied when invalidating source files
having both internal and external dependencies (in initial iteration),
check `invalidateByExternal` and `invalidateSource` methods for details.

As seen in implementation of `MemberReferenceInvalidationStrategy`
the name hashing optimization is not applied when implicit members
change.

NOTE: All functionality introduced in this commit is enabled only
when `IncOptions.nameHashing` flag is set to true.

The `source-dependencies/transitive-memberRef` test has been changed
to test name hashing variant of incremental compilation. The change
to invalidated files reflects the difference between the old and the
new algorithm.

Also, there a few new tests added that cover issues previously found
while testing name hashing algorithm and are fixed in this commit.
Each paragraph describes a single test.

Add a test case which shows that detect properly changes to type aliases
in the name hashing algorithm. See gkossakowski/sbt#6 for details.

Add test covering bug with use of symbolic names (issue
gkossakowski/sbt#5).

Add a test which covers the case where we refer to a name that is
declared in the same file. See issue gkossakowski/sbt#3 for details.
2014-01-07 00:20:17 +01:00
Josh Suereth 4207978f89 Merge pull request #1066 from jsuereth/wip/launcher-improvements
Launcher can now load servers in addition to regular applications.
2014-01-06 13:57:28 -08:00
Josh Suereth 418b854907 Launcher can now load servers in addition to regular applications.
* Add new ServerMain interface
* AppProvider can now choose to load ServerMain or AppMain classes
* Explicitly document what happens if something doesn't match an
  expected interface
* Improve error message on inability to load something.
* Parse new [server] section that denotes a service and is lock file
* Ability to serialize launch configurations.
* Attempt to look for active listening server via the lock file
* Forks the launcher itself to run servers from serialized launch configuration.
* Testing echo server.
* Tests to detect basic server functionality will work.
* Revamp all the documentation for the launcher, giving it its own section.
* Full documentation on launcher configuration files.

Revamp launcher documentation to be a bit more in-depth, and split bits into sections.
2014-01-06 16:54:45 -05:00
kenji yoshida 170c5f7a48 Merge pull request #1062 from xuwei-k/CommandStrings-settingsDetailed
fix CommandStrings.settingsDetailed
2014-01-06 09:20:06 -08:00
Jacek Laskowski f49ed56c1f Use string interpolation and replace deprecated methods 2014-01-06 14:17:42 +01:00
Jacek Laskowski dc246cade7 Javadoc changes 2014-01-06 14:08:02 +01:00
xuwei-k b6e16f1e95 fix CommandStrings.settingsDetailed 2014-01-05 23:40:02 +09:00
Jacek Laskowski f77c4927bc deprecated says to use pair and so it's used in the body 2014-01-04 17:19:41 +01:00
Josh Suereth e338266257 Merge pull request #1058 from jaceklaskowski/doc-small-changes
Small changes
2014-01-02 09:21:36 -08:00
Dan Sanduleac eb8077427e Fix saving session settings 2014-01-02 09:18:54 -05:00
Jacek Laskowski a5b8dffc74 Unify warning to other schemes and use string interpolation 2014-01-02 09:18:54 -05:00
Jacek Laskowski 2caadceaf6 Small changes 2014-01-01 23:29:35 +01:00
Josh Suereth 553ea80149 Merge pull request #1056 from dimbleby/typo
Fix a typo
2014-01-01 07:21:48 -08:00
David Hotham 09fa2f9efe Fix a typo 2014-01-01 13:50:33 +00:00
Mark Harrah 906f86e39f API documentation for TaskStreams. 2013-12-19 18:32:01 -05:00
Christian Dedie 38f44ec8ab add flyway-sbt plugin to community plugins 2013-12-18 11:54:24 -05:00
Mark Harrah ca4b22e272 Generate an error when making a path string from paths containing the separator. Fixes #1038.
This is an attempt to provide a decent error message in some cases.  However, paths that include
the Java path separator character are just fundamentally problematic and aren't always going to
be cleanly detected.
2013-12-18 11:53:46 -05:00
Grzegorz Kossakowski c2dc6cd529 Test for inheritance and member references.
Add a test-case that documents current behavior of incremental
compiler when it comes to invalidating dependencies that arise
from inheritance and member references.
2013-12-15 18:40:46 +01:00
Grzegorz Kossakowski d70bc51b6d Use `nameHashing` option throughout incremental compiler
There are two categories of places in the code that need to refer to
`nameHashing` option:

  * places where Analysis object is created so it gets proper
    implementation of underlying Relations object
  * places with logic that is specifically designed to be enabled by
    that option

This commit covers both cases.
2013-12-15 18:40:46 +01:00
Grzegorz Kossakowski cacb17fb2e Add `nameHashing` option to IncOptions
This option is not used anywhere yet. This commit just contains all
the boilerplate needed in order to introduce a new field to IncOptions
class.
2013-12-15 18:40:46 +01:00
Grzegorz Kossakowski 88528a43cb Fix a few mistakes related to IncOptions.recompileOnMacroDef
The 39036e7c20 introduced
`recompileOnMacroDef` option to IncOptions. However, not all necessary
logic has been changed. This commit fixes that:

  * `copy` method does not forget the value of the `recompileOnMacroDef`
    flag
  * `productArity` has been increased to match the arity of the class
  * `productElement` returns the value of `recompileOnMacroDef` flag
  * `hashCode` and `equals` methods take into account value of
    `recompileOnMacroDef` flag
  * fix the name of the key for `recompileOnMacroDef` flag
2013-12-15 18:40:46 +01:00
Grzegorz Kossakowski 4ebbf3fb8b Refactor code in IncrementalCommon and IncrementalDefaultImpl
Move implementation of the following methods from IncrementalCommon
to IncrementalDefaultImpl:

  * invalidatedPackageObjects
  * sameAPI
  * invalidateByExternal
  * allDeps
  * invalidateSource

These are the methods that are expected to have different implementation
in the name hashing algorithm. Hence, we make them abstract in
IncrementalCommon so they can be implemented differently in subclasses.
2013-12-15 18:40:46 +01:00
Grzegorz Kossakowski fdc72f3744 The invalidateByExternal takes single external api change.
Refactor the `invalidateByExternal` method to take single, external
api change. Introduce `invalidateByAllExternal` that takes all APIChanges
object.

This way `invalidateByExternal` will have an access to APIChange object
that represents changed name hashes once name hashing is merged.
2013-12-15 18:40:46 +01:00
Grzegorz Kossakowski 3643419e7c Make `invalidateSource` to take Relations.
This way we'll be able to have a polymorphic implementation of this
method in the future. One implementation will use the old dependency
tracking mechanism and the other will use the new one (implemented
for name hashing).
2013-12-15 18:40:46 +01:00
Grzegorz Kossakowski 83a131e4f5 Introduce `IncrementalCommon.invalidateSource` method.
In addition to `invalidateSources` we introduce `invalidateSource`
that invalidates dependencies of a single source. This is needed
for the name hashing algorithm because its invalidation logic
depends on information about API changes of each source file
individually.

The refactoring is done in `IncrementalCommon` class so it affects
the default implementation as well. However, this refactoring does
not affect the result of invalidation in the default implementation.
2013-12-15 18:32:49 +01:00
Grzegorz Kossakowski 946fd53a73 Introduce abstract `IncrementalCommon` class.
Introduce an abstract `IncrementalCommon class that holds the
implementation of incremental compiler that was previously done in
`Incremental` class. Also, introduce `IncrementalDefaultImpl` that
inherits from IncrementalCommon.

This is the first step to introduce a design where most of incremental
compiler's logic lives in IncrementalCommon and we have two subclasses:

  1. Default, which holds implementation specific to the old algorithm
     known from sbt 0.13.0
  2. NameHashing, which holds implementation specific to the name
     hashing algorithm

This commit is purely a refactoring and does not change any behavior.
2013-12-15 18:32:09 +01:00
Grzegorz Kossakowski 1de2900a67 Add Logger and IncOptions as Incremental class constructor args
Both Logger and IncOptions instances were passed around Incremental class
implementation unmodified. Given the fact that entire implementation of
the class uses exactly the same values for those types it makes sense
to extract them as constructor arguments so they are accessible everywhere.

This helps reducing signatures of other methods to more essential
parameters that are more specific to given method.
2013-12-15 18:32:09 +01:00
Grzegorz Kossakowski ae15eccd9c Introduce a companion `Incremental` class.
Move most of the functionality from `Incremental` object to its
companion class.

This commit is a preparation for making it possible to have
two different implementation of logic in `Incremental` object.
2013-12-15 18:30:59 +01:00