teamcfadvance / cfstatic

CfStatic is a framework for managing the inclusion and packaging of CSS and JavaScript in CFML applications.
https://teamcfadvance.github.io/cfstatic
MIT License
102 stars 35 forks source link

Page is blank on initialization when using static dependency files #79

Closed cfGothChic closed 11 years ago

cfGothChic commented 11 years ago

Is there a way I can debug the initialization when static dependency files are being used? We have a complex js dependency file (500+ lines) and I am trying to make one file dependent on another. I can initialize cfstatic successfully with these two files defined with other dependencies, but when i try to set up the new dependency I get a blank page. No changes are made to the js itself. I suspect there is a circular dependency that is causing an infinite loop, but I can not figure out how to debug it to determine its cause. Is there something I can try?

DominicWatson commented 11 years ago

Dang, I commented on this yesterday and the comment has disappeared.

In short, there is no official way to debug the initialization. The CFC DependencyFileParser.cfc would be a good bet if you wanted to do some rough debugging, i.e. to dump the result of parse() method on line 40.

I've just committed a fix for the recursive dependencies problem. You should now be able to declare recursive dependencies without CfStatic blowing up. I would expect to see an out of memory error with recursive dependencies, but perhaps your environment is causing a different behaviour.

The latest release is 0.6.1. Let me know if that solves the problem for you. Would love to see that 500+ lines of dependencies, sounds fun...

cutterbl commented 11 years ago

It is fun (Daria works with me), and if I can find your email address I'll send you a copy.

CSS dependency file - 146 lines JS dependency file - 519 lines

DominicWatson commented 11 years ago

Dang, been horribly busy and haven't been receving GH notifications in my email. Did the recursive fix solve the problem? Or did you get to the bottom of it some other way?

DominicWatson commented 11 years ago

Going to close this for now. Let me know if still needs looking at.

D