mirror of https://github.com/sbt/sbt.git
There was a bug where sometimes a source file change would not trigger a new build if the change occurred during a build. Based on the logs, it seemed to be because a number of redundant events were generated for the same path and they triggered the anti-entropy constraint of the file event monitor. To fix this, I consolidated a number of observers of the global file tree repository into a single observer. This way, I am able to ensure that only one event is generated per file event. I also reworked the onEvent callback to only stamp the file once. It was previously stamping the modified source file for all of the aggregated tasks. In the sbt project running `~compile` meant that we were stamping a source file 22 times whenever the file changed. This actually uncovered a zinc issue though as well. Zinc computes and writes the hash of the source file to the analysis file after compilation has completed. If a source file is modified during compilation, then the new hash is written to the analysis file even when the compilation may have been made against the previous version of the file. Zinc will then refuse to re-compile that file until another change is made. I manually verified that in the sbt project if I ran `~compile` before this change and modified a file during compilation, then no event was triggered (there was a log message about the event being dropped due to the anti-entropy constraint though). After this change, if I changed a file during compilation, it seemed to always trigger, but due to the zinc bug, it didn't always re-compile. |
||
|---|---|---|
| .github/ISSUE_TEMPLATE | ||
| core-macros/src/main/scala/sbt/internal/util/appmacro | ||
| internal | ||
| launch | ||
| licenses | ||
| main | ||
| main-actions/src | ||
| main-command/src | ||
| main-settings/src | ||
| notes | ||
| project | ||
| protocol/src/main | ||
| run | ||
| sbt/src | ||
| scripted-plugin/src/main/scala/sbt | ||
| scripted-sbt-old/src/main/scala/sbt/test | ||
| scripted-sbt-redux | ||
| src/main/conscript | ||
| tasks | ||
| tasks-standard | ||
| testing | ||
| vscode-sbt-scala | ||
| zinc-lm-integration/src | ||
| .appveyor.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .java-version | ||
| .mailmap | ||
| .sbtopts | ||
| .scalafmt.conf | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| DEVELOPING.md | ||
| LICENSE | ||
| NOTICE | ||
| PROFILING.md | ||
| README.md | ||
| SUPPORT.md | ||
| build.sbt | ||
| reset.sh | ||
| sbt-allsources.sh | ||
| server.md | ||
README.md
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.