Commit Graph

128 Commits

Author SHA1 Message Date
jvican e1d98a1ec2
Fix sbt/sbt#1518: Handle cross-versioned exclusions
The following PR does two things:

* Removes the unnecessary `SbtExclusionRule` that was introduced to
  exclude artifacts at the project level (and not the dependency level).
  This change was done in an independent class to avoid breaking
  bincompat in 0.13.x series.
* Handle exclusion rules correctly, propagating the cross version to the
  exclusions of the dependencies.

To fix sbt/sbt#1518, this PR takes the avenue taken in
`SbtExclusionRule`, it accepts `GroupArtifactID` which should be the
preferred way to specify dependencies from now on. Unlike
`SbtExclusionRule`, it also supports `ModuleID` for those that want to
exclude a concrete dependency.

`InclExcl` did not have any tests. The following commit also adds a
testing suite for it, showing how the issue it's fixed and how you
should use `exclude` if you're calling directly `ExclusionRule` instead
of passing in `GroupArtifactID` and `ModuleID`.
2017-04-26 23:44:14 +02:00
jvican d42ea869d0
Apply formatting 2017-04-26 22:55:38 +02:00
Eugene Yokota 4b0b3a05f9 Bump to util 1.0.0-M23
I'm now going to use `CacheStore.apply` in `JsonUtil` (used by cached resolution). This gets rid of `fileToStore` parameter from a bunch of classes and simplifies the setup around librarymanagement.
2017-04-17 13:29:02 -04:00
Dale Wijnand 40e34b3e8e
Make RichUpdateReport return Vectors & cuddle sys.error 2017-04-13 10:08:53 +01:00
Dale Wijnand 7f25614d71
Expose more in RichUpdateReport
Fixes #83
2017-04-13 09:28:00 +01:00
Dale Wijnand 80715dfb57
Make ScmInfo devConnection default to None 2017-04-05 15:51:36 +01:00
eugene yokota 6fe4d820ed Merge pull request #81 from eed3si9n/fport/3017
[fport] Fix version parsing
2017-04-04 17:50:58 -07:00
Eugene Yokota 36121bed74 Fix version parsing
Fixes sbt/sbt#3011
2017-04-04 18:34:37 -04:00
Eugene Yokota bb258f42a6 Maven version range improvement
Previously, when the dependency resolver (Ivy) encountered a Maven version range such as `[1.3.0,)`
it would go out to the Internet to find the latest version.
This would result to a surprising behavior where the eventual version keeps changing over time
*even when there's a version of the library that satisfies the range condition*.

This changes to some Maven version ranges would be replaced with its lower bound
so that when a satisfactory version is found in the dependency graph it will be used.
You can disable this behavior using the JVM flag `-Dsbt.modversionrange=false`.

Fixes #2954
Ref #2291 / #2953
2017-04-04 16:22:28 -04:00
Guillaume Martres 0561c12d19 Fix support for published dotty nightly builds
Dotty nightly builds are published to maven, so they end up in
configuration "default", not "compile". We still need to look into
"compile" when dotty is published locally.

You can test this using https://github.com/smarter/dotty-example-project
by updating the sbt version used in project/build.properties and by
replacing "0.1.1-SNAPSHOT" by a nightly version like
"0.1.1-20170109-be64643-NIGHTLY" in build.sbt
2017-04-04 14:01:42 -04:00
Guillaume Martres 45288b5f80 Avoid NullPointerException in sbt.ScalaOverrideTest 2017-04-04 13:18:46 -04:00
Guillaume Martres 9375c88a8b OverrideScalaMediator: fix bootstrapping a Scala compiler
Fixes #2867, #2896
2017-04-04 13:18:32 -04:00
Dale Wijnand 1afe7114e8
Expose RichUpdateReport enrichment 2017-04-03 12:39:52 +01:00
Dale Wijnand 723abc945f
Overload RichUpdateReport#select instead of using default args 2017-04-03 12:39:39 +01:00
Dale Wijnand cbdbf23127
Expose RichUpdateReport & DependencyFilter
Fixes #42
2017-04-03 12:39:39 +01:00
eugene yokota 9cf41bbf36 Merge pull request #77 from dwijnand/ssh-based-repo-apis
Recover lost ssh-based repo API
2017-03-31 10:20:48 -07:00
Dale Wijnand 084c94a93c
Recover lost ssh-based repo API
Recover APIs I accidentally removed in
f2efa10af1.
2017-03-31 15:02:16 +01:00
Dale Wijnand fb049d181b
Add prefix support to Binary/Full 2017-03-31 10:48:45 +01:00
Dale Wijnand 87e8d87811
Allow for some customization in CrossVersion results
The old way to customize CrossVersion results was a `String => String`
function called 'remapVersion', removed in
301ec787f2.

That was removed because it's not possible to serialise Function1s, and
we want to serialise CrossVersion (and therefore ModuleID, etc) to be
able to transfer them in sbt server.

This commit reintroduces a less-powerful way to vary the results of
apply CrossVersion, but just providing the opportunity to define a
suffix. From looking at the users of CrossVersion (Scala.js'
sbt-scalajs-plugin & Scala Native's sbt-crossproject) this looks to be
sufficient.
2017-03-31 10:24:16 +01:00
Dale Wijnand 92cc7c4cb1
Remove some compile warnings 2017-03-31 10:19:47 +01:00
Dale Wijnand ed6b57ff38 Merge pull request #51 from jroper/resolving-debug
Log resolving messages at debug level
2017-03-10 13:48:32 +00:00
Eugene Yokota c793c33740 fix test 2017-02-15 23:41:23 -05:00
Eugene Yokota caecbbabe7 util 1.0.0-M19 2017-02-15 23:12:01 -05:00
Eugene Yokota 27397de8cf Adjust to upstream 2017-01-15 22:54:15 -05:00
Eugene Yokota 95a209b033 Apply binary version conflict check to Compile related configs
Fixes #1466 Ref #2786

Even after fixing the mediator issue, we still have spurious binary
version conflict warning that does not account for sandbox
configurations.

This change follows the scalaVersionConfigs work.
2017-01-15 20:55:02 -05:00
Eugene Yokota c12c9c6187 Apply scalaVersion enforcement to Compile related configs
Fixes #2786. Ref #2634.

sbt 0.13.12 added Ivy mediator that enforces scalaOrganization and
scalaVersion for Scala toolchain artifacts.
This turns out to be a bit too aggressive because Ivy configurations
can be used as an independent dependency graph that does not rely on
the scalaVersion used by Compile configuration. By enforcing
scalaVersion in those graph causes runtime failure.

This change checks if the configuration extends Default, Compile,
Provided, or Optional before enforcing scalaVersion.
2017-01-15 20:52:58 -05:00
eugene yokota c3f5805574 Merge pull request #72 from sbt/fport/2757
[fport] CrossVersion.patch
2017-01-15 20:51:21 -05:00
Miles Sabin f495291edd fport: CrossVersion.patch
CrossVersion.full strips off -bin-suffix.
Ref https://github.com/sbt/sbt/pull/2757
2017-01-15 07:55:40 -05:00
Eugene Yokota 5b752c8522 Adds DefaultLibraryManagement
https://github.com/sbt/sbt/pull/2780/
2017-01-15 03:00:14 -05:00
Eugene Yokota df53eefbb0 Fixes merged ModuleID dropping configuration specification
Fixes #2002/#1500

Given a dependency graph such as:

    libraryDependencies += "com.google.guava" % "guava-tests" % "18.0"
    libraryDependencies += "com.google.guava" % "guava-tests" % "18.0"
% "test" classifier "tests"

previous releases of sbt would drop the Test configuration from the
classifier "tests" artifacts, and end up including the test JARs into
the Compile configuration instead of the Test configuration, which
would result in runtime error.

This fix configures the explicit artifacts into the configuration
during merge even when it says `"*"`.
2017-01-14 07:05:52 -05:00
Eugene Yokota a87ed10dc7
Move ModuleID toString out 2017-01-05 15:42:34 +00:00
Eugene Yokota 4ca5b5ae0a
Change publicationDate to java.util.Calendar
This migrates to java.util.Calendar, which is better than
java.util.Date and is supported by sjson-new out of the box.
2017-01-05 15:42:34 +00:00
Dale Wijnand 71fddd5e3f
Upgrade from sbt/datatype to sbt/contraband 2017-01-05 15:42:29 +00:00
Dale Wijnand 946f307082
Implement JsonFormat[NodeSeq] like it was in IvyCache 2017-01-05 13:42:16 +00:00
eugene yokota b0f97eaa37 Merge pull request #64 from dwijnand/add-back-SbtExclusionRule-companion-implicit-lifts
Add back SbtExclusionRule companion implicit lifts
2016-12-31 00:26:37 -05:00
Dale Wijnand 04904ed34d
Add back SbtExclusionRule companion implicit lifts 2016-12-30 17:11:18 +00:00
Dale Wijnand 19f40a1668
Fix ConfigurationReport.toString
Move the toString implementation from ConfigurationReportExtra to inside
the ConfigurationReport JSON schema definition, that way the synthetic
toString generated by contraband doesn't override the carefully defined
one.
2016-12-28 16:15:13 +00:00
Dale Wijnand e209499544
Avoid source file path clash with generated sources 2016-12-14 10:31:11 +00:00
Dale Wijnand 1bf74ddffa
Make MavenRepository the top level class
Also reintroduce "isCache".
2016-12-06 09:48:23 +00:00
Dale Wijnand af1c19034b
Remove unused imports 2016-11-16 11:17:27 +00:00
Dale Wijnand 3192b3ee1a
Remove unused warnings 2016-11-16 11:14:42 +00:00
Dale Wijnand f6c98f69b9
Organise contraband descriptor by package name & alphabetically 2016-11-16 10:52:42 +00:00
Dale Wijnand b2b606f8aa
Actually, just kill the crazy MyCrazyReferences idea 2016-11-16 10:43:16 +00:00
Dale Wijnand 301ec787f2
Drop "serialising" Function1. It's easily fallible 2016-11-16 10:11:41 +00:00
Dale Wijnand e7ba7fa9a4
Switch to FooFunctions naming convention for contraband companion parents 2016-11-16 09:55:43 +00:00
Dale Wijnand 5475a3c01c
Switch to FooExtra naming convention for contraband parents 2016-11-16 01:41:47 +00:00
Dale Wijnand f2efa10af1
Switch to sbt-datatype, sjson-new & Vectors 2016-11-15 23:59:34 +00:00
James Roper 3cb3d8d221 Log resolving messages at debug level
For great justice.
2016-09-29 19:38:22 +10:00
Miles Sabin cee81e3bb0 Configurable explicit list of artifacts for Scala binary version check 2016-08-22 11:00:09 +01:00
Dale Wijnand 138787f55e Add Resolver.sbtIvyRepo (#49)
.. deprecate & rename SbtPluginRepositoryRoot to SbtRepositoryRoot.
2016-07-15 07:57:04 +01:00