Search code examples
javascriptgoogle-closure-compilersoy-templates

Closure Compiler (soy) - [JSC_BAD_JSDOC_ANNOTATION] Parse error. illegal use of unknown JSDoc tag "consistentIdGenerator"


After upgrading to the latest closure compiler jar I am getting this error:

/home/users/****/js/lib/soyutils.js:1685: 

WARNING - [JSC_BAD_JSDOC_ANNOTATION] Parse error. illegal use of unknown JSDoc tag "consistentIdGenerator"; ignoring it
 * @consistentIdGenerator

How can I fix this issue?


Solution

  • According to my research you'll want to convert @consistentIdGenerator to

    @idGenerator {consistent}.

    It seems that @consistentIdGenerator has been deprecated:

    NOTE: There are three deprecated variants: @idGenerator, @consistentIdGenerator, and @stableIdGenerator. These map to @idGenerator {unique}, @idGenerator {consistent}, and @idGenerator {stable}. Support for these will be removed in a future compiler release.

    Dorthy Ann from The Magic School Bus