meenie / munee

Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation
https://munee.herokuapp.com/
MIT License
833 stars 92 forks source link

Error on first request after changing CoffeeScript #10

Closed jrahmy closed 11 years ago

jrahmy commented 11 years ago

When ever I make changes to a CoffeeScript file, the first request throws the following errors:

screenshot

Subsequent requests are handled fine, returning the changes as normal.

meenie commented 11 years ago

Well that's weird! With regards to it not working on the first request and then being okay on the second, that's actually a deeper issue that I need to fix ASAP. What it does is cache the original fine right away. Then different processes are run over the content of that file before it's served up. So if for some reason there is an error, like the one above, it doesn't actually do any extra processing on the cached file and the subsequent request will actually just search the cached file rather than try and process it again. So I need to delete that cached file if there are any errors that happen.

Any other information you can provide other than what you have just above? Maybe the content of your CoffeeScript file?

Cheers, cody

jrahmy commented 11 years ago

Digging deeper into it, I wonder if it might just be down to the CoffeeScript compiler for PHP? The implementation seems a bit buggy in some areas.

The error above is thrown for me when any sort of modification is made. I can even blank the CoffeeScript file and get the error just by adding newlines.. so I'm not sure if it has to do with the content. I am including 3-4 other javascript files in the same request, but none of them are written in CoffeeScript.

If you can't reproduce it might just be something in my setup..

meenie commented 11 years ago

@pathetic, it does look like it is in the CoffeeScript php compiler as that's where the error is being thrown. I'm going to close this off for now. I would suggest using this class standalone: http://github.com/alxlit/coffeescript-php - If the bug doesn't show up, let me know. If the bug persists, then I susggest to raise a bug with http://github.com/alxlit/coffeescript-php

Cheers, cody