DaanVanYperen / artemis-odb-contrib

Drop-in extensions for artemis-odb. Prefab systems, components, networking, events!
MIT License
75 stars 19 forks source link

GWT compilation fails because of 'nanoTime' #101

Closed david-westreicher closed 9 years ago

david-westreicher commented 9 years ago

I am using artemis odb-contribs with libgdx. In particular just a fork of artemis-quickstart. In libgdx there is a gradle build task which should compile the game to GWT. I get the following error:

Compiling module net.mostlyoriginal.game.GdxDefinition
   Validating units:
      [ERROR] Errors in 'jar:file:/home/david/.gradle/caches/modules-2/files-2.1/net.mostlyoriginal.artemis-odb/contrib-core/0.11.4/a2908d81178a0643074107aba6287612251e4440/contrib-core-0.11.4-sources.jar!/net/mostlyoriginal/api/system/core/TimeboxedProcessingSystem.java'
         [ERROR] Line 121: The method nanoTime() is undefined for the type System
   [ERROR] Aborting compile due to errors in some input files

It seems that TimeboxedProcessingSystem.java uses nanoTime() which isn't supported in GWT. Is this expected behaviour or is there a way to still compile it to GWT?

I normally don't start every sentence with i

DaanVanYperen commented 9 years ago

This is fixed in the develop branch, if you know how to compile and install those in your local maven repo. I'll push out a fix for contrib this weekend!

If under time constraints you could maven install develop branch yourself and use it in your project, or strip out contrib.

david-westreicher commented 9 years ago

Thx a lot! I'll try the dev branch.

DaanVanYperen commented 9 years ago

Or i'll forget to publish ;)

DaanVanYperen commented 9 years ago

It's ready, just waiting for odb 0.13 to be released during the next few days.

DaanVanYperen commented 9 years ago

https://github.com/DaanVanYperen/artemis-odb-contrib/releases/tag/v1.0.0

:D