Skip to content

Commit 132761b

Browse files
authored
Set config to avoid CodeCache full problems (#5090)
Solves #4522. As far as I can tell, the problem is simply high codecache memory usage due to the different versions of the Scala compiler we have running around in classloaders, but we're not actually leaking anything (at least since #5079 and #5080 and #5082). So we just bump up the codecache memory limit to make the problem go away Also moved some scattered config files to the `//|` YAML header. This needed fixes in `mill.bat`'s version header parsing to work. `.mill-jvm-version` cannot be moved to the yaml header due to `ClassCastException`, which I fixed in the code but will need a re-bootstrapping to make use of in Mill's own build
1 parent a132f8a commit 132761b

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

.mill-opts

Lines changed: 0 additions & 1 deletion
This file was deleted.

build.mill

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//| mill-version: 0.13.0-M2-59-17fa7b
2+
//| mill-jvm-opts: ["-XX:NonProfiledCodeHeapSize=250m", "-XX:ReservedCodeCacheSize=500m"]
3+
//| mill-opts: ["--jobs=0.5C"]
24

35
package build
46

mill.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if [!MILL_VERSION!]==[] (
6666
set /p MILL_VERSION=<.config\mill-version
6767
) else (
6868
if not "%MILL_BUILD_SCRIPT%"=="" (
69-
for /f "tokens=1-2*" %%a in ('findstr /r "[/][/][|] *mill-version: *" %MILL_BUILD_SCRIPT%') do (
69+
for /f "tokens=1-2*" %%a in ('findstr /C:"//| mill-version:" %MILL_BUILD_SCRIPT%') do (
7070
set "MILL_VERSION=%%c"
7171
)
7272
)

runner/launcher/src/mill/launcher/MillProcessLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static List<String> loadMillConfig(String key) throws Exception {
115115
"yaml-config-" + key, mill.constants.Util.readYamlHeader(buildFile), () -> {
116116
Object conf = mill.launcher.ConfigReader.readYaml(buildFile);
117117
if (!(conf instanceof Map)) return new String[] {};
118-
Map<String, List<String>> conf2 = (Map<String, List<String>>) conf;
118+
Map<String, Object> conf2 = (Map<String, Object>) conf;
119119

120120
if (!conf2.containsKey(key)) return new String[] {};
121121
if (conf2.get(key) instanceof List) {

scripts/src/mill.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if [!MILL_VERSION!]==[] (
6666
set /p MILL_VERSION=<.config\mill-version
6767
) else (
6868
if not "%MILL_BUILD_SCRIPT%"=="" (
69-
for /f "tokens=1-2*" %%a in ('findstr /r "[/][/][|] *mill-version: *" %MILL_BUILD_SCRIPT%') do (
69+
for /f "tokens=1-2*" %%a in ('findstr /C:"//| mill-version:" %MILL_BUILD_SCRIPT%') do (
7070
set "MILL_VERSION=%%c"
7171
)
7272
)

0 commit comments

Comments
 (0)