harrah/xsbt — Issue #260: ClassNotFoundException after renaming class with duplicate name
Author: waywardmonkeys
Created: 2011-11-08 09:21:14+00:00
State: open

This is my own fault, but I'm not sure if sbt could do a better job of dealing with it.

1. I have a file `ATest.scala`. It contains class `ATest`.
2. I make a copy to `BTest.scala` and make some changes, but *forget* to rename the class to `BTest`.
3. I run `test`
4. I see that only my new tests run and the old ones do not. I realize that I forgot to rename the class.
5. I rename the class to `BTest` and build and run `test`.
6. I now get an error:

````
[error] Could not run test com.acme.ATest: java.lang.ClassNotFoundException: com.acme.ATest
````

The obvious fix was to just go and touch `ATest.scala` to get around this.