               Result JSError CheckLevel DiagnosticGroups
               CommandLineRunner AnonymousFunctionNamingPolicy
               JSModule JSModuleGraph SourceMap ProcessCommonJSModules
-              ES6ModuleLoader AbstractCompiler TransformAMDToCJSModule]
+              ES6ModuleLoader AbstractCompiler TransformAMDToCJSModule
+              ProcessEs6Modules]
            [com.google.javascript.rhino Node]
            [java.security MessageDigest]
            [javax.xml.bind DatatypeConverter]

  (let [js-modules (filter :module-type (:foreign-libs opts))]
    (reduce (fn [opts {:keys [file module-type] :as lib}]
              (if (or (and (= module-type :commonjs) can-convert-commonjs?)
                      (and (= module-type :amd) can-convert-amd?))
                (let [module-name (ProcessCommonJSModules/toModuleName file)
                      ijs (write-javascript opts (deps/load-foreign-library lib))]
                  (doseq [provide (:provides ijs)]

                    [AbstractCompiler])))
 (def can-convert-amd? true)
 (def can-convert-amd? false))

(compile-if
 (and (.getConstructor ProcessEs6Modules
        (into-array java.lang.Class
                    [com.google.javascript.jscomp.Compiler ES6ModuleLoader Boolean/TYPE]))
      (.getConstructor ES6ModuleLoader
        (into-array java.lang.Class
                    [AbstractCompiler java.lang.String])))
 (def can-convert-es6? true)
 (def can-convert-es6? false))


;; Closure API
;; ===========
