mirror of
https://github.com/sbt/sbt.git
synced 2026-09-04 08:45:56 +02:00
af16d33700ed6ec0128559ac4e4d7edb10628c9c
We have seen failures in scripted to create the output file for streams and it has also been reported in https://github.com/sbt/sbt/issues/5067. I believe this may caused by the same stream output being initialized by multiple tasks. To fix this, I add locking on a per-file basis. There was (and is) additional synchronization on the Streams _instance_, but the per-file locks are stored in the Streams companion object so the locking should be honored no matter which Streams instance calls make. I also skip the call to IO.touch if the file already exists. I believe that this is the common case and since IO.touch was being called with setModified = false, it should be fine to skip the touch when the file exists. Prior to this change, I was able to induce the issue in #5067 in roughly 1/50 of calls to `scripted actions/cross-multiproject`. I wasn't able to reproduce after this change.
…
sbt
sbt is a build tool for Scala, Java, and more.
For general documentation, see http://www.scala-sbt.org/.
sbt 1.x
This is the 1.x series of sbt. The source code of sbt is split across several GitHub repositories, including this one.
- sbt/io hosts
sbt.iomodule. - sbt/util hosts a collection of internally used modules.
- sbt/librarymanagement hosts
sbt.librarymanagementmodule that wraps Ivy. - sbt/zinc hosts Zinc, an incremental compiler for Scala.
- sbt/sbt, this repository hosts modules that implements the build tool.
Other links
- Setup: Describes getting started with the latest binary release.
- FAQ: Explains how to get help and more.
- sbt/sbt-zero-seven: hosts sbt 0.7.7 and earlier versions
Issues and Pull Requests
Please read CONTRIBUTING carefully before opening a GitHub Issue.
The short version: try searching or asking on StackOverflow.
license
See LICENSE.
Languages
Scala
94.5%
Java
3.1%
Shell
1.1%
Batchfile
0.9%
Roff
0.2%
Other
0.1%