Skip to content

Commit 3e3ec82

Browse files
Add memory flags
* . * [autofix.ci] apply automated fixes * . * . * [autofix.ci] apply automated fixes * . * . * [autofix.ci] apply automated fixes * . * . * . --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 4daf2c9 commit 3e3ec82

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

build.mill

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//| mill-version: 1.1.0
22
//| mill-jvm-version: 21
3+
//| mill-jvm-opts: ["-Xmx1g", "-Xms256m", "-Xss2m"]
34
//| mvnDeps:
45
//| - io.github.quafadas:millSite_mill1_3.8:0.0.56
56
//| - com.goyeau::mill-scalafix::0.6.0

scautable/test/src/io/github/quafadas/scautable/BigCsvFromString.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ import io.github.quafadas.table.TypeInferrer
99
import munit.FunSuite
1010

1111
class CsvFromBigStringSuite extends FunSuite:
12-
12+
1313
test("fromString should handle duplicated headers by parsing correctly but warn at compile time") {
14+
1415
inline val csvContent =
1516
"colA,col2,col3,col4,col5,col6,col7,col8,col9,col10,col11,col12,col13,col14,col15,col116,col17,col18,col19,col20,col21,col22,col23,col24,col25,colA,col2,col3,col4,col5,col6,col7,col8,col9,col10\n1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3"
17+
1618
val csvIterator = CSV.fromString(
1719
csvContent,
1820
HeaderOptions.FromRows(1),
@@ -61,3 +63,4 @@ class CsvFromBigStringSuite extends FunSuite:
6163
assertEquals(row.colA, 1)
6264
assert(!csvIterator.hasNext)
6365
}
66+
end CsvFromBigStringSuite

site/docs/buildNotes.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,15 @@ Now that we know this, it's easy enough to work around in a few ways. Here's one
3535
trait ShareCompileResources extends ScalaModule {
3636
override def compileResources = super.compileResources() ++ resources()
3737
}
38-
```
38+
```
39+
40+
## Memory
41+
42+
Scautable makes the compiler do some heavy lifting. For large CSV files you may need to increase the memory available to the compiler.
43+
44+
In mill you can do this by adding JVM options to your `build.mill` file like so:
45+
46+
```scala
47+
//| mill-jvm-opts: ["-Xmx1g", "-Xms256m", "-Xss2m"]
48+
```
49+
In other tools, such as scala-cli, you may be able do this by setting the `JAVA_OPTS` environment variable - we need to make sure, that _the compiler_ is getting the extra memory, not just the execution of the program - be sure to check your tools documentation for how to do this.

0 commit comments

Comments
 (0)