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)