【发布时间】:2021-04-12 19:11:03
【问题描述】:
在我的项目中,Scala/SBT 构建在compile 步骤中无限挂起。重现:
git clone https://github.com/gdiet/backup.git
cd backup
# fist the good case - compiles in less than 30s (when dependencies are fetched etc. etc.)
git checkout e8bdc8a1e878bd15129f08b20df51d54ebd86e4a
sbt compile
# now the problem - compile hangs infinitely
git checkout b273a531c19ad68600026429643e13c6d2761c16
sbt compile
(抱歉,我无法创建一个最小的演示示例。)“干净”没有帮助。我可以使用 SBT、IntelliJ IDEA 和 Docker 在我的 Linux 系统上重现该问题。对于 Docker,运行
# reproduce the problem in Docker - compile hangs infinitely
git checkout b273a531c19ad68600026429643e13c6d2761c16
./build-app.sh
问题:
- 如何确定这是 scalac 问题还是 SBT 问题,以便打开错误?
- 如何获得有关构建挂起原因的更多信息,以便尝试避免该问题?
【问题讨论】:
-
这两次提交之间有什么显着变化?
-
好像和
sbt没有关系,如果你运行git diff e8bdc8a1e878bd15129f08b20df51d54ebd86e4a..b273a531c19ad68600026429643e13c6d2761c16你会发现很多变化。此外,如果您只是恢复到旧的 sbt (1.4.5) - 它也会挂起