Commit Graph

310 Commits

Author SHA1 Message Date
Pierre DAL-PRA d3dc1736e7 Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
Eugene Yokota fb2ccdd285 Add debug logs 2015-08-03 08:17:48 -04:00
Eugene Yokota 71faf88916 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
Pierre DAL-PRA ec71256040 Remove redundant collection conversions 2015-08-01 12:05:35 +02:00
Pierre DAL-PRA e528f3d163 Simplify operations on collections 2015-08-01 02:25:17 +02:00
Eugene Yokota 4e69d04be8 try breaking circular dependency and continue sorting 2015-07-26 23:19:16 -04:00
Eugene Yokota ddf941f371 refactored to use less stack space 2015-07-25 22:40:18 -04:00
Eugene Yokota e5ac8316a7 make sortModules tailrec 2015-07-25 17:38:11 -04:00
Josh Suereth 92202d4353 Add warning to MakePom for intransitive dependencies.
Intransitive does not work in Maven, and does not translate to pom.xml.
2015-07-24 10:42:49 -04:00
eugene yokota c8e1da38b7 Merge pull request #2116 from sbt/0.13.9
Merge 0.13.9 back into 0.13
2015-07-18 13:36:04 -04:00
Eugene Yokota a1ac6c6eaa Fixes #2105/#1763. Cached resolution: removes duplicate callers during merge 2015-07-18 02:17:25 -04:00
eugene yokota 30b459a212 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
Pierre DAL-PRA fd9644dc5d Fix several warnings 2015-07-17 09:17:42 +02:00
Martin Duhem 63cfbb49e2 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
Eugene Yokota fe2026f419 #1763 fix by removing one but all artificial callers 2015-07-10 00:10:23 -04:00
Eugene Yokota 7cb92b3f6c #1763 Remove artificial callers 2015-07-09 21:17:47 -04:00
Eugene Yokota 97d53db03b 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 2bc3b88434 Reproduce #2046 2015-07-09 01:52:00 -04:00
Eugene Yokota 1aa7ba807b Fixes the releasing 2015-06-09 17:20:03 +02:00
Josh Suereth fda77d56db Minor fixes of leftover codes from review. 2015-05-29 09:49:47 -04:00
Josh Suereth b51321b857 Fix corruption issues with sbt's CustomPomParser. 2015-05-28 09:36:11 -04:00
Dale Wijnand 33e3b9f693 Commit build auto-formatting changes for code in master. 2015-05-28 08:28:05 +01:00
Dale Wijnand 7a124bd2df Fix bincompat for project-level excludes in the POM. 2015-05-28 08:15:10 +01:00
Dale Wijnand 4d7184d8c3 Add project-level exclusions in the POM.
Closes #1877.
2015-05-28 08:14:08 +01:00
Josh Suereth d6a829caa4 Merge pull request #2027 from cunei/wip-fix-2001
Do not emit in the pom dependencies that are only sources or docs
2015-05-27 18:43:50 -04:00
Eugene Yokota fa97b0b8d6 Adds null guard 2015-05-23 17:32:56 -04:00
Eugene Yokota d83602e12b Cached resolution: Clean up old dynamic minigraphs. Fixes #2014
Cached resolution saves dynamic mini graphs (including subproject
graphs) timestamped to the logical clock (State).
This enables graph caching across the subprojects.
On the other hand, it creates garbage that becomes stale almost
immediately. Prior to #2030 fix, this garbage would reach 1GB+.
This fix timestamps these graphs using calendar date, and cleans them
up after a day.
2015-05-23 03:25:26 -04:00
Eugene Yokota e430139680 Fixes #1721/#1763. Cached resolution: summarize callers in graph.json
- On some of the builds graph.json is reaching 250MB+
- JSON parsing alone takes hours
- 97% of the content are caller info
- This change summarizes all callers into one (zero caller would have
correctness issues)
2015-05-21 23:04:52 -04:00
Antonio Cunei 65dc88adc6 Do not emit in the pom dependencies that are only sources or docs
The pom generation code tries its best to map Ivy's configurations
to Maven scopes; however, sources and javadoc artifacts cannot be
properly mapped and they currently are emitted as dependencies in
the default scope (compile). That may lead to the source/doc jars
being erroneously processed like regular jars by automated tools.

Arguably, the source/docs jars should not be included in the pom
file as dependencies at all. This commit filters out the
dependencies that only appear in the sources and/or javadoc Ivy
configurations, thereby preventing them from appearing in the
final pom file.
2015-05-20 03:40:16 +02:00
Andrew Johnson 3f871a499d Support configuring a subset of configurations from which to retrieve dependencies when retrieveManaged is true 2015-04-23 12:49:45 -04:00
eugene yokota 7081c06a36 Merge pull request #1960 from asflierl/0.13
Honor overwrite flag when publishing locally.
2015-04-14 11:54:10 -07:00
Andreas Flierl e647412bf6 Honor overwrite flag when publishing locally. 2015-04-10 13:29:26 +02:00
Andrew Johnson 983d07bd86 Add constructor with default sync value 2015-04-03 11:33:12 -04:00
Andrew Johnson 31d71c72e2 Fix compilation error in BaseIvySpecification 2015-03-31 13:03:49 -04:00
Andrew Johnson d3246e5915 Add retrieveManagedSync 2015-03-31 10:59:41 -04:00
Josh Suereth 07731e68f5 Fix unit test for makepom. 2015-03-27 07:51:37 -04:00
Josh Suereth 7f80872171 Fixes #1921.
* Add version range query (if needed) before resolving artifact in Aether.
* Ensure detected version is used after having a version range query.
2015-03-26 16:09:29 -04:00
Josh Suereth b4d0feb7da Remove jcenter from generated pom.xml files (like maven central is not there). 2015-03-25 10:18:59 -04:00
Josh Suereth 7877723d12 Restore component manager test via stubs. 2015-03-25 08:03:09 -04:00
Josh Suereth df959cf0d4 Migrate to using the sbt/launcher module, rather than having the code embedded.
* Remove launch/* code/tests, as these are in the sbt/launcher project.
* Create a new project which will resolve launcher module from sonatype-snapshots,
  and repackage it for the currently building version of sbt.
* Remove ComponentManagerTest which was relying DIRECTLY on launcher classes.
  We'll need to reconfigure this shortly to enable the tests again.

Remaining TODOs -

* Update resolvers so people can find the launcher.
* Add ComponentManagerTest back.
* Re-publish the sbt-launch.jar in the location it used to be published.
2015-03-24 16:12:51 -04:00
Max Worgan a50fcab1f8 Inserted brackets to developer xml renders correctly 2015-03-23 14:16:05 +00:00
Eugene Yokota 3afb941ad2 Remove custom picklers
- sbt/serialization supports these
2015-03-09 21:22:58 -04:00
Eugene Yokota 8a0e8ef74e Write JSON to file without String. #1763 2015-03-09 21:22:58 -04:00
Eugene Yokota 936c804c41 Improve caching internal deps. #1763
Some heap optimization during merging too.
YourKit showed that mergeOrganizationArtifactReports takes up huge
amount of heap.
2015-03-09 21:22:58 -04:00
Eugene Yokota b583c031bb OOM handling. #1763 2015-03-09 21:22:58 -04:00
Eugene Yokota 1a65c774c3 Implement pickler for UpdateReport. #1763 2015-03-09 21:22:57 -04:00
eugene yokota b002057a29 Merge pull request #1899 from dwijnand/fix/1818/exempt-scala-actors-migration
Exempt scala-actors-migration from version checks.
2015-03-07 16:30:25 -05:00
Dale Wijnand ececf95919 Exempt scala-pickling as well. 2015-03-06 22:29:58 +00:00
Eugene Yokota 597bcc489d Fixes typo 2015-03-05 17:27:23 -05:00
Dale Wijnand 77898b67bc Exempt scala-actors-migration from version checks.
Fixes #1818.
2015-03-04 07:45:36 +00:00
Eugene Yokota 38a8215ffa Transitively evict modules when callers are evicted. Fixes #1760 2015-03-03 14:58:41 -05:00
Eugene Yokota b4e6d6d77b Generalize the logic to all config inheritance 2015-02-24 15:00:19 -05:00
Eugene Yokota 23e20f72ba Fixes #1711, #1730. Cached resolution: fixes internal project
Re-fixes cached resolution's internal dependency issue by recursively
calling customResolve instead of including the transitive dependencies
from internal dependencies into your own graph.
Transformation of configuration still happens, but at the level of
resolved graph (UpdateReport), which is much less granular, and
hopefully less error-prone.
2015-02-24 15:00:19 -05:00
Eugene Yokota 78881eefb3 Adds an hook treating InlineConfigurationWithExcludes structurally 2015-02-13 16:59:20 -05:00
Indrajit Raychaudhuri c967653442 Fix params order in `@deprecated` 2015-01-17 08:25:57 +05:30
eugene yokota 087bedb698 Merge pull request #1759 from jedesah/topic/minor_cleanup
Minor code cleanup
2015-01-14 16:13:06 -05:00
Josh Suereth a0f6662500 Refactoring code.
* remove debugging statements
* Move each class so it's one name-per-file
* Migrate out of org.apache namespace into sbt.mavenint
2015-01-12 14:48:23 -05:00
Eugene Yokota a02fe61792 Adjust tests. 2015-01-10 22:55:50 -05:00
Eugene Yokota 7bbacce172 Turn Aether integration into sbt-maven-resolver 2015-01-09 14:36:51 -05:00
Josh Suereth 038fb98c7f Migrate pom extra attributes out of CustomPomParser for deprecation. 2015-01-09 14:14:40 -05:00
Josh Suereth 651f92e40c Appropriately transfer sbt-plugin transitive 'extra attribute' properties.
* Propogate the extra dependnecy attribute out of pom files into Aether
* Use the extra depednency attributes to ensure transitive plugins can be resolved.
* Add TODOs for further cleanup work.
2015-01-09 11:14:27 -05:00
Josh Suereth b93627cd6c Fix upload/copy semantics to handle non-file based uploads. 2015-01-09 11:11:37 -05:00
Josh Suereth 4403863aca Create a new Ivy DependencyResolver which uses Aether.
* Here we wire Aether into the Ivy dependency chain
* Add hooks into Aether to use Ivy's http library (so credentials are configured the same)
* Create the actual Resolver which extracts metadata information from Aether
* Deprecate old Ivy-Maven integrations
* Create hooks in existing Resolver facilities to expose a flag to enable the new behavior.
* Create notes documenting the feature.
* Create a new resolver type `MavenCache` which denotes how to read/write local maven cache metadata
  correctly.  We use this type for publishM2 and mavenLocal.
* Update failing -SNAPSHOT related tests to use new Aether resolver
* Create specification for expected behavior from the new resolvers.

Known to fix #1322, #321, #647, #1616
2015-01-08 08:53:25 -05:00
Josh Suereth 1d68855285 Merge pull request #1634 from sbt/fix/1634
A library is missing from dependencyClasspath if it's added to libraryDependencies twice in ascending order
2014-12-15 16:05:57 -05:00
Josh Suereth 14afe119f5 Merge pull request #1620 from sbt/fix/1620
sbt resolves dependencies every compile when using %% with dependencyOverrides
2014-12-15 16:04:18 -05:00
Eugene Yokota 80db26bc20 Fixes #1634. Adds inconsistent duplicate warning
#1634 is about a library getting wiped out of deps graph when it’s
included twice in ascending order of version.
I’d say that’s a logically inconsistent state, and we should just issue
warning instead of trying to fix it.
2014-12-14 07:52:05 -05:00
Eugene Yokota ccef278865 'evicted' task to display all evictions 2014-12-12 23:30:05 -05:00
Eugene Yokota 08e9230aeb Fixes #1615. Move the invocation of eviction warning.
This moves the invocation of eviction warning so it’s called only when
actual ivy update is being performed.
2014-12-12 17:46:19 -05:00
Eugene Yokota ca6b138a68 Fixes #1620. Fixes Set[ModuleID] serialization that broke update cache. 2014-12-08 09:27:56 -05:00
Eugene Yokota 5e0085ee49 Adds excludeDependencies. Fixes #1748
Adds project-level dependency exclusions:

  excludeDependencies += "org.apache.logging.log4j"
  excludeDependencies += "com.example" %% "foo"

In the first example, all artifacts from the organization
`"org.apache.logging.log4j"` are excluded from the managed dependency.
In the second example, artifacts with the organization `"com.example"`
and the name `"foo"` cross versioned to the current `scalaVersion` are
excluded.
2014-12-04 17:35:30 -05:00
Eugene Yokota 5cace88095 Fixes #1752. Fixes cached resolution too verbose.
- Fixes cached resolution being too verbose
- Adds new UpdateLogging named "Default"
- When global logLevel or logLevel in update is Debug, Default will
bump up to Full UpdateLogging.
2014-12-04 12:34:30 -05:00
Jean-Rémi Desjardins e0e7fd002c Minor code cleanup 2014-12-03 09:56:34 -08:00
Eugene Yokota 813a8ff326 Fixes #1723. classifier-related fixes
- minigraph sha now contains extra attributes from artifacts
- artifacts are merged from different mini graphs (in some cases, this
should result to better resolution than stock ivy)
2014-11-11 21:15:11 -05:00
Eugene Yokota 78929291c7 fixes #1711, #1716. Fixes configuration remapping
The actual change is one line at line 64. nextConfMap takes dep instead
of dd.
2014-11-10 01:10:37 -05:00
Eugene Yokota b57152c77e fixes #1719. cached resolution: fixes handling of classifier and other explicit artifacts 2014-11-09 23:32:03 -05:00
Eugene Yokota 05eab70210 expand internal dependencies more accurately 2014-11-06 00:28:26 -05:00
Eugene Yokota 1f49e6a5ce Fixes #1704. Fixes cached resolution + module-level exclusions 2014-11-04 19:01:30 -05:00
Eugene Yokota b60bd95d73 Fixes #1711. Fixes cached resolution pulling in % "test" from subproj deps 2014-11-04 17:56:34 -05:00
Eugene Yokota 4de9c3960d Fixes #1710. Fixed cached resolution mutual eviction
When stitching the minigraphs together only exclude the artifacts that
were evicted in *all* graphs, instead of some graphs.
Consider the following scenario:
- Y1 evicts slf4j-api 1.6.6 and picks 1.7.5
- Y2 evicts slf4j-api 1.7.5 and picks 1.6.6
At the root level, we need to use our own judgement and pick 1.7.5.
2014-11-01 20:50:41 -04:00
Eugene Yokota 6052cd65b4 added comments 2014-10-28 22:31:20 -04:00
Eugene Yokota 55fc4a29c1 Fixes #1699. ignore transitive force during cached resolution
When Ivy translates pom to ivy.xml, it adds force=“true”.
So when both non-Maven dependencies and Maven dependencies are mixed, Maven dependencies always wins, which is the case for scala-library dependency added by the user.
2014-10-28 14:28:33 -04:00
Eugene Yokota d2f2d120a9 Fixes #1684. cached resolution applies overrides on conflict
This change brings over dependency overrides to artificial graph.
However, it seems forced might win, so I need to take overrides logic
in account during conflict resolution.
2014-10-22 19:15:54 -04:00
Josh Suereth 1a38b6902e Revert chain resolver by default, for older behavior.
The issue comes into play where we cannot accurately get a publication date from Maven artifacts, leading to the current
mechanism having undefined behavior and causing other bugs to pop up in resolution.
2014-10-20 12:26:40 -04:00
Eugene Yokota 2d3bb4ca75 Fixes #1677. Provide URLSerializer.
Without this json4s is unable to parse URLs.
2014-10-18 07:15:52 -04:00
Josh Suereth 052fa13e3f Merge pull request #1663 from sbt/wip/avoid-deprecated
enable -deprecation for Scala 2.10
2014-10-12 12:31:08 -04:00
Eugene Yokota 68b3f8d5ed Implement configuration.missingOk to fix updateClassifiers
updateClassifiers sets missingOk to true.
cached resolution wasn’t respecting the looseness.
2014-10-10 17:25:43 -04:00
Eugene Yokota cf4e882ac9 enable -deprecation for Scala 2.10
Enable -deprecation flag to catch old code being use when we migrate
things.
In this commit I moved error to sys.error.
2014-10-10 15:42:26 -04:00
Eugene Yokota 4ef1c5b4f3 Make sure all files exist in minigraph. 2014-10-10 06:50:36 -04:00
Eugene Yokota 61d7b7e426 Use correct stats for cached resolution 2014-10-10 06:40:56 -04:00
Eugene Yokota dc2f6e5c55 Make sure IvyAction.update works 2014-10-10 03:20:12 -04:00
Eugene Yokota 1de783aec6 Fixes #1660
Provide overloads for transitiveScratch and updateClassifiers that work
with IvyActions.updateEither.
2014-10-10 00:34:05 -04:00
Eugene Yokota 832bf601b5 Fixes #1639. Fixes cached resolution interacting with force()
When conflicts are found for a given module, a forced one
is selected before conflict manager kicks in.
The problem is that DependencyDescriptor seems to mark transitive
forced dependency as forced as well,
so the actual forced dependency are sometimes not prioritized.
To work around this, I’ve introduced a mixin called
SbtDefaultDependencyDescriptor, which carries around ModuleID to detect
direct dependencies.
2014-10-09 13:11:13 -04:00
Eugene Yokota c2b4c0ec94 Fixes #1649. Adds exclusion rules into SHA-1 of minigraph path 2014-10-08 17:14:06 -04:00
eugene yokota 855dff21be Merge pull request #1645 from sbt/wip/no-blankies-rebased
Natural whitespace handling for SBT configuration parser AKA 'no more blankies'
2014-10-06 14:27:50 -04:00
eugene yokota fe5a09b7ad Merge pull request #1629 from sbt/wip/less-chatty-errors
Reduce the noise when resolving maven artifacts.
2014-10-06 13:52:51 -04:00
Eugene Yokota 7547a70991 Fixed json serialization turning license into {}. 2014-10-05 04:24:22 -04:00
Josh Suereth 9c447246f6 Remove binary compatibility breakages and migrate new parser features into an internal package. 2014-10-03 14:22:51 -04:00
Jean-Remi Desjardins 83cd45d6f1 Change additional constructor to what it should probably be
I am at a total loss for why this is not compiling.
2014-10-03 14:22:51 -04:00
eugene yokota 8554d11d3d Merge pull request #1635 from sbt/wip/fix-1632
Wip/fix 1632
2014-10-01 14:50:15 -04:00
Josh Suereth c84a5e70c7 Add file existence check for Eugene. 2014-10-01 08:18:09 -04:00