From 4bae8b3acb3420173a3ce11a596686fa8a3ceb6d Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sat, 27 Jun 2015 05:56:43 -0400 Subject: [PATCH] Fixes #1973. Renames distinct to distinctName --- notes/0.13.9/distinct-rename.markdown | 11 +++++++++++ util/io/src/main/scala/sbt/Path.scala | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 notes/0.13.9/distinct-rename.markdown diff --git a/notes/0.13.9/distinct-rename.markdown b/notes/0.13.9/distinct-rename.markdown new file mode 100644 index 000000000..96169f13a --- /dev/null +++ b/notes/0.13.9/distinct-rename.markdown @@ -0,0 +1,11 @@ + + [@eed3si9n]: http://github.com/eed3si9n + [1973]: https://github.com/sbt/sbt/issues/1973 + +### Fixes with compatibility implications + +### Improvements + +- Renames `distinct` method on `PathFinder` to `distinctName`. [#1973][1973] by [@eed3si9n][@eed3si9n] + +### Bug fixes diff --git a/util/io/src/main/scala/sbt/Path.scala b/util/io/src/main/scala/sbt/Path.scala index cd28ed406..274ff8f13 100644 --- a/util/io/src/main/scala/sbt/Path.scala +++ b/util/io/src/main/scala/sbt/Path.scala @@ -173,7 +173,13 @@ sealed abstract class PathFinder { * Create a PathFinder from this one where each path has a unique name. * A single path is arbitrarily selected from the set of paths with the same name. */ - def distinct: PathFinder = PathFinder { get.map(p => (p.asFile.getName, p)).toMap.values } + def distinctName: PathFinder = PathFinder { get.map(p => (p.asFile.getName, p)).toMap.values } + + /** + * Same as distinctName. + */ + @deprecated("Use distinctName", "0.13.9") + def distinct: PathFinder = distinctName /** Constructs a string by evaluating this finder, converting the resulting Paths to absolute path strings, and joining them with the platform path separator.*/ final def absString = Path.makeString(get)