massive-oss / minject

A Haxe port of the ActionScript 3 SwiftSuspenders IOC library with efficient macro enhanced type reflection. Supports AVM1, AVM2, JavaScript, Neko and C++.
open.massiveinteractive.com
Other
54 stars 22 forks source link

Does not work with the compilation server #57

Open kevinresol opened 8 years ago

kevinresol commented 8 years ago

Because the addMeta method is registered as a build macro of Injector, meaning that if Injector is cached by the compilation server and no need to be bulit again, minject will fail at runtime because the required metas are absent. (https://github.com/ufront/ufront-mvc/issues/53, https://github.com/HaxeFoundation/haxe/issues/4892)

I have fixed that by moving the onGenerate registration to extraParams.hxml (source). That works well but not optimal, because onGenerate re-processes all types every time. So I further improved it to use tink_syntaxhub, making it process only changed/uncached types. And the source is here.

Please let me know which solution you prefer and I will make the PR correspondingly.

cmandlbaur commented 7 years ago

Any update on this?