From f23ef17443a6c64f2182ec5ba45bc89ba7f009e2 Mon Sep 17 00:00:00 2001 From: Daniel Marcotte Date: Mon, 24 Aug 2026 18:11:49 +0200 Subject: [PATCH 1/4] Restrict native-image resource demands We were blowing up CI because native-image was asking for a memory allocation based on the machine it was running on, rather than the resources it was granted on that machine. Restrict to values that we know will fit in the overhead we are granted. --- kson-lib/build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kson-lib/build.gradle.kts b/kson-lib/build.gradle.kts index 4f38a0027..b57153844 100644 --- a/kson-lib/build.gradle.kts +++ b/kson-lib/build.gradle.kts @@ -329,6 +329,10 @@ tasks.register("buildWithGraalVmNativeImage") { buildList { add(nativeImageExe.absolutePath) + // Restrict the resources `native-image` tries to reserve so that it doesn't accidentally ask for too + // much and blow up the build + add("-J-Xmx2560m") + add("--parallelism=2") add("--shared") add("-cp"); add(classPath) add("-H:+UnlockExperimentalVMOptions") // Necessary to use JNIConfigurationFiles option below From be2117a51963752d36e017619a404935d79483eb Mon Sep 17 00:00:00 2001 From: Bart Dubbeldam Date: Mon, 24 Aug 2026 18:09:52 +0200 Subject: [PATCH 2/4] Normalize CRLF in JSONTestSuite when generating Windows checkouts of the suite use core.autocrlf, which leaked CRLFs into the generated JsonSuiteTest.kt. --- .../kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt b/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt index 1e8cc8ca0..289835449 100644 --- a/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt +++ b/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt @@ -349,8 +349,10 @@ private class JsonTestDataLoader(private val testDefinitionFilesDir: Path, priva return testFiles.map { JsonTestData( it.nameWithoutExtension, - // explicitly note UTF-8 here since the JSON spec specifies that as the proper json encoding - it.readText(Charsets.UTF_8), + // explicitly note UTF-8 here since the JSON spec specifies that as the proper json encoding. + // Normalize CRLF: the checkout test suite has no `.gitattributes`, so `core.autocrlf` on Windows + // would otherwise leak CRLFs into the generated file + it.readText(Charsets.UTF_8).replace("\r\n", "\n"), it.absolutePath.replace(File.separatorChar, '/').replace("${projectRoot.toString().replace(File.separatorChar, '/')}/", ""), JsonTestSuiteEditList.get(it.name) ) From 34982eefb089f65f27b95dd0acd593cd4ffb37a6 Mon Sep 17 00:00:00 2001 From: Bart Dubbeldam Date: Mon, 24 Aug 2026 20:48:02 +0200 Subject: [PATCH 3/4] Run build-python-sdist on a large executor --- .circleci/config.kson | 1 + .circleci/config.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.circleci/config.kson b/.circleci/config.kson index a1ddc989e..751dbc0be 100644 --- a/.circleci/config.kson +++ b/.circleci/config.kson @@ -376,6 +376,7 @@ jobs: docker: - image: 'cimg/python:3.11' . + resource_class: large working_directory: '~/repo' steps: - checkout diff --git a/.circleci/config.yml b/.circleci/config.yml index 53b2e1aab..1dc9d9b47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -336,6 +336,7 @@ jobs: "build-python-sdist": docker: - image: "cimg/python:3.11" + resource_class: large working_directory: "~/repo" steps: - checkout From 43a7635893958d4635e4239080784cf248e59c62 Mon Sep 17 00:00:00 2001 From: Bart Dubbeldam Date: Mon, 24 Aug 2026 21:32:03 +0200 Subject: [PATCH 4/4] Run test-python-sdist-macos on Apple silicon CircleCI retired the Intel macOS fleet, and Xcode 14.2 only existed on Intel, so the job was rejected as having no valid resource class. Use the same executor as build-macos-arm64. --- .circleci/config.kson | 3 ++- .circleci/config.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.kson b/.circleci/config.kson index 751dbc0be..f7d7e5302 100644 --- a/.circleci/config.kson +++ b/.circleci/config.kson @@ -428,8 +428,9 @@ jobs: . 'test-python-sdist-macos': macos: - xcode: '14.2.0' + xcode: '16.4.0' . + resource_class: 'm4pro.medium' working_directory: '~/repo' steps: - 'setup-python-test': diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dc9d9b47..6326bf5da 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -384,7 +384,8 @@ jobs: "test-python-sdist-macos": macos: - xcode: "14.2.0" + xcode: "16.4.0" + resource_class: "m4pro.medium" working_directory: "~/repo" steps: - "setup-python-test":