This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-16
Channels
- # announcements (1)
- # babashka (23)
- # beginners (157)
- # boot (3)
- # calva (2)
- # chlorine-clover (12)
- # cider (14)
- # clara (5)
- # clj-kondo (6)
- # cljs-dev (61)
- # cljsrn (30)
- # clojure (65)
- # clojure-argentina (8)
- # clojure-berlin (2)
- # clojure-europe (13)
- # clojure-france (9)
- # clojure-germany (2)
- # clojure-italy (4)
- # clojure-nl (6)
- # clojure-portugal (2)
- # clojure-romania (2)
- # clojure-uk (76)
- # clojurescript (56)
- # conjure (52)
- # core-async (37)
- # datomic (209)
- # duct (17)
- # emacs (17)
- # exercism (1)
- # fulcro (26)
- # graalvm (5)
- # instaparse (2)
- # jackdaw (9)
- # jobs-discuss (27)
- # joker (2)
- # juxt (23)
- # leiningen (4)
- # malli (11)
- # midje (3)
- # pedestal (2)
- # quil (2)
- # re-frame (78)
- # reagent (8)
- # reitit (18)
- # remote-jobs (1)
- # ring (2)
- # ring-swagger (1)
- # shadow-cljs (29)
- # sql (11)
- # test-check (12)
- # tools-deps (5)
- # xtdb (16)
- # yada (4)
@dnolen I've been getting my head around what you said re: https://clojurians.slack.com/archives/C07UQ678E/p1586970679096300 and Krell etc.
Although I think I understand this now, I don't feel like the news announce and the amended webpack guide make the picture as clear as it could be wrt cljs libraries having npm dependencies - how current tools support this, how they might in future etc. If I find time I could try adding PR's for what I think is missing to explain: "You can now publish ClojureScript libraries that depend directly on the JavaScript ecosystem without additional ceremony and be confident that the whole community can benefit regardless of what other JavaScript and ClojureScript build tools they may prefer."
FWIW I've made a repo that follows the new webpack guide, but tries to depend on a lib that declares :npm-deps
https://github.com/henryw374/cljs-webpack-bundle-using-lib-with-npm-deps . As you say 'cljs is currently either all Closure or :bundle
' so this is not expected to work.
I guess another angle on this is that afaik cljs libs using foreign code (e.g. the popular cljs react libs) will probably not yet be dropping cljsjs dependencies in favour of :npm-deps. It's actually not clear that a majority of potential users have any npm setup at all (but it'd be good if the Clojure survey asked this explicitly )
@henryw374 you need to run clj -m cljs.main --install-deps
to actually get the :npm-deps
right! although now I add :install-deps true
to build.edn
I get Execution error (ClassCastException) at cljs.closure/maybe-install-node-deps! (closure.clj:2588).
@henryw374 reagent already supports using react from :npm-deps
instead of CLJSJS
we'll cover the lib publishing part in a separate guide, the webpack guide doesn't cover the install step because in this case it doesn't need to
Hi folks,
I'm working on the cljdoc-analyzer project and I got a failure by analyzing specter 1.1.3 package in cljs environment. After some works, I realised that the call of cljs.analyzer.api/analyze-file
function on the specter.cljc
file produce a crash. I'm definitely not able to figure out what's wrong. So to help the investigation, I create a demo repo of this crash:
https://github.com/frozar/cljdoc_specter_support
As the specter package can be use in any cljs project, maybe the call to the cljs.analyzer.api/analyze-file
function is not good in the repo above. On the other hand, maybe the parse step of cljs.analyzer.api/analyze-file
simply failed on this file (for a reason which has to be highlighted). I would like to understand what is wrong here, to be able to fix cljdoc-analyzer. If anyone has a clue, I would appreciate ^^
right! although now I add :install-deps true
to build.edn
I get Execution error (ClassCastException) at cljs.closure/maybe-install-node-deps! (closure.clj:2588).
@fabien.rozar what is the stack trace?
@dnolen here’s a link to view this outside slack, I’ve looked at this before and couldn’t make much sense of it so we’d very much appreciate your eyes on this 🙂 😄 https://github.com/frozar/cljdoc_specter_support/blob/master/resources/clojure-7761295136030698780.edn
@henryw374 what is the full stack trace?
Attached file. to recreate, clone that repo and run 'clj -m cljs.main -co build.edn -v -c -r'
@henryw374 minor thing but remove :install-deps
from your config
@henryw374 what JDK are you using?
but how else to get the :npm-deps
picked up, other than including :install-deps
compiler opt? I'm on openjdk 11.0.2.
@henryw374 try with JDK 8 please
@henryw374 :install-deps
doesn't pick up :npm-deps
ah, got it. it modifies package.json. then you proceed with whatever webpack,shadow etc as normal:+1:
If you deprecate, what's the api equivalent? A function that takes the config? Asking because I use cljs programmatically.
ah, got it. it modifies package.json. then you proceed with whatever webpack,shadow etc as normal:+1:
@henryw374 all of this needs a lot of documentation - i understand why you might be confused
well probably the only thing that might ever cause an API change is project sustainability
like dropping all the less used REPLs in the next release - but that's really a special case
@fabien.rozar the stack trace says the failure is in Clojure
and it gives a precise location, please drop a link to that failing line in the original source
In the project.cljs
of this minimal repo, I specified [org.clojure/clojure "1.10.1"]
I can use the coll?
function from a clojure REPL in this minimal repository... For me, I think I have the coll?
function and this exception doesn't make sense.
@dnolen can you reproduce the bug locally? You just need to clone the repo and make lein run
to get it (normally...).
You right, is a kind of Clojure question, but this exception appear by using a function from [cljs.analyzer.api :as ana]
, that's why it seems to be related to ClojureScript... Maybe I should post it in the #clojure channel.
@fabien.rozar actually it might not be I'm not really what's going on in that trace
@fabien.rozar what version of ClojureScript is this?
@fabien.rozar that namespace ... is complicated
@martinklepsch yes, I think the best would be to get a more synthetic example...