ClojureScript

Problems with :optimizations :whitespace & :output-wrapper true

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    OS X 10.8.3, Google Chrome 28

Description

When I have both output wrapper and :whitespace optimizations enabled, I get the following error when loading the produced output:

goog.provide("goog.string");
goog.provide("goog.string.Unicode");
goog.string.Unicode = {NBSP:"\u00a0"};
^- Uncaught TypeError: Cannot set property 'Unicode' of undefined

Any ideas on what is going wrong? The error disappears if I use :simple or :advanced optimizations or if I set :output-wrapper to false (combined with any optimization level).

Activity

Hide
Immo Heikkinen added a comment -

The problem is still present in clojurescript master. To reproduce, compile https://github.com/clojure/clojurescript/tree/master/samples/hello using

cljsc src {:output-wrapper true :optimizations :whitespace} > hello.js
Show
Immo Heikkinen added a comment - The problem is still present in clojurescript master. To reproduce, compile https://github.com/clojure/clojurescript/tree/master/samples/hello using
cljsc src {:output-wrapper true :optimizations :whitespace} > hello.js
Hide
David Nolen added a comment -

Is this problem still present? Thanks.

Show
David Nolen added a comment - Is this problem still present? Thanks.
Hide
Aku Kotkavuo added a comment -

I'm also seeing this:

GET http://localhost:7070/deps.js 404 (Not Found)
goog.writeScriptTag_
goog.importScript_
goog.importScript_(goog.basePath + "deps.js")

I have no idea what deps.js is, something related to Google Closure Compiler?

Show
Aku Kotkavuo added a comment - I'm also seeing this: GET http://localhost:7070/deps.js 404 (Not Found) goog.writeScriptTag_ goog.importScript_ goog.importScript_(goog.basePath + "deps.js") I have no idea what deps.js is, something related to Google Closure Compiler?
Hide
Aku Kotkavuo added a comment -

ClojureScript version used is 0.0-1806.

Show
Aku Kotkavuo added a comment - ClojureScript version used is 0.0-1806.

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated: