在circleci上运行测试时获取文件名太长

时间:2017-07-10 21:53:15

标签: 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]                  ^

1 个答案:

答案 0 :(得分:2)

您的文件长度是

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