-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Replace Istanbul for instrumentation? #217
Conversation
👍 I like the name! |
@bcoe would love your thoughts on this when you have a chance. |
@novemberborn haven't missed this pull request; just want to collect my thoughts and give some good feedback (busy week). |
@bcoe no worries :) |
@novemberborn I'm going to dig into this code more thoroughly this weekend, and play. But wanted to give you some initial feedback. I think the idea of a competing code-coverage library that is suited to ES2015 is smart, and will help push forward both Istanbul and Copenhagen. I also feel, however, that Istanbul has a lot going for it:
What I'd love to see is this:
|
Absolutely! I think it does several things at once though:
Copenhagen only covers the first item, but with the right breakdown for integrating with tools like nyc and AVA. Plus it provides a way of instrumenting any source that compiles to JavaScript. |
@novemberborn could we work on building out a suitable integration point in Istanbul, such that we could configure an alternative instrumenter? |
I think #117 is a good place to start with this. If we modularize there various components of |
@bcoe, but we're essentially already doing that. nyc decides what files to instrument, calls out to Istanbul to do the actual instrumentation, stores the coverage data, and then combines it all so Istanbul can generate its reports.
@jamestalmage yea I've thought about that. The reporting code that Copenhagen generates will be able to take input source maps into account, and then it won't be hard to map the raw usage data back to the source files. Of course you'd need to generate reporting code for the original sources. There would have to be some glue code in nyc (mostly to map sources to the reporting code etc) but that'd be pretty minimal. |
@novemberborn would definitely land this if you can get it to the point that tests pass, and we can swap in copenhagen is a drop in replacement for istanbul -- I think probably istanbul should be the default, and we'd point folks at copenhagen for ES2015? |
@bcoe cool! I'll have a think about structuring the required work across the various projects.
Yea that'd be a good place to start. We'll have to see how Copenhagen shapes up. |
@novemberborn closing this pull for now; waiting with bated breath for the drop in API replacement. |
But istanbul is still not instrumenting all sources, despite the `include-all-sources` option. Hopefully, this goes away when istanbul is replaced in istanbuljs/nyc#217
But istanbul is still not instrumenting all sources, despite the `include-all-sources` option. Hopefully, this goes away when istanbul is replaced in istanbuljs/nyc#217
Issues like #198, #183 and #168 have caused me to reflect on nyc's use of Istanbul. I think we should replace Istanbul for our instrumentation purposes. To this end I've started Copenhagen. This PR is a proof-of-concept of integrating Copenhagen with nyc. You can find a sample project at https://github.com/novemberborn/nyc-copenhagen-poc.
Please read the Background section for context but the tl;dr is that Copenhagen will enable us to:
Thoughts?