Add Java Platform Module System (JPMS) Support

未关闭
#372 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
java

调研方向

从 function-maven-plugin/src/main/java/com/google/cloud/functions/plugin/RunFunction.java 中硬编码的 classpath 配置开始。跟踪 Invoker CLI 和 Maven/Gradle 插件如何启动函数,然后确定 module-path 配置必须如何传递到云运行时。完成这项工作需要协调支持本地调用、构建工具和云端执行。

由索引模型根据 Issue 内容生成。

描述

enhancement P2

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
  3. Cloud Runtime Infrastructure - Update Google Cloud Functions runtime to support modular execution
主要语言
Java
星标
154
派生
63
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GoogleCloudPlatform/functions-framework-java 的其他 Issue

查看 GoogleCloudPlatform/functions-framework-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。