镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[GenAI] 4 increase graalvm native image test coverage - #136

Open
fugerit79 wants to merge 3 commits into
apache:2.3-gaefrom
fugerit-org:4-increase-graalvm-native-image-test-coverage
Open

fugerit79 wants to merge 3 commits into
apache:2.3-gaefrom
fugerit-org:4-increase-graalvm-native-image-test-coverage

Conversation

@fugerit79

Copy link
Copy Markdown
Contributor

Following the PR on graalvm-reachability-metadata to add Apache FreeMarker to the list of supported libraries, it was noted that:

"fully-tested means the library is fully tested for each released version. The native test in FreeMarker's CI is a single hello-world template (freemarker-test-graalvm-native), built on GraalVM 21, which is partial coverage, so please use community-tested. If FreeMarker's CI later runs a substantial part of its test suite as a native image, fully-tested will fit."

This PR is linked to FREEMARKER-229 and aims to significantly increase GraalVM Native Image test coverage for Apache FreeMarker:

  • Fix invalid .java suffixes in freemarker-core's META-INF/native-image/org.freemarker/freemarker/reflect-config.json
  • Expand freemarker-test-graalvm-native with a 17-test JUnit 5 native suite covering core directives, ranges/slicing, variadic/recursive macros and functions, built-ins, lambdas, dynamic evaluation (?eval, ?eval_json, ?interpret), BeansWrapper (Java records, enums, static models, overloaded methods, default/whitelist/blacklist/legacy member access policies), template loaders (#include, #import, auto_include, auto_import), TemplateConfiguration matchers, output formats, custom directives/methods, custom number/date formats, arithmetic engines, exception handlers, XML DOM NodeModel, Properties-based configuration, and logger resolution
  • Run :freemarker-test-graalvm-native:nativeTest in the GitHub Actions CI workflow

A preview run of the PR has already been executed here: https://github.com/fugerit-org/freemarker/actions/runs/41204979908

Note: Generative AI (Google Antigravity / Gemini) assistance was used only for the isolated freemarker-test-graalvm-native test project (and CI/README updates), reviewed and refined by the author, and not used on the FreeMarker library code itself. All the contributions have been reviewed and refined by the author.

@fugerit79

Copy link
Copy Markdown
Contributor Author

@ddekany when you have some time can we discuss this PR? as stated it only improves the test coverage for native support and does not change the codebase itself.

@ddekany

ddekany commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

I haven't reviewed it yet, but I will eventually. But if you want to ask/tell something specific, go ahead of course.

…st in CI

- Expand HelloFreeMarkerTest with JUnit 5 test scenarios covering core
  directives, built-ins, lambdas, dynamic evaluation (?eval, ?eval_json,
  ?interpret), Java records, enums, static models, overloaded methods,
  member access policies, template loaders, output formats, custom
  directives/methods, and Properties-based configuration
- Add template resources (features-suite.ftlh, included-header.ftlh,
  macro-lib.ftlh) and data model members to test #include, #import,
  macros, and functions in native image
- Run :freemarker-test-graalvm-native:nativeTest in GitHub Actions CI
  workflow and document it in README.md

Note: Generative AI (Google Gemini) assistance was used only for the isolated
freemarker-test-graalvm-native test project, reviewed and refined by the author,
and not used on the FreeMarker library code itself.
chore: updating ubuntu arm version to ubuntu 26.04

Following public preview actions/runner-images#14226 ubuntu 26 will substitute ubuntu 24 as latest tag too
@fugerit79
fugerit79 force-pushed the 4-increase-graalvm-native-image-test-coverage branch from fe53e34 to 8af69a8 Compare November 7, 2026 22:09
@fugerit79

Copy link
Copy Markdown
Contributor Author

@ddekany basically this PR does not change the code base, as you can see from the file changed :

https://github.com/apache/freemarker/pull/136/changes

The PR only improve testing of Apache FreeMarker native usage, the only other modification is :

  • fix in reflect-config.json file

Additionally I switched the ubuntu arm version from 24 to 26, following the :

All has already been tested on the fork https://github.com/fugerit-org/freemarker/actions/runs/42419285594 repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants