maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
726 stars 58 forks source link

munge library import in generated code #48

Closed rjpower closed 11 years ago

rjpower commented 11 years ago

This popped up when I was trying to use the better-stack-traces with iced-coffee-script. I was using:

iced = require 'iced-coffee-script' require('better-stack-traces').install({ coffee : iced })

and was rather confused that everything started breaking. It looks like the generated output imports the iced-coffee-script library as 'iced' and so it was conflicting with my require. Would it make sense to prefix it like the other helpers (_iced*)?

maxtaco commented 11 years ago

Hi Russ, I really like this idea, but unfortunately the horse is out of the barn. The proposed change will break a lot of code in the wild that expects iced.Rendezvous and friends to work as spelled. It's probably much easier for you to work around it. Sorry!

rjpower commented 11 years ago

Ooops, hadn't thought about that! I'm still just trying out the basic stuff!

Working around it is not a problem.

maxtaco commented 11 years ago

Yeah, it's a shortfall in the current implementation; iced is essentially a keyword as implemented. Definitely something to fix in a future major release.