From 02b19224654db6c3e2fe9bfe378a0f0eddf69e92 Mon Sep 17 00:00:00 2001 From: Andriy Plokhotnyuk Date: Tue, 30 Jun 2026 21:03:38 +0200 Subject: [PATCH 1/4] Update sbt to 2.0.1 --- project/build.properties | 2 +- .../eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project/build.properties b/project/build.properties index 1a59c2e..fdcf9af 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.12.15 +sbt.version = 2.0.6 diff --git a/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala b/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala index 9ab1d72..4fceb53 100644 --- a/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala +++ b/src/test/scala/eu/neverblink/jelly/cli/command/rdf/RdfToJellySpec.scala @@ -102,7 +102,7 @@ class RdfToJellySpec extends AnyWordSpec with TestFixtureHelper with Matchers: } "input stream to output stream, generalized RDF (N-Triples)" in { - val inputStream = new FileInputStream(getClass.getResource("/generalized.nt").getPath) + val inputStream = getClass.getResourceAsStream("/generalized.nt") RdfToJelly.setStdIn(inputStream) val (out, err) = RdfToJelly.runTestCommand( List("rdf", "to-jelly", "--in-format=nt"), @@ -116,7 +116,7 @@ class RdfToJellySpec extends AnyWordSpec with TestFixtureHelper with Matchers: } "input stream to output stream, generalized RDF (N-Quads)" in { - val inputStream = new FileInputStream(getClass.getResource("/generalized.nq").getPath) + val inputStream = getClass.getResourceAsStream("/generalized.nq") RdfToJelly.setStdIn(inputStream) val (out, err) = RdfToJelly.runTestCommand( List("rdf", "to-jelly", "--in-format=nq"), From bcaf63d8641d6d4a58f726d2d0e3cdf4131523a6 Mon Sep 17 00:00:00 2001 From: Andriy Plokhotnyuk Date: Tue, 30 Jun 2026 22:41:52 +0200 Subject: [PATCH 2/4] Fix assembling and serial (non-parallel) testing --- .github/workflows/scala.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 8ea3554..6742803 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -40,7 +40,7 @@ jobs: - name: Build and test shell: bash - run: sbt -v +test test-serial:test + run: sbt -v +test TestSerial/test test-assembly: runs-on: ubuntu-latest @@ -61,7 +61,7 @@ jobs: shell: bash run: | sbt -v assembly - mv target/scala-*/jelly-cli-assembly*.jar jelly-cli.jar + mv target/out/jvm/scala-*/jelly-cli/jelly-cli-assembly*.jar jelly-cli.jar - name: Test the assembly run: | From 9ac1742af159c67211684dfd3228745ecdf738c8 Mon Sep 17 00:00:00 2001 From: Andriy Plokhotnyuk Date: Wed, 1 Jul 2026 06:22:26 +0200 Subject: [PATCH 3/4] Fix binary checks and uploading --- .github/workflows/aot-test.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/aot-test.yml b/.github/workflows/aot-test.yml index 1a870f9..c7df48d 100644 --- a/.github/workflows/aot-test.yml +++ b/.github/workflows/aot-test.yml @@ -35,51 +35,53 @@ jobs: run: | set -euo pipefail + mv target/out/jvm/scala-*/jelly-cli/graalvm-native-image/jelly-cli jelly-cli + # See if it runs at all - target/graalvm-native-image/jelly-cli version || exit 1 + jelly-cli version || exit 1 # Make sure reflection is supported - target/graalvm-native-image/jelly-cli version | grep "JVM reflection: supported" \ + jelly-cli version | grep "JVM reflection: supported" \ || exit 1 # Make sure large RDF/XML file parsing is supported - target/graalvm-native-image/jelly-cli version | grep "Large RDF/XML file parsing: supported" \ + jelly-cli version | grep "Large RDF/XML file parsing: supported" \ || exit 1 # Test RDF conversions echo '_:b _:b .' > in.nt - target/graalvm-native-image/jelly-cli \ + jelly-cli \ rdf to-jelly --in-format=nt in.nt > out.jelly && \ [ -s out.jelly ] || exit 1 - target/graalvm-native-image/jelly-cli \ + jelly-cli \ rdf from-jelly --out-format=jelly-text out.jelly > out.txt && \ [ -s out.txt ] || exit 1 # From jelly-text - target/graalvm-native-image/jelly-cli \ + jelly-cli \ rdf to-jelly --in-format=jelly-text out.txt > out2.jelly && \ [ -s out2.jelly ] || exit 1 - target/graalvm-native-image/jelly-cli \ + jelly-cli \ rdf from-jelly --out-format=jsonld out.jelly > out.json && \ [ -s out.json ] || exit 1 echo '{"@graph":[{"@id":"http://e.org/r","http://e.org/p":{"@value":"v"}}]}' | \ - target/graalvm-native-image/jelly-cli rdf to-jelly --in-format "jsonld" > jsonld.jelly && \ + jelly-cli rdf to-jelly --in-format "jsonld" > jsonld.jelly && \ [ -s jsonld.jelly ] || exit 1 echo '' | \ - target/graalvm-native-image/jelly-cli rdf to-jelly --in-format "rdfxml" > rdfxml.jelly && \ + jelly-cli rdf to-jelly --in-format "rdfxml" > rdfxml.jelly && \ [ -s rdfxml.jelly ] || exit 1 # Invalid RDF/XMl input test # Regression test for: https://github.com/Jelly-RDF/cli/issues/217 echo 'invalidxml' | \ - ( ! target/graalvm-native-image/jelly-cli rdf to-jelly --in-format "rdfxml" &> error.txt ) && \ + ( ! jelly-cli rdf to-jelly --in-format "rdfxml" &> error.txt ) && \ grep 'Content is not allowed in prolog' error.txt || exit 1 # Test rdf validate - target/graalvm-native-image/jelly-cli \ + jelly-cli \ rdf validate out.jelly --compare-to-rdf-file in.nt || exit 1 - name: Upload binary uses: actions/upload-artifact@v4 with: name: jelly-cli-${{ matrix.os }} - path: target/graalvm-native-image/* + path: jelly-cli From ca865104d4752189ae9b9c465e2b4ab5f7bed821 Mon Sep 17 00:00:00 2001 From: Ostrzyciel Date: Mon, 17 Aug 2026 21:24:42 +0200 Subject: [PATCH 4/4] Update to sbt 2.0.6, fix remaining build output paths - Bump sbt 2.0.1 -> 2.0.6 (latest stable). - Fix the AOT test: the binary is moved to the working directory, so it has to be invoked as ./jelly-cli, not jelly-cli. - Update publish.yml for the sbt 2 target layout. It was missed earlier, so releases would have shipped no binaries at all. - Update the build-from-source paths in the README. - Silence sbt 2's unused-key lint, which flags the Debian/RPM/Universal packaging settings that sbt-native-packager defines but we never use. --- .github/workflows/aot-test.yml | 23 ++++++++++++----------- .github/workflows/publish.yml | 5 +++-- README.md | 4 ++-- build.sbt | 5 +++++ 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/aot-test.yml b/.github/workflows/aot-test.yml index c7df48d..370ece7 100644 --- a/.github/workflows/aot-test.yml +++ b/.github/workflows/aot-test.yml @@ -35,49 +35,50 @@ jobs: run: | set -euo pipefail + # sbt 2 nests build outputs under target/out//// mv target/out/jvm/scala-*/jelly-cli/graalvm-native-image/jelly-cli jelly-cli # See if it runs at all - jelly-cli version || exit 1 + ./jelly-cli version || exit 1 # Make sure reflection is supported - jelly-cli version | grep "JVM reflection: supported" \ + ./jelly-cli version | grep "JVM reflection: supported" \ || exit 1 # Make sure large RDF/XML file parsing is supported - jelly-cli version | grep "Large RDF/XML file parsing: supported" \ + ./jelly-cli version | grep "Large RDF/XML file parsing: supported" \ || exit 1 # Test RDF conversions echo '_:b _:b .' > in.nt - jelly-cli \ + ./jelly-cli \ rdf to-jelly --in-format=nt in.nt > out.jelly && \ [ -s out.jelly ] || exit 1 - jelly-cli \ + ./jelly-cli \ rdf from-jelly --out-format=jelly-text out.jelly > out.txt && \ [ -s out.txt ] || exit 1 # From jelly-text - jelly-cli \ + ./jelly-cli \ rdf to-jelly --in-format=jelly-text out.txt > out2.jelly && \ [ -s out2.jelly ] || exit 1 - jelly-cli \ + ./jelly-cli \ rdf from-jelly --out-format=jsonld out.jelly > out.json && \ [ -s out.json ] || exit 1 echo '{"@graph":[{"@id":"http://e.org/r","http://e.org/p":{"@value":"v"}}]}' | \ - jelly-cli rdf to-jelly --in-format "jsonld" > jsonld.jelly && \ + ./jelly-cli rdf to-jelly --in-format "jsonld" > jsonld.jelly && \ [ -s jsonld.jelly ] || exit 1 echo '' | \ - jelly-cli rdf to-jelly --in-format "rdfxml" > rdfxml.jelly && \ + ./jelly-cli rdf to-jelly --in-format "rdfxml" > rdfxml.jelly && \ [ -s rdfxml.jelly ] || exit 1 # Invalid RDF/XMl input test # Regression test for: https://github.com/Jelly-RDF/cli/issues/217 echo 'invalidxml' | \ - ( ! jelly-cli rdf to-jelly --in-format "rdfxml" &> error.txt ) && \ + ( ! ./jelly-cli rdf to-jelly --in-format "rdfxml" &> error.txt ) && \ grep 'Content is not allowed in prolog' error.txt || exit 1 # Test rdf validate - jelly-cli \ + ./jelly-cli \ rdf validate out.jelly --compare-to-rdf-file in.nt || exit 1 - name: Upload binary diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7f78970..979aa4b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,7 +31,8 @@ jobs: uses: actions/upload-artifact@v4 with: name: jelly-cli-${{ matrix.os }} - path: target/graalvm-native-image/* + # sbt 2 nests build outputs under target/out//// + path: target/out/jvm/scala-*/jelly-cli/graalvm-native-image/* jit-compile: name: Build the uber-JAR @@ -53,7 +54,7 @@ jobs: shell: bash run: | sbt -v assembly - mv target/scala-*/jelly-cli-assembly*.jar jelly-cli.jar + mv target/out/jvm/scala-*/jelly-cli/jelly-cli-assembly*.jar jelly-cli.jar - name: Upload assembly uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 76245f3..7dd3370 100644 --- a/README.md +++ b/README.md @@ -176,12 +176,12 @@ The CI checks will not pass if this is not the case. - Ensure you have [GraalVM](https://www.graalvm.org/) installed and the `native-image` utility is available in your `PATH`. - Clone the repository. - Run `sbt GraalVMNativeImage/packageBin` -- The binary will be available at `./target/graalvm-native-image/jelly-cli`. +- The binary will be available at `./target/out/jvm/scala-3.*.*/jelly-cli/graalvm-native-image/jelly-cli`. #### Über-JAR build (just-in-time) - Run `sbt assembly` -- The resulting JAR will be in `./target/scala-3.*.*/jelly-cli-assembly-*.jar` +- The resulting JAR will be in `./target/out/jvm/scala-3.*.*/jelly-cli/jelly-cli-assembly-*.jar` - Run it like: `java -jar ` ---- diff --git a/build.sbt b/build.sbt index b4ecc86..e9f58db 100644 --- a/build.sbt +++ b/build.sbt @@ -2,6 +2,11 @@ ThisBuild / semanticdbEnabled := true lazy val scalaV = "3.8.4" ThisBuild / scalaVersion := scalaV +// sbt-native-packager (pulled in by GraalVMNativeImagePlugin) defines settings for the Debian, +// RPM, and Universal packaging formats, which we don't use. sbt 2 reports all of them as unused +// keys on every startup, so turn the lint off. +Global / lintUnusedKeysOnLoad := false + resolvers += "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots"