   (assoc src :output @input))
 
 (defn generate-output-for-source [state {:keys [name type output warnings] :as src}]
-  {:pre [(valid-resource? src)]}
+  {:pre [(valid-resource? src)]
+   :post [(string? (:output %))]}
   (when (= name "goog/base.js")
     (throw (ex-info "trying to compile goog/base.js" {})))
 

           [com.google.javascript.jscomp JSModule SourceFile JSModuleGraph CustomPassExecutionTime]
           (java.util.jar JarFile JarEntry)
           (com.google.javascript.jscomp.deps JsFileParser)
           [java.util.concurrent Executors Future]
           (com.google.javascript.jscomp ReplaceCLJSConstants CompilerOptions CommandLineRunner JSError ErrorFormat CheckLevel LightweightMessageFormatter SourceMapInput BasicErrorManager CompilerOptions$LanguageMode CompilerInput ProcessEs6Modules SourceMap SourceMap$LocationMapping VariableMap)
           (java.security MessageDigest)
           (javax.xml.bind DatatypeConverter)
           (cljs.tagged_literals JSValue)))

;; (set! *warn-on-reflection* true)

(def SHADOW-TIMESTAMP
  (-> (io/resource "shadow/cljs/build.clj")

(defn par-compile-sources
  "compile files in parallel, files MUST be in dependency order and ALL dependencies must be present
   this cannot do a partial incremental compile"
  [state source-names]
  (with-compiler-env state
    (ana/load-core)
    (shadow-redefs
