scala - 在 Circleci 上运行测试时获取文件名太长

标签 scala build scalatest circleci scalacheck

我正在使用 Circleci 2 构建我的项目,在我的测试覆盖范围中,我遇到了一个奇怪的错误:

[info] Compiling 5 Scala sources to /root/build/target/scala-2.11/test-classes...
[error] /root/build/test/myApplication/SomeGeneratorNameGen.scala:40: File name too long
[error] This can happen on some encrypted or legacy file systems.  Please see SI-3623 for more details.
[error]     employeeName <- Gen.numStr
[error]                  ^

最佳答案

您的文件长度是

printf /root/build/test/myApplication/AmountPerExpTypeGen.scala | wc -c
      56

$ printf /root/build/test/myApplication/ | wc -c
      31

根据大多数引用资料,您可能希望使用 scalac 选项来增加长度。

例如。

"-Xmax-classfile-name", "242"

相关链接

https://discuss.circleci.com/t/scala-sbt-assembly-does-not-work/10499/10

Filename too long sbt

https://github.com/sbt/sbt-assembly/issues/69#issuecomment-14176243

https://groups.google.com/forum/#!topic/simple-build-tool/wtD6vgdiy6g

https://issues.scala-lang.org/browse/SI-3623

关于scala - 在 Circleci 上运行测试时获取文件名太长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45022231/

相关文章:

scala - 什么是微服务回归套件的最佳方法,Scala 可以用于此吗?

scala - 测试最大规模的 future 概念是否抛出特定异常

scala - IO monad 如何使 Scala 中的并发变得容易?

scala - IntelliJ IDEA sbt 导入的 'xxx-build' 模块有什么用?

scala - 如何在随机森林中使用 Spark 特征重要性?

scala - 如何在调度请求中获取响应头和正文?

msbuild - 为什么 autoconf/automake 项目会链接到已安装的库而不是本地开发库?

eclipse - 无法解析 MavenProject 的依赖项

c++ - 如何在 OSX 上构建 FlatBuffers ?

scala - Spark 和 Hadoop 测试方法