Commit Graph

130 Commits

Author SHA1 Message Date
P. Oscar Boykin f003314317 Add a Task.tailRecM for stack safe loops (#846) 2018-04-28 12:00:09 +02:00
Dorothy Ordogh c469899040 Copy local artifact to cache (#831) 2018-04-26 11:16:09 +02:00
Alexandre Archambault 817d6b6d44 Remove now unnecessary helper functions
They were useful on Java 6, and aren't anymore now that we require Java >= 8
2018-03-19 10:48:50 +01:00
Alexandre Archambault c98393838a Use coursier.util.Task more in tests 2018-03-12 21:50:35 +01:00
Alexandre Archambault 13eda41fa2 Remove former JS-only coursier.Task 2018-03-12 21:50:35 +01:00
Alexandre Archambault 87e5f33754 Add coursier.util.Task 2018-03-12 21:50:35 +01:00
Alexandre Archambault dc2e4996f4 Require Java 8 from now on 2018-03-12 21:50:35 +01:00
Alexandre Archambault 5bd162d5fe Tweak scalac options 2018-03-12 21:50:35 +01:00
Alexandre Archambault 29f8d7b680 Remove scalaz dependency from core and cache, add scalaz-interop module 2018-03-12 21:50:35 +01:00
Alexandre Archambault fb5a2fde12 Merge cache and fetch-js projects 2018-03-12 20:50:22 +01:00
Ruben Berenguel cf365ea27a Resets the connection (and sets partial download to false) if the range is not satisfiable by the server (#795) 2018-03-12 11:19:57 +01:00
Yi Cheng a7605ff900
Retry on ChecksumError (#797)
Fix for #780
2018-03-10 12:57:47 -08:00
Alexandre Archambault f4fe44fe2c Clean-up helper method to fully read InputStream 2018-03-03 15:09:02 +01:00
Alexandre Archambault ca62830d23 Add coursier.util.Schedulable 2018-03-03 15:09:02 +01:00
Alexandre Archambault 838a340b89 Remove deprecated stuff 2018-03-03 14:57:14 +01:00
Alexandre Archambault a83df3e1c8 Add coursier.util.ValidationNel 2018-03-03 14:55:46 +01:00
Yi Cheng 015e906481
Remove deprecation prior to 1.1.0-SNAPSHOT and clarify versioning and deprecation strategy (#800)
Version was bumped to 1.1.0-SNAPSHOT and backward compatiliby was removed for up to 1.0.2 at 0123a37, so it should be safe to remove all the deprecations.
2018-03-02 11:39:44 -08:00
Alexandre Archambault 1816b25b84 Stop using scalaz.{EitherT, \/}
Use scala.Either instead of \/

Use the custom coursier.util.EitherT instead of scalaz.EitherT
2018-02-22 18:20:34 +01:00
Yi Cheng 1296459de3 Add Pants build tool (#709) 2017-12-11 17:50:04 +01:00
Tobi Akomolede AKA Mocuto da7fd6585f Fix for: Coursier not resilient to changing local ivy cache directory #665 (#705)
* https://github.com/coursier/coursier/issues/665
2017-12-06 18:20:57 +01:00
Gilad Hoch 10c65c6062 added acceptense for more possible forms of checksum patterns (#640)
added acceptance for more possible forms of checksum patterns
2017-08-17 18:31:20 +02:00
Lars Hupel fdd88f44f1 fix infinite recursion 2017-08-15 07:53:38 +02:00
Gabor Aranyossy dd3e8be410 introducing sha-256 checksum support (#625)
introducing sha-256 checksum support
2017-08-04 16:23:22 +02:00
Alexandre Archambault 4ed2e2a261 Tweak display
Simply display an empty progress bar when size is unknown
2017-07-22 17:29:30 +02:00
Alexandre Archambault 3c1d99e64f Some cleanup 2017-06-24 15:22:01 +02:00
Alexandre Archambault 245a8c9e9e Tweak error message 2017-06-24 15:22:00 +02:00
Alexandre Archambault 9e7cc6dec4 Have boostraps use the main coursier cache 2017-06-09 18:13:13 +02:00
Alexandre Archambault 61eec1ef90 Dummy refacto / fix 2017-06-06 18:01:29 +02:00
Alexandre Archambault 4cdd95b37e Really close http connections 2017-06-06 18:01:28 +02:00
Alexandre Archambault 3ac230f0be Watch downloads from other coursier
Rather than failing with lock error
2017-06-06 18:01:24 +02:00
Alexandre Archambault 18be2e2dd2 Add support for binary checksum files 2017-05-30 16:59:46 +02:00
Alexandre Archambault a8c7ab3f03 Minor refacto 2017-05-30 16:59:45 +02:00
Alexandre Archambault 2f0eb1dba8 wuw 2017-05-11 17:48:44 +02:00
Alexandre Archambault 9428d0343f Use more sound default cache policy in API 2017-05-05 18:35:17 +02:00
Alexandre Archambault 3b111fa1eb Fix compilation warnings 2017-05-03 00:44:45 +02:00
Alexandre Archambault 869d7c628e Retry downloads if an SSLException is caught 2017-04-21 15:32:45 +02:00
Alexandre Archambault 68b9eeeda8 Don't use missing directory listing fallback if it can be avoided
If the POM is in cache, but not the directory listing (nor a .error file for it), the LocalUpdate and LocalUpdateChanging policies make MavenRepository do as if the directory listing is missing - it is not even checked with the subsequent cache policies if any (because the POM was found with LocalUpdate / LocalUpdateChanging in the first place).

This PR fixes that - getting the POM will fail if the directory listing or an error file for it is missing from cache. That way, subsequent cache policies can fetch the directory listing.

As this only happens depending on what's in cache, it's a bit cumbersome to test as is. Relying fully on NIO2 in subsequent coursier versions should make it easier to add test cases for that (by using a virtual fs like jimfs to test what happens depending on what's in cache).

The test should basically do:

    $ coursier fetch org.apache.maven:apache-maven:3.3.9 # fill cache
    $ rm -f $CACHE_PATH/https/repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/.directory
    $ rm -f $CACHE_PATH/https/repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/..directory.checked
    $ coursier fetch org.apache.maven:apache-maven:3.3.9

 The second fetch should work fine, fetching the directory listing, seeing that it lists no JAR, and then not attempting to download one. Before this commit, the second attempt would assume that the directory listing is not available, do without it, so assume that a JAR exists, and fail to download it.
2017-04-18 18:31:37 +02:00
Alexandre Archambault f9de965638 Minor tweaking 2017-04-18 18:31:29 +02:00
Alexandre Archambault b54438c1ba Add fallback if directory listings are not available 2017-04-04 14:45:06 +02:00
Alexandre Archambault 79e60f17ca Fix one-arg deprecated annotation warnings 2017-03-27 16:16:17 +02:00
Jentsch 363a841f5a Replaced linesIterator by not deprecated lines method 2017-03-23 21:07:50 +01:00
Jentsch 7caee99846 Prevent compiler from inferring existential 2017-03-23 21:07:50 +01:00
Alexandre Archambault a84057f792 Ensure no progress stuff if printed...
after progress report is stopped

just in case
2017-02-27 15:54:56 +01:00
Alexandre Archambault 21ba9888a5 Flush output after progress bars
Should fix some progress info not being cleared
2017-02-21 15:57:39 +01:00
Alexandre Archambault 9ece419bc8 Take into account COURSIER_PROGRESS the right way
COURSIER_PROGRESS=true was disabling progress bars before that
2017-02-21 15:57:38 +01:00
Alexandre Archambault 643c6d2201 Don't keep directory listing downloads in sight 2017-02-13 19:19:39 +01:00
Alexandre Archambault 035391f647 Add missing language.implicitConversions imports 2017-02-04 16:36:52 +01:00
Alexandre Archambault d277153777 Annotate all case classes with final 2017-02-04 16:36:52 +01:00
Alexandre Archambault fe529fb9f4 Switch to Java 6 2016-11-27 17:37:39 +01:00
Alexandre Archambault 73243f54e3
Fix minor TermDisplay glitch
Display cleaning possibly made too early
2016-11-07 12:27:58 +01:00