Skip to content
Browse files

Only load CLJS if cljs/analyzer.clj is present.

The AOT compiled jar contains the cljs.analyzer class, so
(require 'cljs.analyzer) actually succeeds in some cases where
we don't want to load CLJS (eg. if tools.reader is on the classpath).
  • Loading branch information...
1 parent d5cf954 commit e04aaf82d4e703320f0cfa29a8b91b2f51e76dcd @frenchy64 frenchy64 committed
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/main/clojure/clojure/core/typed/init.clj
9 src/main/clojure/clojure/core/typed/init.clj
@@ -1,6 +1,7 @@
(ns clojure.core.typed.init
(:require [clojure.core.typed.current-impl :as impl]
- [clojure.core.typed.profiling :as p]))
+ [clojure.core.typed.profiling :as p]
+ [ :as io]))
(defonce ^:private attempted-loading? (atom false))
(defonce ^:private successfully-loaded? (atom false))
@@ -73,14 +74,12 @@
- (when (try
- (require 'cljs.analyzer)
- true
- (catch Throwable _))
+ (when (io/resource "cljs/analyzer.clj")
(println "Found ClojureScript, loading ...")
+ '[cljs.analyzer]

0 comments on commit e04aaf8

Please sign in to comment.
Something went wrong with that request. Please try again.