Uploaded image for project: 'ClojureScript'
  1. CLJS-2389

Fix module processing after latest Closure changes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: None
    • Fix versions: None
    • Labels:
      None
    • Approval:
      Accepted

      Description

      New Closure-compiler doesn't add goog.provide/require calls to processed modules:

      https://github.com/google/closure-compiler/pull/2641

      > ES6 and CommonJS modules no longer generate synthetic goog.require and goog.provide calls.

      Currently

      {process-js-modules}

      uses

      {load-library}

      , which reads the goog.provide calls in the file, to determine the name for processed module, something like

      {module$absolute$path}

      .
      Now that the file doesn't have goog.provide call, this breaks.

      As the module name is based on file-path, we can determine the module name directly from filepath, Closure provides utility for this:

      {ModuleNames/fileToModuleName}

      .

        Attachments

        1. CLJS-2389-1.patch
          13 kB
        2. CLJS-2389-3.patch
          16 kB
        3. CLJS-2389-4.patch
          17 kB
        4. CLJS-2389-5.patch
          24 kB
        5. CLJS-2389-6.patch
          26 kB
        6. CLJS-2389-7.patch
          26 kB

          Activity

            People

            • Assignee:
              David Nolen
              Reporter:
              Juho Teperi
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: