ClojureScript

Fix module processing after latest Closure changes

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: 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}.

  1. CLJS-2389-1.patch
    12/Dec/17 12:20 PM
    13 kB
    Juho Teperi
  2. CLJS-2389-3.patch
    09/Jan/18 4:15 PM
    16 kB
    Juho Teperi
  3. CLJS-2389-4.patch
    09/Jan/18 4:34 PM
    17 kB
    Juho Teperi
  4. CLJS-2389-5.patch
    10/Jan/18 2:22 PM
    24 kB
    Juho Teperi
  5. CLJS-2389-6.patch
    08/Feb/18 3:47 PM
    26 kB
    Juho Teperi
  6. CLJS-2389-7.patch
    09/Feb/18 12:30 PM
    26 kB
    Juho Teperi

Activity

Juho Teperi made changes -
Field Original Value New Value
Attachment CLJS-2389-wip.patch [ 17450 ]
Juho Teperi made changes -
Assignee Juho Teperi [ deraen ]
Juho Teperi made changes -
Attachment CLJS-2389-1.patch [ 17553 ]
Juho Teperi made changes -
Attachment CLJS-2389-wip-2.patch [ 17612 ]
Juho Teperi made changes -
Attachment CLJS-2389-wip-3.patch [ 17616 ]
Juho Teperi made changes -
Attachment CLJS-2389-wip-3.patch [ 17616 ]
Juho Teperi made changes -
Attachment CLJS-2389-3.patch [ 17617 ]
Juho Teperi made changes -
Attachment CLJS-2389-4.patch [ 17618 ]
Juho Teperi made changes -
Assignee Juho Teperi [ deraen ] David Nolen [ dnolen ]
Juho Teperi made changes -
Attachment CLJS-2389-5.patch [ 17621 ]
Juho Teperi made changes -
Attachment CLJS-2389-6.patch [ 17693 ]
Juho Teperi made changes -
Attachment CLJS-2389-wip-2.patch [ 17612 ]
Juho Teperi made changes -
Attachment CLJS-2389-wip.patch [ 17450 ]
Juho Teperi made changes -
Attachment CLJS-2389-7.patch [ 17699 ]
David Nolen made changes -
Status Open [ 1 ] In Progress [ 3 ]
David Nolen made changes -
Approval Accepted [ 10005 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: