Temurin version incorrectly converted for setup-java 6.0.x
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- github-actions, java, typescript
调研方向
从 src/distributions/base-installer.ts 的第 681-689 行附近开始,这里正则表达式处理 Java 版本。使用 26.0.2.1+1 和 25.0.4.1+1 等 Temurin 版本重现该失败,然后验证 setup-java 能够成功解析这些版本,且不会出现 SemVer 错误。
由索引模型根据 Issue 内容生成。
描述
Description:
After upgrade from 5.7.0 to 6.0.0 and 6.0.1, I noticed that setup-java does not recognize Temurin's versions anymore (e.g. "26.0.2+10"). This leads to an "is not valid SemVer notation for a Java version" error.
The following regular expression does not not pick up Temurin's version correctly:
The issue seems to be similar to: https://github.com/actions/setup-java/issues/1267
Task version:
v6, v6.0.1
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Repro steps:
- successful run for setup-java "5.7.0" and Temurin "26.0.2+10", "25.0.4+7"
- failed runs for setup-java "6.0.0" and Temurin "26.0.2.1+1", "25.0.4.1+1"
- failed runs for setup-java "6.0.1" and Temurin "26.0.2.1+1", "25.0.4.1+1"
Expected behavior:
Successfully resolve Temurin version.
Actual behavior:
setup-java >= 6.0.0 returns
The string '26.0.2.1+1' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information
- 主要语言
- TypeScript
- 星标
- 2k
- 派生
- 870
- 平均合并
- 3 小时 16 分钟
- 30 天内合并 PR
- 11
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
Type/Bug
难度 2/5 1-3 小时 新手友好度 78/100
OpenNSW/nsw-srilanka#497 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
难度 1/5 1 小时以内 新手友好度 88/100
digidem/comapeo-cloud-app#403 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 78/100