|
2636 | 2636 | (:foreign-libs opts))) |
2637 | 2637 | (process-js-modules opts) |
2638 | 2638 | (:options @compiler-env))] |
2639 | | - (swap! compiler-env (fn [cenv] |
2640 | | - (-> cenv |
2641 | | - ;; we need to also track the whole top level - this is to support |
2642 | | - ;; cljs.analyze/analyze-deps, particularly in REPL contexts - David |
2643 | | - (merge {:js-dependency-index (deps/js-dependency-index opts)}) |
2644 | | - (update-in [:node-module-index] (fnil into #{}) |
2645 | | - (if (= target :nodejs) |
2646 | | - (map str node-required) |
2647 | | - (map str (keys top-level))))))) |
| 2639 | + (swap! compiler-env |
| 2640 | + (fn [cenv] |
| 2641 | + (-> cenv |
| 2642 | + ;; we need to also track the whole top level - this is to support |
| 2643 | + ;; cljs.analyze/analyze-deps, particularly in REPL contexts - David |
| 2644 | + (merge {:js-dependency-index (deps/js-dependency-index opts)}) |
| 2645 | + (update-in [:options] merge opts) |
| 2646 | + (update-in [:node-module-index] (fnil into #{}) |
| 2647 | + (if (= target :nodejs) |
| 2648 | + (map str node-required) |
| 2649 | + (map str (keys top-level))))))) |
2648 | 2650 | opts)) |
2649 | 2651 |
|
2650 | 2652 | (defn output-bootstrap [{:keys [target] :as opts}] |
|
2667 | 2669 | (#(map add-core-macros-if-cljs-js %)) |
2668 | 2670 | (add-js-sources opts) deps/dependency-order |
2669 | 2671 | (->> (map #(source-on-disk opts %)) doall))] |
2670 | | - ;; this is an optimization for handle-js-modules |
2671 | | - (swap! env/*compiler* update-in [:options] merge opts) |
2672 | 2672 | sources))) |
2673 | 2673 |
|
2674 | 2674 | (defn compile-ns |
|
2768 | 2768 | (-> (-find-sources source opts) |
2769 | 2769 | (add-dependency-sources compile-opts))) |
2770 | 2770 | opts (handle-js-modules opts js-sources compiler-env) |
2771 | | - _ (swap! env/*compiler* update-in [:options] merge opts) |
2772 | 2771 | js-sources (-> js-sources |
2773 | 2772 | deps/dependency-order |
2774 | 2773 | (compile-sources compiler-stats compile-opts) |
|
0 commit comments