【发布时间】:2021-03-12 15:02:06
【问题描述】:
我有在 JDK 13.0.1 上成功本地构建的 Scala 代码。
s.getValue().stripTrailing() // s.getValue() returns String
当此代码由 github 操作构建时,我收到此错误:
Error: -- [E008] Not Found Error: /github/workspace/core/src/main/scala/co.blocke.scalajack/yaml/YamlParser.scala:45:96
Error: 45 | case "|" | ">" => s.getValue().stripTrailing()
Error: | ^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: | value stripTrailing is not a member of String
我的动作文件是:
name: Package Build
# This workflow is triggered on pushes to the repository.
on:
push:
branches-ignore:
- "feature/*" # don't run build/test against a feature branch -- no SLA there
- "master"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up JDK 13
uses: actions/setup-java@v1
with:
java-version: '13.0.1'
- name: Test
id: sbt
uses: lokkju/github-action-sbt@master
with:
commands: test
stripTrailing() 是 Oracle 和 OpenJDK 13.x 库中的 String 方法。
【问题讨论】:
标签: java github-actions