From 9b988799e8f959a11651729fa5f97b5dcf3b688b Mon Sep 17 00:00:00 2001 From: Hiram Chirino Date: Mon, 2 Jun 2025 09:09:00 -0400 Subject: [PATCH] feat: upgrade Chicory runtime to v1.4.0 and improve build configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Upgrade Chicory WebAssembly runtime from version 1.3.0 to 1.4.0 • Update Chicory dependency artifact names to new stable packages: - Replace experimental aot-experimental with annotations - Replace host-module-annotations-experimental with chicory-compiler-maven-plugin - Replace host-module-processor-experimental with annotations-processor • Improve Spotless configuration with enhanced wildcard import detection: - Replace simple regex-based wildcard import removal with Groovy-based validation - Add clear error messages for wildcard imports requiring manual expansion • Add not-ci profile for automatic code formatting during local development • Update documentation references to point to current Chicory runtime compiler docs This upgrade modernizes the project's WebAssembly runtime dependencies and improves the developer experience by providing better build validation and automatic code formatting. The Chicory 1.4.0 upgrade brings performance improvements and stability enhancements to WebAssembly execution. Signed-off-by: Hiram Chirino --- pom.xml | 81 +++++++++++++++++-- proxy-wasm-java-host/pom.xml | 33 +------- .../java/io/roastedroot/proxywasm/Plugin.java | 5 +- .../roastedroot/proxywasm/internal/ABI.java | 4 +- 4 files changed, 83 insertions(+), 40 deletions(-) diff --git a/pom.xml b/pom.xml index de1412b..6fc3849 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,7 @@ 5.12.2 - 1.3.0 + 1.4.0 3.1.10 11.0.25 @@ -112,11 +112,18 @@ false - - Remove wildcard imports - import\s+(?:static\s+)?[^\*\s]+\*;(\r\n|\r|\n) - $1 - + + Wildcard Imports Not Allowed + org.apache.groovy:groovy-jsr223:4.0.27 + groovy + + @@ -213,6 +220,15 @@ ${checkstyle.version} + + + checkstyle + + check + + validate + + org.apache.maven.plugins @@ -230,6 +246,59 @@ + + ci + + + env.CI + true + + + + + + com.diffplug.spotless + spotless-maven-plugin + + + check-format + + check + + process-sources + + + + + + + + not-ci + + + env.CI + !true + + + + + + com.diffplug.spotless + spotless-maven-plugin + + + format + + apply + + process-sources + + + + + + + release diff --git a/proxy-wasm-java-host/pom.xml b/proxy-wasm-java-host/pom.xml index 3ec1f8b..7b62da1 100644 --- a/proxy-wasm-java-host/pom.xml +++ b/proxy-wasm-java-host/pom.xml @@ -16,12 +16,12 @@ com.dylibso.chicory - aot-experimental + annotations ${chicory.version} com.dylibso.chicory - host-module-annotations-experimental + chicory-compiler-maven-plugin ${chicory.version} @@ -58,33 +58,6 @@ - - com.diffplug.spotless - spotless-maven-plugin - - - format - - check - - process-sources - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - - checkstyle - - check - - validate - - - org.apache.maven.plugins @@ -93,7 +66,7 @@ com.dylibso.chicory - host-module-processor-experimental + annotations-processor ${chicory.version} diff --git a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/Plugin.java b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/Plugin.java index 55e9879..73a5dc6 100644 --- a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/Plugin.java +++ b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/Plugin.java @@ -301,9 +301,10 @@ public Builder withImportMemory(ImportMemory memory) { * The {@link Machine} controls the low-level execution of WASM instructions. * By default, an interpreter-based machine is used. * Providing a custom factory allows using alternative execution strategies, such as - * Ahead-Of-Time (AOT) compilation to improve execution performance. + * wasm to bytecode compilation to improve execution performance. * - *

See the Chicory documentation (https://chicory.dev/docs/experimental/aot) for more details on Aot compilation. + *

See the Chicory documentation (https://chicory.dev/docs/usage/runtime-compiler) for more details + * on WASM to bytecode compilation and execution. * * @param machineFactory A function that takes a WASM {@link Instance} and returns a {@link Machine}. * @return this {@code Builder} instance for method chaining. diff --git a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/internal/ABI.java b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/internal/ABI.java index 16fddca..6ba2d46 100644 --- a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/internal/ABI.java +++ b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/internal/ABI.java @@ -5,8 +5,8 @@ import static io.roastedroot.proxywasm.internal.Helpers.split; import static io.roastedroot.proxywasm.internal.Helpers.string; -import com.dylibso.chicory.experimental.hostmodule.annotations.HostModule; -import com.dylibso.chicory.experimental.hostmodule.annotations.WasmExport; +import com.dylibso.chicory.annotations.HostModule; +import com.dylibso.chicory.annotations.WasmExport; import com.dylibso.chicory.runtime.ExportFunction; import com.dylibso.chicory.runtime.Instance; import com.dylibso.chicory.runtime.Memory;