I don't understand why, but changing to a 'require' instead of a 'use' fixed my problem:
(ns hello (:require [goog.Timer :as Timer] [goog.dom :as dom] [goog.events :as events] [goog.events.EventType :as EventType] [goog.events.KeyCodes :as KeyCodes] [goog.graphics :as graphics] [goog.graphics.Stroke :as Stroke] [goog.graphics.SolidFill :as SolidFill] [goog.graphics.Path :as Path] )) On 3 December 2011 19:29, Paul Richards <paul.richa...@gmail.com> wrote: > Hi, > I'm using goog.Timer inside my ClojureScript application. When I > compile using the non-optimizing cljsc the code compiles and the > application works fine. If I try to compile using the optimizing > compiler however I get the following error: > > cljsc hello.cljs '{:optimizations :advanced}' > hello.js > Dec 3, 2011 7:26:50 PM com.google.javascript.jscomp.LoggerErrorManager println > SEVERE: hello:9: ERROR - required "goog" namespace never provided > goog.require('goog'); > ^ > > Dec 3, 2011 7:26:50 PM com.google.javascript.jscomp.LoggerErrorManager > printSummary > WARNING: 1 error(s), 0 warning(s) > > > My 'ns' line is as follows: > > (ns hello > (:use > [goog.dom :only [appendChild createDom createTextNode removeChildren]] > [goog.events :only [listen]] > [goog.events.EventType :only [CLICK]] > [goog.graphics :only [createGraphics Stroke SolidFill Path]] > [goog :only [Timer]] > )) > > > > -- > Paul Richards > @pauldoo -- Paul Richards @pauldoo -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en