Commit Graph

178 Commits

Author SHA1 Message Date
Alexandre Archambault 9694d32083 Remove sbt-shading sources
It now lives at https://github.com/coursier/sbt-shading.
2020-05-12 01:00:09 +02:00
Alexandre Archambault 33af97d81e
Warn if legacy cache location ~/.coursier/cache is found (#222) 2020-05-05 19:59:59 +02:00
eugene yokota 0047a9803b
Implement missingOk (#212)
Ref https://github.com/coursier/coursier/issues/1541
Ref https://github.com/sbt/sbt/issues/4707

This adds `missingOk` setting to `CoursierConfiguration`, forwarding the `missingOk` setting in `UpdateConfiguration` from LM API. lmcoursier _not_ respecting this setting is causing various issues on sbt side since the expected behavior of some plugins (including IntelliJ import feature) is that the source JARs missing would not fail the entire operation.
Ideally we should return a partially resolved graph (for example if one out of 20 depdencies are missing source JARs it's still useful), but for now I'm going to return an empty `UpdateReport`.

Co-authored-by: Alexandre Archambault <alexandre.archambault@gmail.com>
2020-05-05 17:35:12 +02:00
Alexandre Archambault f37dd6af0f Support missing coursier.core.Authentication fields 2020-05-03 18:14:32 +02:00
richardgilmore e2876fb23e Allow authenticating via custom HTTP headers 2020-05-03 18:14:28 +02:00
Stephane Landelle b643112c2a
Merge transitive and direct reverse dependencies, close sbt/stb#5484 (#209)
Motivation:

Direct reverse dependencies Map is added into the transitive reverse dependencies Map, so any dependency existing in both Maps loses transitive callers.

This behavior is not consistent with the ivy based lm and is not desirable: the goal is to have the complete callers tree.

Modification:

Merge the 2 maps instead of adding and lose values for conflicting keys.

Result:

Transitive callers are not lost when dependency is also pulled directly.
2020-03-31 15:35:50 +02:00
Cyrille Chépélov 29208b66b9
expose ttl, verbosityLevel, checksums, cachePolicies to SBT (#205) 2020-03-16 12:23:33 +01:00
Dale Wijnand 6157bff6d7
Minor cleanups in SbtUpdateReport (#189)
Use Seq.unapplySeq over .size/.head.  Drop now unnecessary toVector's.
2020-02-06 20:18:06 +01:00
Dale Wijnand 0849574331
Forward classpathOrder into SbtUpdateReport (#187)
* Add a scripted test for "cp order"

* Forward classpathOrder into SbtUpdateReport

* Bump the target sbt version to 1.2.8

* Preserve order all through SbtUpdateReport.moduleReports

* Update scala-jars scripted test

Seems some changes in the way sbt handles the scala-library / reflect /
compiler JARs made it stale…

Co-authored-by: Alexandre Archambault <alexarchambault@users.noreply.github.com>
2020-02-05 19:10:28 +01:00
Dale Wijnand 5bd2db84ee Enable classpath ordering (w/ disable option) (#174) 2020-01-07 22:18:59 +01:00
eugene yokota 44de26435f make scala-tool an exception not the rule (#158)
Fixes https://github.com/coursier/coursier/issues/1442
Fixes https://github.com/coursier/coursier/issues/1340
Ref https://github.com/coursier/sbt-coursier/pull/136

This treats `ScalaTool` (and only `ScalaTool`) as a sandbox configuration isolated from other subprojects. Likely this behavior is needed only for `ScalaTool` configuration where the scala-xml build's `ScalaTool` configuration transitively loops back to scala-xml's `Compile` artifacts. In most other cases, it's desirable to allow "x->compile" relationship.
2019-11-22 18:19:18 +01:00
eugene yokota dc5b9ecd12 Fix UpdateReport to be compatible with dependency-graph (#156)
Fixes https://github.com/coursier/coursier/issues/1375
Ref https://github.com/sbt/sbt/issues/4706 / https://github.com/sbt/sbt/issues/4688
Ref https://github.com/jrudolph/sbt-dependency-graph/issues/178

Currently the UpdateReport returned by Coursier is missing callers from the direct dependencies. This is evident from the fact that `thisModule`'s information is not passed. Another missing information in the UpdateReport is ModuleReport that originates from subproject dependencies (aka inter-project dependencies). These two missing info result in broken rendering for sbt-dependency-graph.

This commit attemps to fix them by passing them through to SbtUpdateReport. See the scripted test for confirmation.
2019-11-21 01:13:53 +01:00
Alexandre Archambault ce2544d776
Use data-class in lm-coursier (#152) 2019-10-18 13:39:03 +02:00
Brice Jaglin 0b193815c8 Switch to coursier-2.0.0-RC4-1 (#151) 2019-10-18 11:50:52 +02:00
Alexandre Archambault b27615cf25
Switch to coursier 2.0.0-RC4 (#148) 2019-10-14 13:52:32 +02:00
Alexandre Archambault 737a767516
Only take inter projects into account in compile config (#136) 2019-09-13 18:05:46 +02:00
Alexandre Archambault 9a1e1d0f89
Add semver reconciliation test (#131) 2019-09-11 13:41:51 +02:00
Alexandre Archambault 43d24c9609
Remove unused methods in lmcoursier.credentials (#123) 2019-08-15 17:33:52 +02:00
Alexandre Archambault f97b0860d3 Less verbose output during shading 2019-08-14 17:28:30 +02:00
Alexandre Archambault 064978ac42 Enable extra strict conflict manager test 2019-08-14 17:28:30 +02:00
Alexandre Archambault 59ec5d2b95 Add strict reconciliation, and versionReconciliation key 2019-08-14 17:28:30 +02:00
Alexandre Archambault ecba0288a6 Switch to coursier 2.0.0-RC3-3 2019-08-14 17:28:22 +02:00
eugene yokota ebe96c613f Include reconciliation to CoursierConfiguration (#112)
Also re-enable sbt-contraband, and deal with Dependency change.
2019-08-09 11:55:57 +02:00
Alexandre Archambault 63ddd4c616
Switch to coursier 2.0.0-RC3-2 (#116) 2019-08-06 17:02:57 +02:00
Alexandre Archambault ab55269e63
Fix 2.0.0-RC3 regression (#113)
Disable classpath ordering of JARs for now

New coursier 2.0.0-RC3 feature, maybe enabled too early here.
2019-08-05 16:03:09 +02:00
Alexandre Archambault aa53418218
Switch to coursier 2.0.0-RC3-1 (#108) 2019-08-03 17:25:30 +02:00
Alexandre Archambault 4a27bd42bc
Fix NoSuchMethodError when using coursier-based sbt launcher (#104) 2019-07-26 15:36:50 +02:00
Alexandre Archambault df3d5c627a
Migrate most scripted tests away from scala 2.11 (#107)
So that they can run with openjdk11 too
2019-07-26 12:07:11 +02:00
Alexandre Archambault e39b9cf55c
Take dependencyOverrides into account in sbt-lm-coursier (#106) 2019-07-23 20:26:00 +02:00
Alexandre Archambault 0400b537f4
Use jarjar library from pants (WIP) (#102)
Seems more maintained than https://github.com/shevek/jarjar
2019-07-12 10:03:59 +02:00
Alexandre Archambault 759d0bff9a
Discard inter-projects when they aren't needed (#101)
Useful in the dotty build in particular
2019-07-11 20:24:06 +02:00
Alexandre Archambault d223389637 Take conflictManager setting into account
Only latest-revision (default) and strict are supported for now.
2019-07-08 17:31:36 +02:00
Alexandre Archambault 50c69c3634 Fix mima checks 2019-07-02 14:01:08 +02:00
Alexandre Archambault 3a69ac7466
Switch to coursier 2.0.0-RC2-4 (#93) 2019-06-27 14:20:33 +02:00
Alexandre Archambault 6be594e52e
Take explicit artifact name and extension into account (#86) 2019-06-26 11:40:39 +02:00
Alexandre Archambault dcc7d87503
Follow http to https redirections by default (#85) 2019-06-21 17:13:32 +02:00
Alexandre Archambault 6185d646af Temporary workaround
Until we bump the coursier version again
2019-06-21 13:44:10 +02:00
Alexandre Archambault 75ac7b6ca1 Switch to coursier 2.0.0-RC2-3 2019-06-21 13:44:10 +02:00
Alexandre Archambault 8185c94b1c Add evicted stuff to update report
Should make evicted work fine from sbt-lm-coursier and sbt itself
2019-06-19 17:16:09 +02:00
Alexandre Archambault 7bf70bce97 Clean-up update report 2019-06-19 17:16:09 +02:00
Daniel Capo Sobral bc38ddc252 Log output of dependency information tasks instead of printing (#82)
This allows use of "last-grep" to filter the output.

Fixes https://github.com/coursier/coursier/issues/1191
2019-06-13 00:58:35 +02:00
Alexandre Archambault bed2d2dd28
Easier bin compat for stuff under lmcoursier.definitions (#73) 2019-05-28 12:48:16 +02:00
Alexandre Archambault 4f41e866fd Missing item in cache key? 2019-05-27 14:47:09 +02:00
Alexandre Archambault 8bca7041f4 Get name and extension from resolution
Fixes https://github.com/coursier/coursier/issues/419
2019-05-24 17:43:12 +02:00
Alexandre Archambault 24dabbf5b6 Bump coursier 2019-05-24 17:43:12 +02:00
Alexandre Archambault 5436809323 Take ivyPaths into account 2019-05-23 10:50:55 +02:00
Alexandre Archambault d94503446e Make CoursierConfiguration easier to edit 2019-05-23 10:49:37 +02:00
eugene yokota 745894efc5 Handle whitespace in file resolver path (#68)
Fixes https://github.com/coursier/coursier/issues/1175
2019-05-21 10:03:27 +02:00
Alexandre Archambault 1499a15730
Ensure we write api URL info in ivy.xml (#66) 2019-05-13 23:48:22 +02:00
Alexandre Archambault 5739ea7b60 Have sbt-lm-coursier rely on lm-coursier-shaded by default 2019-04-26 10:20:59 +02:00
Alexandre Archambault 3f6c4c3831 Remove last references to coursier modules in sbt-coursier-shared 2019-04-26 10:20:59 +02:00
Alexandre Archambault 48f7aa41dc Allow to evolve l.d.Attributes while maintaining bin compat 2019-04-26 10:20:59 +02:00
Alexandre Archambault 16bf1570ad Rely on allExcludeDependencies when it's there
It excludes sbt itself in meta-builds in particular, see https://github.com/coursier/coursier/issues/1128
2019-04-26 10:20:59 +02:00
Alexandre Archambault 6bdd0f985a Vendor more stuff in lmcoursier, shade coursier in it
Along with shapeless, argonaut, argonaut-shapeless that coursier depends
on now.
2019-04-25 16:34:08 +02:00
Alexandre Archambault d6858b4857 Make most things private in lm-coursier
And as much as possible, have sbt-coursier-shared and sbt-lm-coursier
use as few as possible things from coursier itself and lm-coursier.
2019-04-25 16:34:08 +02:00
Alexandre Archambault 736d5c11c5
Switch to coursier 1.1.0-M14-2 (#60) 2019-04-25 15:35:38 +02:00
Alexandre Archambault ed38df56f5 Remove unnecessary setting 2019-04-04 18:43:50 +02:00
Alexandre Archambault 73c5d9737d Handle credentials key from global settings 2019-04-04 18:43:50 +02:00
Alexandre Archambault 2c6a6503f1 Add back former coursierCredentials key
Not to break compatibility with former plugins
2019-04-04 18:43:50 +02:00
Alexandre Archambault 973cce68ad Rework / simplify credentials handling 2019-04-04 18:43:50 +02:00
Alexandre Archambault 84d8d7ac38 Switch to coursier 1.1.0-M14 2019-04-04 18:43:50 +02:00
Alexandre Archambault 8f3401788e
Use fallback logger in in CI and all (#52) 2019-03-22 18:53:09 +01:00
Eric Peters 33aa61e8eb Parse Ivy-compatible RawRepository resolvers (#49) 2019-03-22 11:07:35 +01:00
Alexandre Archambault b8befa4ec7
Tweak global plugins handling (#47)
Seems the changes of
3eb210eb1b
were missing bits to handle the configurations of the global-plugins
project.
2019-03-15 19:02:44 +01:00
Alexandre Archambault 1c28e8fb6b
Switch to coursier 1.1.0-M13-1 (#45) 2019-03-07 15:35:35 +01:00
Alexandre Archambault def85e3ddc Add sbt-dotty test
And take scalaModuleInfo.overrideScalaVersion into account.
Also requires the loosened cross version application of the previous
commit.
2019-03-06 11:39:53 +01:00
Alexandre Archambault 5ea339c6f3 Only add cross version suffixes when necessary
From CoursierDependencyResolution
2019-03-06 10:59:35 +01:00
Alexandre Archambault dbcbad7e2b Switch to coursier 1.1.0-M13 2019-03-06 10:59:35 +01:00
Alexandre Archambault 22e194db90 Temporary workaround for coursier-based sbt launcher
Seems reload reloads sbt from the same classloader, which leaves the in
memory cache as is. When update is called, things are then picked from
the cache, and nothing gets logged, which makes the test fail.
2019-03-06 10:59:35 +01:00
Alexandre Archambault d852209172 Tweak tests
Most of those adjustments are required when using the coursier-based sbt
launcher.
2019-03-04 12:19:52 +01:00
Alexandre Archambault dab476ab93 Add extra check
The size == 1 check just below is required for scripted to work fine.
(The first module report must correspond to the passed dependency for
scripted to find the sbt launcher JAR.)

It seems under some conditions, the sbt launcher dependency ends up
being duplicated (it's already duplicated in the allDependencies task,
that should be set by sbt). This in turn makes the check fail, and makes
scripted not find the sbt launcher. This happens with
playframework/interplay at commit d782b75.

The call to distinct circumvents that case.
2019-03-04 12:19:52 +01:00
Alexandre Archambault d21d388e85 Temporary workaround 2019-02-26 15:43:24 +01:00
Alexandre Archambault 9bd17e0fdd Switch to coursier 1.1.0-M12, use high level API 2019-02-26 13:37:30 +01:00
Alexandre Archambault 399e84efd5 Warn in case of source dependencies where sbt-coursier isn't enabled 2019-02-18 14:03:54 +01:00
Alexandre Archambault 8e4fb146d8 Unused import 2019-02-18 14:03:54 +01:00
Alexandre Archambault 3eb210eb1b Less flaky handling of special project org.scala-sbt:global-plugins 2019-02-18 14:03:54 +01:00
Alexandre Archambault 7c5b8479ea Adjust dependency graph printing 2019-02-13 10:04:54 +01:00
Alexandre Archambault bb45ca7f5d Renaming 2019-02-06 15:22:58 -08:00
Alexandre Archambault 1390d319b1 Instantiate logger earlier, only keep one instance around
The loggers are now supposed to be re-usable (which simplifies their
handling)
2019-02-06 15:22:52 -08:00
Alexandre Archambault bc69e0b11a Start to use bits of the high level API of coursier
Its parameters mostly
2019-02-06 15:22:42 -08:00
Alexandre Archambault 4226df911d Switch to coursier 1.1.0-M11-1 2019-02-06 15:20:51 -08:00
Alexandre Archambault 697d84ea1a Switch to coursier 1.1.0-M10 2019-02-01 00:52:59 +01:00
Alexandre Archambault 8d568af4d9
Automatically add maven-plugin to classpathTypes for sbt plugins (#28) 2019-01-16 17:03:17 +01:00
Scala steward 2d8e389787 Update paradise to 2.1.1 (#23) 2019-01-13 23:52:53 +01:00
Alexandre Archambault 6b1a84c563
Add addSbtCoursier helper to sbt-lm-coursier too (#16) 2018-12-12 11:19:05 +01:00
Alexandre Archambault 3987ba9af6
Don't write version intervals in update reports (#12) 2018-11-29 17:01:40 +01:00
Alexandre Archambault 0fcacffc6b Mention former implementations 2018-11-27 11:40:02 +01:00
Alexandre Archambault a1dd332d4e Move remaining sbt-coursier specific tests 2018-11-22 14:23:50 +01:00
Alexandre Archambault 3b8e2f42cd Allow to tweak logger from sbt-lm-coursier too 2018-11-22 14:14:35 +01:00
Alexandre Archambault 40489f7fee Add credentials support to sbt-lm-coursier 2018-11-22 13:52:59 +01:00
Alexandre Archambault 3cbb1e3c2e Tweak scala organization handling in sbt-lm-coursier 2018-11-22 13:08:24 +01:00
Alexandre Archambault 5bf5058c31 Add profile handling to sbt-lm-coursier 2018-11-22 13:07:57 +01:00
Alexandre Archambault d898c79b54 Dummy refactoring / comment 2018-11-22 10:20:29 +01:00
Alexandre Archambault da58ebdaf8 Does this break anything? Let's see!! 2018-11-22 10:20:29 +01:00
Alexandre Archambault d17a2ca03f Make an updateClassifiers-related scripted test pass
That was painful…

Update depending on how https://github.com/sbt/sbt/pull/4459 goes
2018-11-21 15:29:50 +01:00
Alexandre Archambault 79cfba07ad Adjust scala-library JAR handling 2018-11-21 14:15:45 +01:00
Alexandre Archambault e8cd2bbfaf Move scripted tests ok with sbt-lm-coursier 2018-11-21 14:14:45 +01:00
Alexandre Archambault da2c0f5f1f Handle explicit URLs from sbt-lm-coursier 2018-11-21 13:21:41 +01:00
Alexandre Archambault 0289895584 Fix some updateSbtClassifiers-related stuff 2018-11-21 11:18:35 +01:00
Alexandre Archambault d729586e3a Use resolver stuff of sbt-coursier from sbt-lm-coursier
Makes more scripted tests pass
2018-11-21 11:13:30 +01:00