mirror of https://github.com/sbt/sbt.git
This new version of io breaks source and binary compatibility everywhere that uses the register(path: Path, depth: Int) method that is defined on a few interfaces because I changed the signature to register(glob: Glob). I had to convert to using a glob everywhere that register was called. I also noticed a number of places where we were calling .asFile on a file. This is redundant because asFile is an extension method on File that just returns the underlying file. Finally, I share the IOSyntax trait from io in AllSyntax. There was more or less a TODO suggesting this change. The one hairy part is the existence of the Alternative class. This class has unfortunately somehow made it into the sbt package object. While I doubt many plugins are using this, it doesn't seem worth breaking binary compatibility to get rid of it. The issue is that while Alternative is defined private[sbt], the alternative method in IOSyntax is public, so I can't get rid of Alternative without breaking binary compatibility. I'm not deprecating Alternative for now because the sbtProj still has xfatal warnings on. I think in many, if not most, cases, the Alternative class makes the code more confusing as is often the case with custom operators. The confusion is mitigated if the abstraction is used only in the file in which it's defined. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||