Skip to content
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

Coffee-coverage fails since Coffeescript@2.5.0 was released #99

Open
CSester opened this issue Jan 22, 2020 · 5 comments
Open

Coffee-coverage fails since Coffeescript@2.5.0 was released #99

CSester opened this issue Jan 22, 2020 · 5 comments

Comments

@CSester
Copy link

CSester commented Jan 22, 2020

Coffee-coverage crashes since coffee-script 2.5.0 was released with following trace:

Error: Don't know how to insert statement into If.elseBody: undefined
at NodeWrapper.insertAtStart (project/node_modules/coffee-coverage/lib/NodeWrapper.js:209:15)
at Istanbul.visitIf (project/node_modules/coffee-coverage/lib/instrumentors/Istanbul.js:307:14)
at runVisitor (project/node_modules/coffee-coverage/lib/coffeeCoverage.js:402:22)
at project/node_modules/coffee-coverage/lib/coffeeCoverage.js:415:16
at NodeWrapper.forEachChildOfType (project/node_modules/coffee-coverage/lib/NodeWrapper.js:76:13)
at node.children.forEach (project/node_modules/coffee-coverage/lib/NodeWrapper.js:59:23)
at Array.forEach (:null:null)
at NodeWrapper.forEachChild (project/node_modules/coffee-coverage/lib/NodeWrapper.js:58:35)
at runVisitor (project/node_modules/coffee-coverage/lib/coffeeCoverage.js:414:26)
at project/node_modules/coffee-coverage/lib/coffeeCoverage.js:415:16
at NodeWrapper.forEachChildOfType (project/node_modules/coffee-coverage/lib/NodeWrapper.js:76:13)
at node.children.forEach (project/node_modules/coffee-coverage/lib/NodeWrapper.js:59:23)

@oozcitak
Copy link

I have the same error:

Error: Don't know how to insert statement into If.elseBody: undefined

I also confirm that downgrading to coffeescript 2.4.1 fixes this.

@STRd6
Copy link

STRd6 commented Feb 21, 2022

I'm working on a fix for this on my fork.

Here's a patch that should be good until I can cut a release: DanielXMoore@6cd95a2

@jwalton
Copy link
Contributor

jwalton commented Feb 21, 2022

I no longer work at Benbria so I can’t push to this repo anymore, and I haven’t written any coffee-script in a very long time. Benbria never moved to a 2.x release of coffee-script because we figured it would be easier to decaffeinate our code base than to figure out all the problems involved with upgrading to 2.x. (I don’t think we were even on the latest 1.x, because it has breaking changes for us.) So I doubt Benbria had much interest in maintaining this, unfortunately.

@STRd6
Copy link

STRd6 commented Feb 21, 2022

Thanks for the update Jason.

I've still got a need for this in my life so I'll see if I can maintain an up to date fork for myself and the half dozen of us still using CoffeeScript :)

Also I just wanted to say "Thank you!" for the work you've done on this over the years, it made my life better for sure.

@jwalton
Copy link
Contributor

jwalton commented Feb 22, 2022

@STRd6 Aw, thanks Daniel! That's kind of you to say. This was a fun project to work on. I started this only a few weeks after learning Coffee-Script. The first thing I needed to do was to get coffee-script to accept a PR so it tracked the line number/column number all the way through the compiler, and in order to do that I ended up implementing the first version of source-maps in the coffee-script compiler. :) It was lots of fun. Good luck keeping it running!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants