tntim96 / JSCover

JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage
GNU General Public License v2.0
399 stars 84 forks source link

Replace Mozilla's Rhino AST Engine with Google's Closure Compiler's #255

Closed tntim96 closed 7 years ago

tntim96 commented 7 years ago

Development on Rhino has all but stopped, however the closure-compiler, whose AST engine was originally based on Rhino, is still going strong. Converting from one to the other should be fairly straight-forward, and allow this project to support more JavaScript language features.

Work has already begun in the closure-compiler branch. The approach so far has been to take the most isolated classes, and write a second set of implementations and tests (e.g. see StatementBuilder and StatementBuilderCC, and StatementBuilderTest StatementBuilderCCTest.

Order of work will be like:

  1. Create CC version of StatementBuilder and test (Done)
  2. Create CC version of BranchStatementBuilder and test (Done)
  3. Create InstrumenterCCTest and re-write any implementation required to get all tests working (Done)
  4. Create InstrumentCCAndHighlightRegressionTest. Re-organize to make tests independent of the Rhino ones. (Done)
  5. Create BranchInstrumentorCCTest and get working (Done)
  6. Create BranchInstrumentorCCIntegrationTest and get working. Replace Rhino runtime evaluation with Nashorn (Done)
  7. Get all acceptance tests (i.e. HTML Unit) working (Done)
  8. Update documentation (Done)
  9. Add detailed release note or wiki page on what has changed
  10. Create 2.0 release swapping from Rhino to Closure Compiler
  11. Optional - Look at replacing Mozilla JSON parsing with something else - Gson

Any potential contributor's, let me know what can work on in the immediate future, and I'll create a new issue for that. Rather than replying here, please use https://gitter.im/JSCover/closure-compiler-conversion