google / closure-compiler-js

Package for the JS version of closure-compiler for use via NPM
https://github.com/google/closure-compiler
Apache License 2.0
1.84k stars 64 forks source link

jscomp_off, jscomp_warning and jscomp_error options not available in JS version #73

Closed nazar-pc closed 6 years ago

nazar-pc commented 7 years ago

Latest JS version simply do know understand these options:

Exception: closure compiler error: { Error: java.lang.RuntimeException: Unhandled flag: jscomp_off
    at KI.nG [as Tf] (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:7823:22584)
    at KI.qG [as Vf] (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:7823:22779)
    at KI.lG (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:2257:48)
    at KI.tG (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:616:19)
    at KI (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:618:19)
    at Ccd (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:7440:77)
    at aJ (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:1782:29)
    at dJ (/media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:3102:44)
    at /media/Data/emscripten/node_modules/google-closure-compiler-js/jscomp.js:3289:46
    at module.exports (/media/Data/emscripten/node_modules/google-closure-compiler-js/compile.js:31:15)
    at ready (/media/Data/emscripten/node_modules/google-closure-compiler-js/cmd.js:107:18)
    at Promise.all.then.arr (/media/Data/emscripten/node_modules/google-closure-compiler-js/cmd.js:58:45)
    at <anonymous>
  '__java$exception': 
   { f: null,
     e: 'Unhandled flag: jscomp_off',
     backingJsObject: [Circular] } }
MatrixFrog commented 7 years ago

Was this working in a previous version? Which one? I'm not sure if we actually ported these flags to the JS version or not.

nazar-pc commented 7 years ago

No, it didn't work in previous versions either

nazar-pc commented 7 years ago

@MatrixFrog is it difficult to expose these options in JS version?

qudg74 commented 6 years ago

@samthor, will you have time to look into this? I'd love to see these flags, too and say goodbye to Java.

ChadKillingsworth commented 6 years ago

This is now supported. Deployment has moved to https://github.com/google/closure-compiler-npm

philipwalton commented 6 years ago

@ChadKillingsworth I see you marked this as supported and tagged it with fixed-in-next-release. Do you know when that release is shipping?

I looks like several versions of the main closure compiler project have been released since.

ChadKillingsworth commented 6 years ago

The release has shipped - but it has moved to the main npm repo. The JS version is now distributed there. This repo no longer is active.

philipwalton commented 6 years ago

Ahh, I see. It'd be nice if this repo's README were updated to explain that it's no longer being updated (currently that's not at all clear).

You might also consider adding a deprecation warning when users npm install it.

/cc @samthor