From 90aebd0075974494746ba884db22ee82d4596d5b Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Wed, 17 Jun 2015 19:27:15 +0200 Subject: [PATCH] Add comments --- core/src/main/scala/coursier/core/Resolver.scala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/coursier/core/Resolver.scala b/core/src/main/scala/coursier/core/Resolver.scala index c0b486daf..3ef6ebb3d 100644 --- a/core/src/main/scala/coursier/core/Resolver.scala +++ b/core/src/main/scala/coursier/core/Resolver.scala @@ -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