anmonteiro / lumo

Fast, cross-platform, standalone ClojureScript environment
Eclipse Public License 1.0
1.88k stars 85 forks source link

Source map with optimizations cannot be built #361

Open arichiardi opened 6 years ago

arichiardi commented 6 years ago

This bug continues to bug us :smile:

git clone https://github.com/arichiardi/lumo-repros
cd lumo-repros
./scripts/build
...
{:main speed-of-light.core,
 :output-to "out/speed_of_light.js",
 :output-dir "out",
 :optimizations :advanced,
 :source-map "out/speed_of_light.js.map",
 :target :nodejs}
...
Applying optimizations :advanced to 46 sources
p.getLineCount is not a function
     HJ (google-closure-compiler-js.cljs:7737:245)
     l2c (google-closure-compiler-js.cljs:6713:84)
     zHb (google-closure-compiler-js.cljs:5842:99)
     P1c (google-closure-compiler-js.cljs:6145:152)
     tDb (google-closure-compiler-js.cljs:5056:103)
     iDb (google-closure-compiler-js.cljs:7117:315)
     jDb (google-closure-compiler-js.cljs:5569:102)
     yIb (google-closure-compiler-js.cljs:6208:201)
     TIb (google-closure-compiler-js.cljs:7722:452)
     (UIb.VIb)
     jJb (google-closure-compiler-js.cljs:4846:36)
     wIb (google-closure-compiler-js.cljs:1758:23)
     NIb (google-closure-compiler-js.cljs:6165:148)
     (OIb.PIb)
     jJb (google-closure-compiler-js.cljs:4846:36)
     sjd (google-closure-compiler-js.cljs:6538:35)
     jjd (google-closure-compiler-js.cljs:7692:407)
     hK (google-closure-compiler-js.cljs:1833:29)
     kK (google-closure-compiler-js.cljs:3201:44)
     (google-closure-compiler-js.cljs:3404:46)
     compile (google-closure-compiler-js.cljs:8106:15)
     Function.lumo.closure.optimize.cljs$core$IFn$_invoke$arity$variadic (evalmachine.<anonymous>:2623:123)

The @mfikes comment here is still relevant for this issue, which is a different one it seems nobody until now has reported.

arichiardi commented 6 years ago

See https://github.com/google/closure-compiler/issues/2826

arichiardi commented 6 years ago

The proposed fix solves the issue :tada:

At the moment is in the https://github.com/google/closure-compiler/pull/2829 but hopefully it will get included soon, in any case there is still some work to be done for the latest version (20180204) left.