Hej all !
I went to an error saying in js that
o.iterator is not a function.
After digging it is because
haxe.ds.List.iterator where removed by DCE, and I use DCE in full mode.
I tried to add it in my code like that :
var list = new haxe.ds.List(); trace( list.iterator() );
It traces the iterator well, but I still got the error in the js console…
I succeded adding that in the .hxml :
--macro haxe.macro.Compiler.keep( "haxe.ds.List" )
So I have some questions :
- DCE offers 3 modes, there isn’t any mode that enables DCE working on all classes but not in std. While we should be careful while coding our custom classes with DCE in full mode, we can’t control the std classes. Would it be a good idea to have a DCE mode only running in custom classes and not on std ones ?
haxe.macro.Compiler.keepenables to add
@:keepmetadata on classes and packages but not in a specific method. Would it be good to have an additionnal arg to specify methods to keep ? (I know we can do it by ourselves using a custom macro, but…blablabla )