Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18736

Log pollution from closure compiler

    XMLWordPrintable

Details

    • Easy

    Description

      In a jsx, having such a function with this jsdoc annotation:

      /**
       * @param {object} [options]
       * @param {boolean} [options.property]
       */
      function (options) {
        // ...
      }

      will produce the following warning in the instance logs:

      com.google.javascript.jscomp.LoggerErrorManager println
      WARNING - [JSC_INVALID_PARAM] Parse error. invalid param name "options.property"
        3|      * @param {boolean} [options.property]
                                   ^
      

      This is due to an issue from the closure compiler, that does not support this valid jsdoc syntax.

      There would be two fixes to do:

      1. Add a --jscomp_off=nonStandardJsDocs parameter during the minification of the jsx code by the closure compiler (probably here?)
         
      2. Also modify the configuration of the closure compiler inside the pom.xml of xwiki-plaform-web-war to also fix this problem during maven builds. We would have to use this configuration tag

      Attachments

        Activity

          People

            Unassigned Unassigned
            cdesableau Clément Desableau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: