-
Notifications
You must be signed in to change notification settings - Fork 1
/
scala_io.diff
150 lines (135 loc) · 6.86 KB
/
scala_io.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
diff --git a/core/src/main/scala/scalax/io/CloseableIterator.scala b/core/src/main/scala/scalax/io/CloseableIterator.scala
index 03819c0..fe3d0a6 100644
--- a/core/src/main/scala/scalax/io/CloseableIterator.scala
+++ b/core/src/main/scala/scalax/io/CloseableIterator.scala
@@ -74,7 +74,7 @@ private[io] class CloseableIteratorOps[+A](val iter: CloseableIterator[A]) {
def zipAll[B, A1 >: A, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1): CloseableIterator[(A1, B1)] =
Proxy(iter.zipAll(that,thisElem,thatElem))
def zipWithIndex: CloseableIterator[(A, Int)] {var idx: Int} = {
- val zipped = iter.zipWithIndex
+ val zipped = CloseableIteratorOps(iter).zipWithIndex
new Proxy[(A, Int),Iterator[(A, Int)] {var idx: Int}](zipped) {
var idx = zipped.idx
}
@@ -189,4 +189,4 @@ private[io] class InitIterator[@specialized(Byte) +A](iter:CloseableIterator[A])
}
def doClose = iter.close()
-}
\ No newline at end of file
+}
diff --git a/file/src/main/scala/scalax/file/ramfs/RamPath.scala b/file/src/main/scala/scalax/file/ramfs/RamPath.scala
index c19bcf5..8d3bdb5 100644
--- a/file/src/main/scala/scalax/file/ramfs/RamPath.scala
+++ b/file/src/main/scala/scalax/file/ramfs/RamPath.scala
@@ -130,7 +130,7 @@ class RamPath(relativeTo: String, val path: String, override val fileSystem: Ram
d.children.map(n => parent / n.name)
case p =>
throw new NotDirectoryException(p+" is not a directory so descendants can not be called on it")
- }.flatten.toIterator
+ }.toIterator.flatten
})
}
diff --git a/project/Build.scala b/project/Build.scala
index 64b94e9..1fba2a3 100644
--- a/project/Build.scala
+++ b/project/Build.scala
@@ -6,16 +6,16 @@ object BuildConstants {
val organization = "com.github.scala-incubator.io"
val version = "0.4.0"
val armVersion = "1.1"
- val armScalaVersion = "2.9.1"
+ val armScalaVersion = "2.10.0-virtualized-SNAPSHOT"
val akkaVersion = "2.0.1"
- val scalaVersion = "2.9.2"
+ val scalaVersion = "2.10.0-virtualized-SNAPSHOT"
}
object ScalaIoBuild extends Build {
// ----------------------- Root Project ----------------------- //
lazy val root:Project = Project("root", file(".")).
- aggregate(coreProject,fileProject,perfProject,webSiteProject).
+ aggregate(coreProject,fileProject).
settings(sharedSettings ++ Seq(publishArtifact := false, name := "Scala IO") :_*)
// ----------------------- Samples Settings ----------------------- //
@@ -49,6 +49,9 @@ object ScalaIoBuild extends Build {
val sharedSettings = Seq[Setting[_]](
//scalaHome := Some(file("/Volumes/Box/ScalaProject/scala-full/dists/scala-2.9.2.r25667-b20110921211926")),
+ scalaHome := None,
+ //needed because Sbt first tries to resolve the dependency and only then uses scalaHome...
+ resolvers += "Local Maven Repository" at Path.userHome.asURL + "/.m2/repository",
organization := BuildConstants.organization,
version := BuildConstants.version,
licenses := Seq("Scala License" -> url("http://www.scala-lang.org/node/146")),
@@ -106,14 +109,14 @@ object ScalaIoBuild extends Build {
// ----------------------- Performace Project ---------------------//
- val perfSettings: Seq[Setting[_]] = Seq(
- name := "scala-io-performance",
- libraryDependencies += "com.github.jsuereth" %% "sperformance" % "0.1",
- publishArtifact := false
- )
- lazy val perfProject = Project("perf", file("perf")).
- settings (samplesSettings ++ sharedSettings ++ perfSettings : _*).
- dependsOn(coreProject,coreProject % "compile->test", fileProject % "compile->test")
+ // val perfSettings: Seq[Setting[_]] = Seq(
+ // name := "scala-io-performance",
+ // libraryDependencies += "com.github.jsuereth" %% "sperformance" % "0.1",
+ // publishArtifact := false
+ // )
+ // lazy val perfProject = Project("perf", file("perf")).
+ // settings (samplesSettings ++ sharedSettings ++ perfSettings : _*).
+ // dependsOn(coreProject,coreProject % "compile->test", fileProject % "compile->test")
// ------------------------------ Docs Project ------------------------------ //
@@ -131,21 +134,21 @@ object ScalaIoBuild extends Build {
model.buildSite
}
- lazy val Docs = config("docs") extend (Compile)
- val docsSettings = inConfig(Docs)(Defaults.configSettings) ++ Seq[Setting[_]](
- name := "scala-io-docs",
- scalacOptions in Docs ++= Seq("-doc-title", "Scala IO"),//, "–doc-source-url", "https://raw.github.com/jesseeichar/scala-io/master/core/src/main/scala/"),
- resourceDirectory := new File("documentation/src/main/resources"),
- //siteDir <<= baseDirectory map { base => new File(base, "target/website") },
- siteDir := new File("/Users/jeichar/Sites/scala-io-doc/"),
- SiteTask,
- docsSite in Docs <<= (docsSite in Docs).dependsOn(doc in Docs),
- sources in Docs <<=
- (sources in (coreProject,Compile),
- sources in (fileProject,Compile)) map { _ ++ _ }
- )
- lazy val webSiteProject:Project = Project("docs", file("documentation")).
- dependsOn(coreProject, fileProject, fileProject % "docs->compile").
- settings(sharedSettings ++ docsSettings :_*)
+ // lazy val Docs = config("docs") extend (Compile)
+ // val docsSettings = inConfig(Docs)(Defaults.configSettings) ++ Seq[Setting[_]](
+ // name := "scala-io-docs",
+ // scalacOptions in Docs ++= Seq("-doc-title", "Scala IO"),//, "–doc-source-url", "https://raw.github.com/jesseeichar/scala-io/master/core/src/main/scala/"),
+ // resourceDirectory := new File("documentation/src/main/resources"),
+ // //siteDir <<= baseDirectory map { base => new File(base, "target/website") },
+ // siteDir := new File("/Users/jeichar/Sites/scala-io-doc/"),
+ // SiteTask,
+ // docsSite in Docs <<= (docsSite in Docs).dependsOn(doc in Docs),
+ // sources in Docs <<=
+ // (sources in (coreProject,Compile),
+ // sources in (fileProject,Compile)) map { _ ++ _ }
+ // )
+ // lazy val webSiteProject:Project = Project("docs", file("documentation")).
+ // dependsOn(coreProject, fileProject, fileProject % "docs->compile").
+ // settings(sharedSettings ++ docsSettings :_*)
-}
\ No newline at end of file
+}
diff --git a/project/build.properties b/project/build.properties
new file mode 100644
index 0000000..390c1af
--- /dev/null
+++ b/project/build.properties
@@ -0,0 +1 @@
+sbt.version=0.11.3
\ No newline at end of file
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 4746fc6..ce4add5 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,6 +1,6 @@
resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
-addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
+//addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"