Add comments

This commit is contained in:
Alexandre Archambault 2015-06-17 19:27:15 +02:00
parent 31c7c401a5
commit 90aebd0075
1 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,14 @@ object Resolver {
/**
* Try to find `module` among `repositories`.
*
* Look at `repositories` from the left, one-by-one, and stop at first success.
* Else, return all errors, in the same order.
*
* The `module` field of the returned `Project` in case of success may not be
* equal to `module`, in case the version of the latter is not a specific
* version (e.g. version interval). Which version get chosen depends on
* the repository implementation.
*/
def find(repositories: Seq[Repository],
module: Module): EitherT[Task, List[String], (Repository, Project)] = {
@ -126,6 +134,7 @@ object Resolver {
.map(v => v -> Parse.versionConstraint(v))
.partition(_._2.isEmpty)
// FIXME Report this in return type, not this way
if (nonParsedConstraints.nonEmpty)
Console.err.println(s"Ignoring unparsed versions: ${nonParsedConstraints.map(_._1)}")
@ -370,7 +379,7 @@ object Resolver {
/**
* State of a dependency resolution.
*
* Done if `isDone` is `true`.
* Done if method `isDone` returns `true`.
*
* @param dependencies: current set of dependencies
* @param conflicts: conflicting dependencies