Reputation: 9418
The ant javac and depend tasks got some limitations such that they were not safe for production building. In some occasions javac and depend could not detect the neccessity to recompile some class files when source files changed.
Do these limitations still apply for sbt incremental compilation for java or is it safe to incrementally build production packages with it?
Upvotes: 0
Views: 432
Reputation: 167881
Unless your incremental compilation is provably equivalent to full compilation (and SBT does not make that guarantee, even though it's pretty good about it), you are taking a risk building a production package off of an incremental build.
The reason is that your artifact might possibly be history-dependent, so that bugs in it cannot properly be found and fixed. If that doesn't scare you for something that goes into production, go right ahead and use SBT (or Ant!) to incrementally build and deploy.
Otherwise, it's worth the time to build from scratch, especially with Java sources which tend to compile quickly.
Upvotes: 2