autoBuild not running

54 views
Skip to first unread message

Bence Varga

unread,
Apr 14, 2015, 8:30:29 AM4/14/15
to haxe...@googlegroups.com
Hi,
I have an interesting issue and out of ideas:

I have an @:autoBuild defined on an interface. The macro is being run on some implementing classes but not on others.
Instantiating the class in the main() method or using @:keep or @:keepSub won't make any difference.

If I explicitly define @:build on the class it is executed.

Is there any known condition what can cause this behavior? (As you can see I was suspecting DCE interference, but it is clearly not the case.)

Thanks

clemos

unread,
Apr 14, 2015, 8:47:47 AM4/14/15
to haxe...@googlegroups.com
If you use the compilation server, you may have such issues with caching, ie if the compiler detemines that your class doesn't need to be "rebuild".
If this @:autoBuild macro has a side effect (such as iterating a value in a file or stuff like that) and you want to make sure it runs at every compilation, you may want to flush that cache at every compilation.
Thing is, I don't really remember how to do such a thing :)

Best,
Clément

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Bence Varga

unread,
Apr 14, 2015, 9:19:17 AM4/14/15
to haxe...@googlegroups.com
I'm using a .hxml -based local build, manually wiping the target directories before each build, so I don't think it is a caching issue. Also making changes to the file does not change the behavior.

clemos

unread,
Apr 14, 2015, 9:27:14 AM4/14/15
to haxe...@googlegroups.com
Some code would be more convenient ;)

Bence Varga

unread,
Apr 14, 2015, 9:49:39 AM4/14/15
to haxe...@googlegroups.com
I bet it would ;) Give me some time, it is a work project I will have to make a sanitized version.

Bence Varga

unread,
Apr 14, 2015, 10:19:28 AM4/14/15
to haxe...@googlegroups.com
Ok, sorry, it was me.... 

The interface (more exactly an other interface with the same name) was imported from the wrong package. The "old" one did not have my macro on it. I should have thought it was something like this.

Thanks for your help, Clemos.
Reply all
Reply to author
Forward
0 new messages