Open timmfin opened 10 years ago
Thanks Tim, reproducing it in a test was a big part of the battle.
haha -- I was ready to post the same test, but I am running against release 0.5.2 source and getting this:
Running "jasmine:src" (jasmine) task
Testing jasmine specs via phantom
...............x
Mixen:: should be able to traverse super chain for mixed-in mixens: failed
RangeError: Maximum call stack size exceeded. in file:///Users/psnyder/Downloads/mixen-0.5.2/mixen.js (line 109) (1)
16 specs in 0.375s.
>> 1 failures
As a workaround, I am mixing everything into my base classes instead of just the classes that need them, which seems to contradict the stated benefits of the module -- bummer. Is there a better workaround? Is there an expectation of releasing a fix? Or does this look like a permanent limitation?
I found a case where the fixes/improvements in https://github.com/HubSpot/mixen/pull/5/files don't work. Here is an erroring spec:
It is the same test as "should be able to mixin mixens (not constructor)" but switches the order of
Module3
andModule12
in definition ofModule312
.When run, the output is
-1--12--312-
, so theinit
func ofModule2
andModule3
are never called.ps: I know the maintainers might not have time right now to look into this, but I wanted to write the bug so others were aware. (I took a little bit of a shot, but didn't have much luck in my first attempt).