There was a bug reported and since fixed in master. There will be a release
this Friday just to address this regression.

David

On Sat, Feb 4, 2017 at 11:43 PM, Hitesh <[email protected]> wrote:

> I'm trying to upgrade a project from 1.8.51.  It has some foreign libs and
> manually defined externs in it which were working fine.
>
>       :foreign-libs [{:file "https://cdnjs.cloudflare.com/
> ajax/libs/gsap/1.18.5/TweenMax.min.js"
>                       :provides ["TweenMax"]}]
>       :externs ["react/externs/react.js"
>                 "externs/greensock.js"]
>
>
> After upgrading the version of clojurescript, running lein figwheel dumps
> this exception.
>
>
> java.lang.IllegalArgumentException: /ajax/libs/gsap/1.18.5/TweenMax.min.js
> is no
> t a relative path
>  at clojure.java.io$as_relative_path.invokeStatic (io.clj:414)
>     clojure.java.io$file.invokeStatic (io.clj:426)
>     clojure.java.io$file.invoke (io.clj:418)
>     cljs.closure$write_javascript.invokeStatic (closure.clj:1594)
>     cljs.closure$write_javascript.invoke (closure.clj:1587)
>     cljs.closure$source_on_disk.invokeStatic (closure.clj:1633)
>     cljs.closure$source_on_disk.invoke (closure.clj:1628)
>     cljs.closure$output_unoptimized$fn__6325.invoke (closure.clj:1671)
>     clojure.core$map$fn__4785.invoke (core.clj:2646)
>     clojure.lang.LazySeq.sval (LazySeq.java:40)
>     clojure.lang.LazySeq.seq (LazySeq.java:49)
>     clojure.lang.RT.seq (RT.java:521)
>     clojure.core$seq__4357.invokeStatic (core.clj:137)
>     clojure.core$filter$fn__4812.invoke (core.clj:2700)
>     clojure.lang.LazySeq.sval (LazySeq.java:40)
>     clojure.lang.LazySeq.seq (LazySeq.java:49)
>     clojure.lang.RT.seq (RT.java:521)
>     clojure.core$seq__4357.invokeStatic (core.clj:137)
>     clojure.core$map$fn__4785.invoke (core.clj:2637)
>     clojure.lang.LazySeq.sval (LazySeq.java:40)
>     clojure.lang.LazySeq.seq (LazySeq.java:49)
>     clojure.lang.Cons.next (Cons.java:39)
>     clojure.lang.RT.next (RT.java:688)
>     clojure.core$next__4341.invokeStatic (core.clj:64)
>     clojure.core$str$fn__4419.invoke (core.clj:546)
>     clojure.core$str.invokeStatic (core.clj:544)
>     clojure.core$str.doInvoke (core.clj:533)
>     clojure.lang.RestFn.applyTo (RestFn.java:139)
>     clojure.core$apply.invokeStatic (core.clj:646)
>     clojure.core$apply.invoke (core.clj:641)
>
>
> So although https://github.com/clojure/clojurescript/wiki/Compiler-
> Options#foreign-libs still says that URLs are valid for :file, I
> downloaded the libs and specified them as relative paths.
>
>
>       :foreign-libs [{:file "gsap/1.18.5/TweenMax.min.js"
>                       :file-min "gsap/1.18.5/TweenMax.min.js"
>                       :provides ["TweenMax"]}]
>       :externs ["react/externs/react.js"
>                 "externs/greensock.js"]
>
>
> Lein figwheel now happily starts up.  But when I try to access the site in
> Chrome, it doesn't load and has the following new error in the console:
>
>
> Synchronous XMLHttpRequest on the main thread is deprecated because of its
> detrimental effects to the end user's experience. For more help, check
> https://xhr.spec.whatwg.org/.
>
> goog.loadFileSync_      @       base.js:1396
> goog.retrieveAndExecModule_     @       base.js:1419
> (anonymous)     @       VM113:1
> goog.writeScriptTag_    @       base.js:1223
> goog.importScript_      @       base.js:879
> goog.importModule_      @       base.js:900
> goog.writeScripts_      @       base.js:1323
> goog.require    @       base.js:663
> (anonymous)     @       (index):75
>
>
> The site works as normal in Safari, figwheel reloads changes.  It's just
> Chrome that's not working.  I'm at a bit of a loss here now.  Any ideas?
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to