This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-28
Channels
- # announcements (2)
- # babashka (36)
- # beginners (29)
- # bristol-clojurians (2)
- # calva (3)
- # cider (102)
- # circleci (7)
- # clj-kondo (5)
- # cljs-dev (7)
- # clojure (117)
- # clojure-europe (23)
- # clojure-korea (1)
- # clojure-nl (1)
- # clojure-spec (15)
- # clojure-uk (47)
- # clojurescript (43)
- # code-reviews (1)
- # community-development (1)
- # conjure (32)
- # cursive (1)
- # datalog (15)
- # datomic (14)
- # emacs (18)
- # fulcro (9)
- # helix (23)
- # jackdaw (1)
- # jobs-discuss (10)
- # meander (8)
- # membrane (57)
- # off-topic (4)
- # portal (2)
- # re-frame (22)
- # reagent (1)
- # reitit (9)
- # reveal (3)
- # rewrite-clj (14)
- # shadow-cljs (22)
- # spacemacs (27)
- # sql (34)
- # testing (6)
- # tools-deps (40)
- # vim (5)
- # vrac (15)
- # xtdb (2)
In Cursive, I call the analyser directly in order to generate function stubs for some namespaces that are hard to index via static analysis. I’m having problems doing this with helix, because it contains a require like: ["./impl/class.js" :as helix.class]
. I’m getting an exception when analysing that: /_SLASH_impl_SLASH_class/js.cljs is not a relative path in file file:/Users/colin/.m2/repository/lilactown/helix/0.0.10/helix-0.0.10.jar!/helix/core.cljs
. My analysis code looks like this (quasiquoted so a bit ugly, sorry):
(do
(clojure.core/require (quote cljs.closure)
(quote cljs.env)
(quote cljs.analyzer.api)
(quote clojure.string)
(quote )
(quote clojure.walk))
(clojure.core/let [opts4 (cljs.closure/add-implicit-options {:cache-analysis false})
state5 (cljs.env/default-compiler-env opts4)]
(cljs.analyzer.api/analyze-file state5 "cljs/core.cljs" opts4)
(cljs.analyzer.api/analyze-file state5 (clojure.core/or ( "helix/dom.cljs")
( "helix/dom.cljc"))
opts4)
Do I need to pass any options to the analyser to use node-style dependencies like that?Actually, digging around a bit it looks like that relative path syntax might only be supported by Shadow, is that true @thheller?
Yes, I added that as a simple way to include local JS that "just works". See https://shadow-cljs.github.io/docs/UsersGuide.html#classpath-js