-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option preserveExecutable to IO.copyFile and IO.copyDirectory #53
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default params made it impossible to evolve the old IO. We should learn from that and add overloads here.
You can evolve by just appending to the end. These methods have 3 optional booleans, how would you like to overload them? |
def copy(sources: Traversable[(File, File)]): Set[File]
def copy(sources: Traversable[(File, File)], options: CopyOption): Set[File]
def copy(sources: Traversable[(File, File)],
overwrite: Boolean,
preserveLastModified: Boolean,
preserveExecutable: Boolean): Set[File] where CopyOption is defined using Contraband. |
Look to be no longer necessary: > ++2.10.6 [info] Setting Scala version to 2.10.6 on 2 projects. [info] Reapplying settings... [info] Set current project to IO Root (in build file:/d/sbt-io/) > show io/scalacOptions [info] * -encoding [info] * utf8 [info] * -deprecation [info] * -feature [info] * -unchecked [info] * -Xlint [info] * -language:higherKinds [info] * -language:implicitConversions [info] * -Xfuture [info] * -Yinline-warnings [info] * -Yno-adapted-args [info] * -Ywarn-dead-code [info] * -Ywarn-numeric-widen [info] * -Ywarn-value-discard [info] Total time: 0 s, completed 30-Jun-2017 12:37:08
Fixes sbt/sbt#944 Modified forward port of sbt/sbt@1e61b9a Modified because it switches to using a CopyOptions contraband record and overloading.
@eed3si9n Done, but I'm concerned about the impact it has on users migrating from sbt 0.13 to sbt 1... Lemme know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect
There might be some source breakages if ppl relied on the default params, but I think we did the best we can to make this evolvable, so I think it's an okay compromise. |
Fixes sbt/sbt#944
Forward port of
sbt/sbt@1e61b9a
Part of sbt/sbt#2384