GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-java

Add Java Platform Module System (JPMS) Support

未關閉
#372 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement P2
主要語言
Java
星號
154
分支
63
PR 合併指標
30 天內沒有已合併 PR

描述

Add support for running functions on the module path (--module-path) instead of only the classpath (--classpath) to enable full Java Platform Module System (JPMS) features in the Functions Framework.

Currently, the Functions Framework for Java only supports classpath-based execution, which prevents developers from utilizing JPMS features at runtime even when their code is properly modularized with module-info.java files.

Modern Java applications using JPMS face the following issues:
1. module-info.java files are ignored at runtime (treated as regular classes on classpath)
2. provides...with service provider declarations don't work, requiring fallback to legacy META-INF/services files
3. Module encapsulation and strong accessibility rules are not enforced
4. No module-level dependency management or version conflict resolution
5. Cannot leverage jlink to create optimized custom runtime images with only required modules, resulting in larger deployment artifacts

This feature request requires changes across three layers:

1. Local Development (Invoker CLI) - Add --module-path support
2. Build Tooling (Maven/Gradle plugins) - Add module-path configuration (right now classpath is hardcoded [here](https://github.com/GoogleCloudPlatform/functions-framework-java/blob/de202439e223dcb48e3a3319e4c0d57adc450ec8/function-maven-plugin/src/main/java/com/google/cloud/functions/plugin/RunFunction.java#L68C5-L68C58)
3. Cloud Runtime Infrastructure - Update Google Cloud Functions runtime to support modular execution

貢獻指南

開啟貢獻指南

研究方向

Start with function-maven-plugin/src/main/java/com/google/cloud/functions/plugin/RunFunction.java at the hardcoded classpath configuration. Trace how the Invoker CLI and Maven/Gradle plugins launch functions, then determine how module-path configuration must reach the cloud runtime. Done requires coordinated support across local invocation, build tooling, and cloud execution.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
backend, build-system, cli, cloud
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。