-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Line numbers shown as NaN
in stack trace when compiling CoffeeScript inside CoffeeScript
#4558
Comments
Can you narrow down when this broke? The coffee command is intended primarily for compiling and debugging, and is not as full featured as running via Node. |
NaN
in stack trace when compiling coffeescript inside coffeescript
NaN
in stack trace when compiling coffeescript inside coffeescriptNaN
in stack trace when compiling CoffeeScript inside CoffeeScript
it seems to be related to this pull request #4428 the problem is, that sourceMaps['< anonymous >'] is defined by running coffee and then is always returned for any file: quick workarounds would be to set options.filename to anything but anonymous or to set options.sourceMap to false |
…ps, more careful lookup of source maps especially for CoffeeScript code compiled within a Coffee script (. . . within a Coffee script, etc.)
…ript (#4645) * Don't throw an error in the console when loading a try: URL * Handle the possibility of compiling multiple scripts with the same filename, or multiple anonymous scripts * Fix #4558: Much more robust caching of sources and source maps, more careful lookup of source maps especially for CoffeeScript code compiled within a Coffee script (. . . within a Coffee script, etc.) * Reimplement `cake release` to just use the shell to avoid the issues plaguing that command (something to do with module caching perhaps)
Fixed by #4645. |
When calling the following script lineNumbers.coffee:
using
coffee lineNumbers.coffee
I get the following stacktrace:
When commenting the compile call out:
I get a reasonable line numbers:
This occurs using coffee-script 1.12.6. This behaviour is new, everything works correctly using coffee-script 1.12.1 and below. I also get proper line numbers using the newest coffeescript version when I execute the file using
node -r coffee-script/register lineNumbers.coffee
The text was updated successfully, but these errors were encountered: