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)
Hi everyone, I’m trying to implement support for helix in Cursive, per: https://github.com/cursive-ide/cursive/issues/2330. When Cursive analyses helix.core
, I’m getting an error: /_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
.
Has anyone seen this error, or have any idea what it might mean? It’s coming from deep inside some generated code, but as far as I can tell the generated code should be good and I haven’t had problems like this analysing other CLJS projects.
Oh wait, it looks like the problem might be with ["./impl/class.js" :as helix.class]
, although I have no idea what that problem might be.
I’m using the analyser directly, it looks like this:
(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)
@cfleming 0.0.10 had shadow specific code in it. That line doesn't work with the clojurescript analyzer. That's now fixed in a newer version and it works with clojurescript analyzer.
Thanks @dominicm, upgrading to 0.0.13 fixes that. I now get another error: No such namespace: react, could not locate react.cljs, react.cljc, or JavaScript source providing "react" in file file:/Users/colin/.m2/repository/lilactown/helix/0.0.13/helix-0.0.13.jar!/helix/core.cljs
. Any idea what that might be about? This is with helix-todo-mvc
, but with the helix dep upgraded as above. React is installed in node_modules
but I can’t see anything react-related in the CLJS deps.
The analyser code above is executed in a process with the CWD set to the project root.
@cfleming clojurescript should search the node_modules directly for react, so I'm not sure why it wouldn't pick it up.
https://clojurescript.org/reference/compiler-options#npm-deps looks like :npm-deps true
is necessary.
https://github.com/lilactown/helix-todo-mvc/blob/master/deps.edn there's no dependency on clojurescript, so it might be that you're trying to use the cljs analyzer, and this project uses shadow. But I don't know anything about that tbh.
I’m using (cljs.closure/add-implicit-options {:cache-analysis false, :npm-deps true})
but I’m still getting that error.