Remove retry of failed coffeescript compilation from require

This commit is contained in:
Corey Johnson & Kevin Sawicki
2013-02-11 10:27:07 -08:00
parent a61b0ab9da
commit 91ce3ce0b3

View File

@@ -63,19 +63,9 @@ exts =
compiled = CoffeeScript.compile(__read(file), filename: file)
writeToCache = true
try
evaluated = exts.js(file, compiled)
$native.write(cacheFilePath, compiled) if writeToCache
evaluated
catch e
if retry
# Attempt a second compile to work around mysterious CEF/CoffeeScript
# timing issue where the CoffeeScript compiler generates invalid
# JavaScript such as [object Object].
console.warn "Error evaluating #{file}. Trying again...", e.stack
exts.coffee(file, false)
else
throw e
getPath = (path) ->
path = resolve(path)