Commit Graph

4220 Commits

Author SHA1 Message Date
Eugene Yokota 98b26ae5d3 Inter-project dependency tracking. Fixes #2266
Adds `trackInternalDependencies` and `exportToInternal` settings. These
can be used to control whether to trigger compilation of a dependent
subprojects when you call `compile`. Both keys will take one of three
values: `TrackLevel.NoTracking`, `TrackLevel.TrackIfMissing`, and
`TrackLevel.TrackAlways`. By default they are both set to
`TrackLevel.TrackAlways`.

When `trackInternalDependencies` is set to `TrackLevel.TrackIfMissing`,
sbt will no longer try to compile internal (inter-project) dependencies
automatically, unless there are no `*.class` files (or JAR file when
`exportJars` is `true`) in the output directory. When the setting is
set to `TrackLevel.NoTracking`, the compilation of internal
dependencies will be skipped. Note that the classpath will still be
appended, and dependency graph will still show them as dependencies.
The motivation is to save the I/O overhead of checking for the changes
on a build with many subprojects during development. Here's how to set
all subprojects to `TrackIfMissing`.

    lazy val root = (project in file(".")).
      aggregate(....).
      settings(
        inThisBuild(Seq(
          trackInternalDependencies := TrackLevel.TrackIfMissing,
          exportJars := true
        ))
      )

The `exportToInternal` setting allows the dependee subprojects to opt
out of the internal tracking, which might be useful if you want to
track most subprojects except for a few. The intersection of the
`trackInternalDependencies` and `exportToInternal` settings will be
used to determine the actual track level. Here's an example to opt-out
one project:

    lazy val dontTrackMe = (project in file("dontTrackMe")).
      settings(
        exportToInternal := TrackLevel.NoTracking
      )
2016-01-13 12:56:28 -05:00
Eugene Yokota 10afc1f0a1 0.13.9 2015-08-10 20:32:24 -04:00
eugene yokota e72f83e0e4 Merge pull request #2146 from sbt/wip/cached-resolution-circular3
cached resolution: don't include callers from evicted modules
2015-08-10 19:32:27 -04:00
Eugene Yokota 868740a2ae cached resolution: use mutable map to speed up breakLoops 2015-08-05 07:01:21 -04:00
Eugene Yokota dd94cb90d9 cached resolution: don't include callers from evicted modules 2015-08-05 07:00:39 -04:00
Josh Suereth 856a30b43d Merge pull request #2138 from sbt/wip/cached-resolution-circular2
[0.13.9-RC3] Fixes #2129. break up circular dependency loops in cached resolution
2015-08-03 12:22:36 -04:00
Eugene Yokota ff729643e3 Add debug logs 2015-08-03 08:17:48 -04:00
Eugene Yokota 431a90264d Fixes #2129. break up circular dependency loops in cached resolution
Simple remove-one method to workaround for circular dependency did not
work. This fix traverses the entire graph to detect all loops and then
breaks them up.
2015-08-03 07:31:32 -04:00
Josh Suereth 6e8d0015ed Merge pull request #2129 from sbt/wip/cached-resolution-circular
[0.13.9-RC3] cached resolution: stack overflow when circular dependency is found
2015-07-27 09:26:28 -04:00
Eugene Yokota 792a761599 try breaking circular dependency and continue sorting 2015-07-26 23:19:16 -04:00
Eugene Yokota bc5e7d5623 refactored to use less stack space 2015-07-25 22:40:18 -04:00
Eugene Yokota 593850562a make sortModules tailrec 2015-07-25 17:38:11 -04:00
Eugene Yokota 72b8fd1025 Reproduce stack overflow using cached resolution with circular dependency 2015-07-25 17:37:52 -04:00
Josh Suereth e6f8d66c28 Merge pull request #2115 from sbt/wip/caller
Fixes #2105/#1763. Cached resolution: removes duplicate callers during merge
2015-07-18 07:07:46 -04:00
Eugene Yokota 7eb7df017e Fixes #2105/#1763. Cached resolution: removes duplicate callers during merge 2015-07-18 02:17:25 -04:00
Josh Suereth 9b714151ec Merge pull request #2097 from sbt/wip/2046
Fixes #2046. Cached resolution: Fixes double eviction
2015-07-10 15:24:41 -04:00
Eugene Yokota 0b718bb3fa notes 2015-07-10 11:40:38 -04:00
Eugene Yokota fdf8ee5146 Back out 98d81a62f9 2015-07-10 11:16:19 -04:00
Eugene Yokota 22c743cf8a #1763 fix by removing one but all artificial callers 2015-07-10 00:10:23 -04:00
Eugene Yokota 98d81a62f9 Switch to serialization for UpdateReport cache 2015-07-09 21:23:31 -04:00
Eugene Yokota 8cde12887e Ref #2068. Scala version bump needs to accompany scala-reflect bump. 2015-07-09 21:20:47 -04:00
Eugene Yokota 5412376d4b #1763 Remove artificial callers 2015-07-09 21:17:47 -04:00
Eugene Yokota 2994622ad4 Fixes #2046, Ref #1760 Fix minigraph stitching
This fixes the minigraph stitching logic by first sorting the graph
based on the level of inter-dependencies, and gradually resolving
conflict from the root-side that are not called by other libraries.
For each eviction, transitive evictions are propagated right away to
avoid double eviction observed in #2046

For the transitive eviction checking I needed to bring back the caller
information, which is notorious for its size. I am stuffing all
ModuleIDs into one ModuleID for the graph, and recovering them only
during the merging process.
2015-07-09 15:57:21 -04:00
Eugene Yokota 5256e64263 Reproduce #2046 2015-07-09 01:52:00 -04:00
Eugene Yokota a9f0a16486 Merge notes 2015-06-28 22:06:52 -04:00
eugene yokota f44f4540db Merge pull request #2079 from sbt/wip/distinct-rename
Fixes #1973. Renames distinct to distinctName
2015-06-28 21:58:46 -04:00
Eugene Yokota 16b95a4d62 Add distinctPath 2015-06-28 14:41:32 -04:00
eugene yokota 84d43e4710 Merge pull request #2080 from dwijnand/add-notes-for-2009
Add notes for #2008/#2009.
2015-06-28 10:46:21 -04:00
Dale Wijnand 81524b1b6a Add notes for #2008/#2009. 2015-06-28 12:22:38 +01:00
Eugene Yokota 4bae8b3acb Fixes #1973. Renames distinct to distinctName 2015-06-27 05:56:43 -04:00
eugene yokota eeb4614437 Merge pull request #2078 from sbt/wip/release-note
Release note for #2075/#2005
2015-06-27 05:39:44 -04:00
Eugene Yokota f0dbbe15b0 Release note for #2075/#2005 2015-06-27 05:38:24 -04:00
eugene yokota 3833c0a14d Merge pull request #2075 from sbt/fix/2005
Fixes #2005. Bump to ivy 2.3.0-sbt-c5d1b95fdcc1e1007740ffbecf4eb07abc…
2015-06-26 14:43:14 -04:00
eugene yokota 83a2319f89 Merge pull request #2072 from sbt/wip/snapshot-issues
Reinstate SNAPSHOT test that was fixed in #1520/#1514
2015-06-25 16:43:12 -04:00
Eugene Yokota 538982928a Fixes #2005. Bump to ivy 2.3.0-sbt-c5d1b95fdcc1e1007740ffbecf4eb07abc51ec93
When I went digging into Ivy's code base I discovered that it's been
checking if the repository layout pattern ends with M2_PATTERN to use
maven-metadata.xml, which for sbt would return false since we customize
the mattern -
https://github.com/apache/ant-ivy/blob/2.3.0/src/java/org/apache/ivy/plu
gins/resolver/IBiblioResolver.java#L497-L499
2015-06-25 16:39:22 -04:00
eugene yokota bea01ba1c7 Merge pull request #2073 from sbt/fix/2043
Fixes #2043. bintrayRelease is repeated 20x?
2015-06-24 20:37:47 -04:00
Eugene Yokota 13c8d00848 Fixes #2043. bintrayRelease is repeated 20x? 2015-06-24 16:56:45 -04:00
Eugene Yokota 1ca1ba431c Reinstate SNAPSHOT test that was fixed in #1520/#1514 2015-06-23 20:39:41 -04:00
eugene yokota 01f1627702 Merge pull request #2057 from sbt/wip/fixbuild
Adds bundledLauncherProj to allProj
2015-06-20 20:10:23 -04:00
Eugene Yokota bc163bbe3e Fix typo 2015-06-20 14:42:26 -04:00
Eugene Yokota 131e99b7c9 Skip process unit tests 2015-06-20 14:21:59 -04:00
Eugene Yokota bd6f9e712d Add unit tests to Travis 2015-06-20 14:21:59 -04:00
Eugene Yokota 56cc49a6b0 Remove launcher tests 2015-06-20 14:21:59 -04:00
Eugene Yokota 60e2057b15 Adds bundledLauncherProj to allProj
This matters when someone tries to locally build sbt from source.
2015-06-20 14:21:59 -04:00
eugene yokota 2cb9694b6d Merge pull request #2068 from sbt/wip/scalaversionbump
Bumping up Scala version to 2.10.5/2.11.6. Fixes #1666, Ref #1980
2015-06-20 10:59:03 -04:00
Eugene Yokota 81f175ddbf Fixes #1666 2015-06-20 00:51:42 -04:00
Eugene Yokota 6fc13d0308 Try to keep bincompat 2015-06-19 23:05:01 -04:00
Eugene Yokota 618ac5236a Bumping up Scala version to 2.10.5/2.11.6. Fixes #1980
To pass File => Unit callback across the classloader boundary
I am encoding it as a java.util.List[File] by overriding
 method.
This was needed since Java didn't allow me to cast
from one classloader to the other.
2015-06-19 16:51:39 -04:00
Josh Suereth 0c1d07dde7 Merge pull request #2006 from jroper/run-input-task
Added Extracted.runInputTask
2015-06-17 10:12:51 -04:00
Josh Suereth e681412069 Merge pull request #2009 from DavidPerezIngeniero/0.13
Provide more diagnostic info for undefined settings
2015-06-17 10:12:21 -04:00