From c6e823b24ed203fb308c43c27d9dd7ef7377202e Mon Sep 17 00:00:00 2001 From: Stephen Amar Date: Mon, 23 Mar 2026 17:18:27 +0000 Subject: [PATCH 1/5] Fix PomSettings to reflect reality --- build.mill | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.mill b/build.mill index b3fac242..f0f493f3 100644 --- a/build.mill +++ b/build.mill @@ -36,10 +36,14 @@ trait SjsonnetPublishModule extends PublishModule { description = artifactName(), organization = "com.databricks", url = "https://github.com/databricks/sjsonnet", - licenses = Seq(License.MIT), + licenses = Seq(License.Apache2), versionControl = VersionControl.github("databricks", "sjsonnet"), developers = Seq( - Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi") + Developer( + name = "Databricks Jsonnet Team", + organization = "Databricks", + url = "https://www.databricks.com" + ) ) ) } From ca63e16dbe0a148680411c7622b396b785b18413 Mon Sep 17 00:00:00 2001 From: Stephen Amar Date: Mon, 23 Mar 2026 17:55:39 +0000 Subject: [PATCH 2/5] more JVM cleanup --- .github/workflows/pr-build.yaml | 47 ++++++++++++-------------- .github/workflows/push-to-central.yaml | 4 --- .github/workflows/release-build.yaml | 10 +----- .jvmopts | 12 +------ build.mill | 8 ++--- build.sbt | 12 ------- 6 files changed, 28 insertions(+), 65 deletions(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index e250bf7f..fd912804 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -5,22 +5,33 @@ on: branches: [ master ] jobs: - build: + build-jvm: + runs-on: ubuntu-22.04 + name: Sjsonnet jvm build + steps: + - uses: actions/checkout@v6 + - uses: sbt/setup-sbt@v1 + - name: Cache Coursier cache + uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0 + - name: Check Formatting + run: ./mill "_.jvm[_].__.checkFormat" + - name: Run mill tests + timeout-minutes: 15 + run: ./mill "_.jvm[_].__.test" + - name: Run sbt tests + timeout-minutes: 15 + run: sbt test + - name: Run Native Image Test Suites + run: sjsonnet/test/graalvm/run_test_suites.py + build-other: runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - lang: ['jvm', 'js', 'wasm', 'native'] - java: ['21', '25'] - name: Sjsonnet build for ${{ matrix.lang }} on JDK ${{ matrix.java }} + lang: ['js', 'wasm', 'native'] + name: Sjsonnet ${{ matrix.lang }} build steps: - uses: actions/checkout@v6 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v5 - with: - java-version: ${{ matrix.java }} - distribution: 'zulu' - cache: sbt - uses: sbt/setup-sbt@v1 - name: Set up Node.js 24 if: ${{ matrix.lang == 'js' || matrix.lang == 'wasm' }} @@ -31,20 +42,6 @@ jobs: uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0 - name: Check Formatting run: ./mill _.${{ matrix.lang }}[_].__.checkFormat - - name: Compile with mill + - name: Run mill tests for ${{ matrix.lang }}\ timeout-minutes: 15 - run: ./mill _.${{ matrix.lang }}[_].__.compile - - name: Run mill tests for ${{ matrix.lang }} run: ./mill _.${{ matrix.lang }}[_].__.test - - name: Compile with sbt - timeout-minutes: 15 - if: ${{ matrix.lang == 'jvm' }} - run: sbt compile bench/compile bench/jmh:compile - - name: Run sbt tests - timeout-minutes: 15 - if: ${{ matrix.lang == 'jvm' }} - run: sbt test - - name: Run Native Image Test Suites - timeout-minutes: 30 - if: ${{ (matrix.lang == 'jvm') && (matrix.java == '25') }} - run: sjsonnet/test/graalvm/run_test_suites.py diff --git a/.github/workflows/push-to-central.yaml b/.github/workflows/push-to-central.yaml index 325bab05..f7c2a8fb 100644 --- a/.github/workflows/push-to-central.yaml +++ b/.github/workflows/push-to-central.yaml @@ -9,10 +9,6 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v6 - - uses: actions/setup-java@v5 - with: - java-version: 21 - distribution: 'zulu' - name: Set up Node.js 24 uses: actions/setup-node@v6 with: diff --git a/.github/workflows/release-build.yaml b/.github/workflows/release-build.yaml index 413cf7f7..2fa25e21 100644 --- a/.github/workflows/release-build.yaml +++ b/.github/workflows/release-build.yaml @@ -14,10 +14,6 @@ jobs: LANG: C steps: - uses: actions/checkout@v6 - - uses: actions/setup-java@v5 - with: - java-version: 21 - distribution: 'zulu' - name: Set up Node.js 24 uses: actions/setup-node@v6 with: @@ -73,10 +69,6 @@ jobs: LANG: C steps: - uses: actions/checkout@v6 - - uses: actions/setup-java@v5 - with: - java-version: 21 - distribution: 'zulu' - name: Set up environment variables run: | echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV @@ -126,5 +118,5 @@ jobs: with: name: sjsonnet-${{ env.VERSION }}-release path: release/* - retention-days: 30 + retention-days: 7 if-no-files-found: error diff --git a/.jvmopts b/.jvmopts index 2e143dbb..f02ef1ce 100644 --- a/.jvmopts +++ b/.jvmopts @@ -1,13 +1,3 @@ --enable-native-access=ALL-UNNAMED --XX:+UseG1GC --Xms4G -Xmx4G --Xss2M --XX:+AlwaysActAsServerClassMachine --XX:ReservedCodeCacheSize=512m --XX:NonProfiledCodeHeapSize=256m --XX:MaxGCPauseMillis=750 --XX:+UseCompressedOops --XX:MetaspaceSize=512M --XX:-ClassUnloadingWithConcurrentMark --Djava.security.egd=file:/dev/./urandom +-XX:+UseG1GC diff --git a/build.mill b/build.mill index f0f493f3..742cd764 100644 --- a/build.mill +++ b/build.mill @@ -1,5 +1,5 @@ //| mill-version: 1.1.2 -//| mill-jvm-opts: ["-XX:+UseG1GC", "-Xmx4G", "--enable-native-access=ALL-UNNAMED"] +//| mill-jvm-version: zulu:21 //| mvnDeps: //| - com.lihaoyi::mill-contrib-jmh:$MILL_VERSION //| - com.lihaoyi::mill-contrib-versionfile:$MILL_VERSION @@ -36,13 +36,13 @@ trait SjsonnetPublishModule extends PublishModule { description = artifactName(), organization = "com.databricks", url = "https://github.com/databricks/sjsonnet", - licenses = Seq(License.Apache2), + licenses = Seq(License.Common.Apache2), versionControl = VersionControl.github("databricks", "sjsonnet"), developers = Seq( Developer( name = "Databricks Jsonnet Team", - organization = "Databricks", - url = "https://www.databricks.com" + organization = Some("Databricks"), + organizationUrl = Some("https://www.databricks.com") ) ) ) diff --git a/build.sbt b/build.sbt index 92513d55..f37e4659 100644 --- a/build.sbt +++ b/build.sbt @@ -60,15 +60,3 @@ lazy val main = (project in file("sjsonnet")) Seq(file) }.taskValue ) - -lazy val bench = (project in file("bench")) - .dependsOn(main % "compile->test") - .enablePlugins(JmhPlugin) - .settings(commonSettings: _*) - .settings( - run / fork := true, - run / javaOptions ++= Seq( - "-Xss100m", - "--enable-native-access=ALL-UNNAMED" - ) - ) From 20652e64173e53370af72d97ef7f772c07c40ad1 Mon Sep 17 00:00:00 2001 From: Stephen Amar Date: Mon, 23 Mar 2026 17:58:12 +0000 Subject: [PATCH 3/5] typo --- .github/workflows/pr-build.yaml | 14 +++++++++++++- .github/workflows/push-to-central.yaml | 5 +++++ .github/workflows/release-build.yaml | 10 ++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index fd912804..81576cc3 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -10,6 +10,12 @@ jobs: name: Sjsonnet jvm build steps: - uses: actions/checkout@v6 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: 21 + distribution: 'zulu' + cache: sbt - uses: sbt/setup-sbt@v1 - name: Cache Coursier cache uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0 @@ -32,6 +38,12 @@ jobs: name: Sjsonnet ${{ matrix.lang }} build steps: - uses: actions/checkout@v6 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: 21 + distribution: 'zulu' + cache: sbt - uses: sbt/setup-sbt@v1 - name: Set up Node.js 24 if: ${{ matrix.lang == 'js' || matrix.lang == 'wasm' }} @@ -42,6 +54,6 @@ jobs: uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0 - name: Check Formatting run: ./mill _.${{ matrix.lang }}[_].__.checkFormat - - name: Run mill tests for ${{ matrix.lang }}\ + - name: Run mill tests for ${{ matrix.lang }} timeout-minutes: 15 run: ./mill _.${{ matrix.lang }}[_].__.test diff --git a/.github/workflows/push-to-central.yaml b/.github/workflows/push-to-central.yaml index f7c2a8fb..e5d868d7 100644 --- a/.github/workflows/push-to-central.yaml +++ b/.github/workflows/push-to-central.yaml @@ -9,6 +9,11 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v6 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: 21 + distribution: 'zulu' - name: Set up Node.js 24 uses: actions/setup-node@v6 with: diff --git a/.github/workflows/release-build.yaml b/.github/workflows/release-build.yaml index 2fa25e21..3b203793 100644 --- a/.github/workflows/release-build.yaml +++ b/.github/workflows/release-build.yaml @@ -14,6 +14,11 @@ jobs: LANG: C steps: - uses: actions/checkout@v6 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: 21 + distribution: 'zulu' - name: Set up Node.js 24 uses: actions/setup-node@v6 with: @@ -69,6 +74,11 @@ jobs: LANG: C steps: - uses: actions/checkout@v6 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: 21 + distribution: 'zulu' - name: Set up environment variables run: | echo "VERSION=$(cat sjsonnet/version)" >> $GITHUB_ENV From 25fae34f1cd6babe98a8f2f0a76b911060b6de57 Mon Sep 17 00:00:00 2001 From: Stephen Amar Date: Mon, 23 Mar 2026 18:06:09 +0000 Subject: [PATCH 4/5] Split native image into its own PR build --- .github/workflows/pr-build.yaml | 15 +++++++++++++++ .gitignore | 3 ++- project/build.properties | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 81576cc3..6ea35ad3 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -29,6 +29,21 @@ jobs: run: sbt test - name: Run Native Image Test Suites run: sjsonnet/test/graalvm/run_test_suites.py + build-graal: + runs-on: ubuntu-22.04 + name: Sjsonnet jvm build + steps: + - uses: actions/checkout@v6 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: 21 + distribution: 'zulu' + - name: Cache Coursier cache + uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0 + - name: Run Native Image Test Suites + timeout-minutes: 15 + run: sjsonnet/test/graalvm/run_test_suites.py build-other: runs-on: ubuntu-22.04 strategy: diff --git a/.gitignore b/.gitignore index e1a3bea8..4f2b287c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ out/ /project/metals.sbt *.orig *.rej -*.bak \ No newline at end of file +*.bak +.bazelbsp/ diff --git a/project/build.properties b/project/build.properties index 5e6884d3..b49295c7 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.11.6 +sbt.version=1.12.5 From f4ade474ad5484318a482194265435c752b9668a Mon Sep 17 00:00:00 2001 From: Stephen Amar Date: Mon, 23 Mar 2026 18:06:25 +0000 Subject: [PATCH 5/5] add mill-jvm-opts --- .github/workflows/pr-build.yaml | 4 +--- .mill-jvm-opts | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) create mode 120000 .mill-jvm-opts diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 6ea35ad3..b5d9bd17 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -27,11 +27,9 @@ jobs: - name: Run sbt tests timeout-minutes: 15 run: sbt test - - name: Run Native Image Test Suites - run: sjsonnet/test/graalvm/run_test_suites.py build-graal: runs-on: ubuntu-22.04 - name: Sjsonnet jvm build + name: Sjsonnet Graal Native build steps: - uses: actions/checkout@v6 - name: Set up JDK 21 diff --git a/.mill-jvm-opts b/.mill-jvm-opts new file mode 120000 index 00000000..3037ad3f --- /dev/null +++ b/.mill-jvm-opts @@ -0,0 +1 @@ +.jvmopts \ No newline at end of file