Skip to content

Conversation

@haberbyte
Copy link
Contributor

This fixes the empty source file issue.

Also related and closes rails/ruby-coffee-script#13

@haberbyte
Copy link
Contributor Author

Ah sorry, do not merge yet. This brakes the regular task without MINIFY=false
Working on it!

@haberbyte
Copy link
Contributor Author

haberbyte commented Dec 15, 2016

OK, now both commands:

$ MINIFY=false bin/cake build:browser
built ... running browser tests:
passed 788 tests in 6.00 seconds

and

$ bin/cake build:browser
built ... running browser tests:
passed 788 tests in 6.03 seconds

are working as expected.

@connec
Copy link
Collaborator

connec commented Dec 15, 2016

As is was broken by #4376 I'd suggest the fix should be to replace {compiledCode} = ... with the original {code} = ... on line 188 (instead of resetting code = compiledCode).

Regardless there should probably be a 1.12.2 pretty soon...

@haberbyte
Copy link
Contributor Author

haberbyte commented Dec 15, 2016

Just renaming compiledCode to code introduced another issue on my machine.

$ bin/cake build:browser
built ... running browser tests:
/Users/jan/Downloads/coffeescript/Cakefile:318
    CoffeeScript.register();
                ^

TypeError: Cannot read property 'register' of undefined
  at runTests (/Users/jan/Downloads/coffeescript/Cakefile:318:17)
  at Object.action (/Users/jan/Downloads/coffeescript/Cakefile:408:12)
  at invoke (/Users/jan/Downloads/coffeescript/lib/coffee-script/cake.js:44:26)
  at Object.action (/Users/jan/Downloads/coffeescript/Cakefile:140:12)
  at invoke (/Users/jan/Downloads/coffeescript/lib/coffee-script/cake.js:44:26)
  at Object.exports.run (/Users/jan/Downloads/coffeescript/lib/coffee-script/cake.js:70:20)
  at Object.<anonymous> (/Users/jan/Downloads/coffeescript/bin/cake:7:38)
  at Module._compile (module.js:571:32)
  at Object.Module._extensions..js (module.js:580:10)
  at Module.load (module.js:488:32)
  at tryModuleLoad (module.js:447:12)
  at Function.Module._load (module.js:439:3)
  at Module.runMain (module.js:605:10)
  at run (bootstrap_node.js:420:7)
  at startup (bootstrap_node.js:139:9)
  at bootstrap_node.js:535:3

This is why i went this way to fix it.
If there is a cleaner way i'm happy to change the fix, going to bed now though ;-)

@connec
Copy link
Collaborator

connec commented Dec 15, 2016

Oops, that's by bad. It would need to be { compiledCode: code } = ...

@haberbyte
Copy link
Contributor Author

Ah i see, yes that's much nicer! Thanks @connec, adjusted the fix!

Going to bed now for real 🛏 😄

@GeoffreyBooth GeoffreyBooth merged commit 8117418 into jashkenas:master Dec 16, 2016
@GeoffreyBooth
Copy link
Collaborator

Thanks!

EsrefDurna pushed a commit to EsrefDurna/coffeescript that referenced this pull request Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken coffee-script-source gem 1.12.1

3 participants