File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 20652065 result (.compile cc (url->nio-path rsc) source)]
20662066 (.source result))
20672067 source)]
2068- (cond-> source'
2069- (= :goog module) add-goog-load)))
2068+ (str " /*TRANSPILED*/"
2069+ (cond-> source'
2070+ (= :goog module) add-goog-load))))
2071+
2072+ (defn requires-transpile? [out-file]
2073+ (let [line (first (line-seq (io/reader out-file)))]
2074+ (not (string/starts-with? line " /*TRANSPILED*/" ))))
20702075
20712076(comment
20722077 (println (slurp (io/resource " goog/math/long.js" )))
21072112 (and res (util/changed? out-file res))
21082113 ; ; always re-emit GCL libs under optimizations higher than :none
21092114 ; ; :none will just use the cached transpiled result
2110- (and transpile? (not= :none optimizations))))
2115+ (and transpile?
2116+ (or (not= :none optimizations)
2117+ (requires-transpile? out-file)))))
21112118 (when (and res (or ana/*verbose* (:verbose opts)))
21122119 (util/debug-prn " Copying" (str res) " to" (str out-file)))
21132120 (util/mkdirs out-file)
You can’t perform that action at this time.
0 commit comments