In Scala, using sbt, I'm curious what I can expect if I:
- Define two different classes with same name, definition, and classpath in two differently named libraries (imagine
case class User(name: String, age: Int)in two places, but one hasrequire(age >= 0)) - Depend on those two libraries in
build.sbt - Reference that class in code that successfully compiles and passes tests
- Publish that code as a library that is then run elsewhere
My specific question is, At what points are those classes chosen ambiguously? That is, at what points of the compilation, publishing, and application launch processes might the prevailing class alternate between one definition and the other?
This is for a Play Framework application, though I don't think it makes a difference. Also this is for SBT v0.13, which uses Ivy for dependency management.