You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that the feature was marked as experimental but anyways. I tried the example supplied, which didn't seem to be working, so I ended up digging in to see what's going on. I tore apart the code that is wrapped around each file that is compiled with the contracts flag. I set up a similar small example to test.
An uncaught error happens!
fyi: I checked by compiling without contracts that the error is not my module definition.
UncaughtTypeError: undefinedisnotafunction
If wanted I can create a gist with the code to illustrate the error. If you have any pointers I can look on how to fix it myself.
Here is the relevant part of the code injected by the contracts.coffee compiler: https://gist.github.com/froginvasion/6925391 I annotated it, but this piece of code doesn't particularely make much sense to me. I put it next to the implementation of define in require.js but more than a general sense of what's actually happening I don't have.
Maybe a solution is reverting to an older version of require.js? This is what i'll try next.
The text was updated successfully, but these errors were encountered:
Sorry about the delayed response. Did reverting to an older version of require.js work for you? If not could you post the entire compiled script that is failing for you? I'm guessing that the __contracts function is not getting bound correctly.
For me, using either chrome-stable with flags enabled or Firefox 25 the initial test failes in contracts.coffee/test/webtest/modules.html. You are correct in your assumption. Firebug reports TypeError __contracts is null. Any input on how to fix this? I debugged the code that contracts.coffee generates to support Require.js but couldn't exactly figure out what the problem is. Thanks for your response! (And sorry for my own late response)
I know that the feature was marked as experimental but anyways. I tried the example supplied, which didn't seem to be working, so I ended up digging in to see what's going on. I tore apart the code that is wrapped around each file that is compiled with the contracts flag. I set up a similar small example to test.
fyi: I checked by compiling without contracts that the error is not my module definition.
If wanted I can create a gist with the code to illustrate the error. If you have any pointers I can look on how to fix it myself.
Here is the relevant part of the code injected by the contracts.coffee compiler: https://gist.github.com/froginvasion/6925391 I annotated it, but this piece of code doesn't particularely make much sense to me. I put it next to the implementation of define in require.js but more than a general sense of what's actually happening I don't have.
Maybe a solution is reverting to an older version of require.js? This is what i'll try next.
The text was updated successfully, but these errors were encountered: