mirror of https://github.com/sbt/sbt.git
There have been a number of complaints about the new classloader closing behavior. It is too aggressive about closing classloaders after test and run. This commit softens the behavior by allowing a classloader to be resurrected after close by creating a new zombie classloader that has the same urls as the original classloader. After this commit, we always close the classloaders when we are done, but they can still leak file descriptors if a zombie is created. To configure the behavior, I add the allowZombieClassLoaders key. If it is false (which is default), we will warn but still allow them. If it is true, then we silence the warning. In a later version of sbt, we can change the semantics to be strict. I verified after this change that I could add a shutdown hook in `run` and it would be evaluated so long as I set `bgCopyClasspath := false`. Otherwise the needed jars were deleted before the hooks could run. Bonus: delete unused ResourceLoaderImpl class |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||