traverse called in ResolutionProcess.fetchAll relies on Applicative, so
doesn't guarantee that the module groups will be fetched one after the
other. The Applicative instance of scalaz.concurrent.Task doesn't
parallelize the tasks by default, so it works fine here. But that extra
security ensures that code can be fine with other monads.
The "branching" symbols used to print the tree are UTF-8 characters.
Make the pipe symbol be the matching UTF-8 character to close the tiny gap
between symbols visible in the tree before.
Components of revisions are separated by dots or hyphens.
In case you "end the revision with a `+`" (see [1]), the latest sub-revision of the
dependency module should be selected when resolving dependencies.
Accept revisions such as "1.2+" or "1.2.+" and "1.2.3-+".
Fixes#424.
[1]: http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.html
Ensure everything work fine again with those (things went bad at
1.0.0-RC1, because of the use of directory listings, that may not be
exhaustive in proxies - or may be just empty, e.g. currently with nexus 3)
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.