Skip to content

Conversation

thomaspoignant
Copy link
Member

Before this pull request the loading of the wasm module was not working when packaged in a jar.
The actual v1.0.0 is not able to load the wasm file.

Copy link

Summary of Changes

Hello @thomaspoignant, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a critical issue preventing the go-feature-flag WASM evaluation module from loading correctly when the application is run from a JAR file. The changes involve updating the build script to standardize the WASM file's name and significantly overhauling the Java code responsible for locating and streaming the WASM resource, ensuring it functions seamlessly in both file system and JAR-packaged environments.

Highlights

  • WASM File Handling: Modified the download-wasm.sh script to consistently copy the WASM evaluation module to src/main/resources/wasm/gofeatureflag-evaluation.wasi, removing the version suffix from the filename.
  • JAR Compatibility: Refactored the getWasmFile method in EvaluationWasm.java to correctly locate and load the WASM module from within a JAR file using InputStreams, addressing the previous failure when packaged.
  • Class Extensibility: Removed the final modifier from the EvaluationWasm class, allowing it to be extended.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Before this pull request the loading of the wasm module was not working when packaged in a jar. The actual 1.0.0 is not able to load the wasm file. Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses an issue with loading WASM files when the application is packaged as a JAR. The change in download-wasm.sh to use cp and a static filename is a good step. However, the Java implementation for loading the resource in EvaluationWasm.java is overly complex and contains redundant logic. My review includes a suggestion to significantly simplify this method, which will improve readability, maintainability, and robustness.

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
@thomaspoignant
Copy link
Member Author

I will merge this PR without waiting for a review because the current released version of this morning is not working and I want to have a working version ASAP on mvn repository.

@thomaspoignant thomaspoignant merged commit 40f77f3 into main Sep 19, 2025
5 checks passed
@thomaspoignant thomaspoignant deleted the fix-wasm-loading branch September 19, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant