fwbrasil / activate

Abandoned: Pluggable persistence in Scala
GNU Lesser General Public License v2.1
299 stars 46 forks source link

Cross build for Scala 2.10 and Scala 2.11 #165

Closed Alain-Bearez closed 6 years ago

Alain-Bearez commented 10 years ago

I did correct some tests that were failing due to different order of properties in JSON, after I updated the dependencies.

However the 84 failing tests (using the "memory turn") are in an illegal state which I could not understand, as per following trace:

[info] Activate should
[info] ! provide direct access to the storage
[error]    IllegalStateException: :
[error] There should be one and only one context that accepts class net.fwbrasil.activate.migration.StorageVersion.
[error] Maybe the context isn't initialized or you must override the contextEntities val on your context.
[error] Important: The context definition must be declared in a base package of the entities packages.
[error] Example: com.app.myContext for com.app.model.MyEntity.
[error] Found contexts: List(ActivateContext: memoryContext, ActivateContext: readValidationContext)  (RichList.scala:41)
[error] net.fwbrasil.activate.util.RichList.onlyOne(RichList.scala:41)

As for the case of the whole Reflection file to be marked as changed only the following method (at line 123) has really been changed:

def getAllImplementorsNames(classpathHints: List[Any], interfaceClass: Class[_]) = {
  val hints = reflectionsHints(classpathHints ++ List(interfaceClass))
  val store = reflectionsFor(hints).getStore
  val subtypes = store.getAll(classOf[SubTypesScanner].getSimpleName, interfaceClass.getName)
  subtypes.toSet
}
fwbrasil commented 9 years ago

Hi @Alain-Bearez, thanks for working on this and sorry for taking so long to give a feedback. Isn't it an alternative update to 2.11 in your projects? Activate relies on some assumptions about the byte code that has changed with the new scala version, so I think it isn't trivial to do the cross compilation.