This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-12
Channels
- # announcements (1)
- # babashka (42)
- # beginners (114)
- # bristol-clojurians (2)
- # calva (7)
- # cider (4)
- # clj-kondo (7)
- # cljs-dev (37)
- # cljsrn (13)
- # clojure (114)
- # clojure-austin (3)
- # clojure-europe (5)
- # clojure-nl (10)
- # clojure-spec (77)
- # clojure-sweden (4)
- # clojure-uk (16)
- # clojurescript (52)
- # conjure (155)
- # core-async (18)
- # cursive (23)
- # datomic (20)
- # duct (2)
- # emacs (13)
- # figwheel (3)
- # figwheel-main (9)
- # fulcro (31)
- # gis (8)
- # helix (33)
- # jobs (12)
- # jobs-discuss (66)
- # kaocha (4)
- # lein-figwheel (1)
- # meander (16)
- # off-topic (5)
- # pathom (13)
- # pedestal (6)
- # quil (6)
- # rdf (17)
- # re-frame (32)
- # reagent (34)
- # reitit (30)
- # remote-jobs (1)
- # ring (2)
- # shadow-cljs (149)
- # spacemacs (1)
- # sql (8)
- # tools-deps (90)
- # xtdb (19)
generally, I prefer keeping different JVMs for UI and backend to avoid instances like this, as the dev tooling for CLJS can end up clobbering things like that
argh, I didn’t even think of that. Have now ended up with dev-time 2 JVMs anyway so maybe it’s fine, but that’ll get me closer to a good bug report.
hm, wonder if org.mortbay.jetty (xgboost) versus org.eclipse.jetty (figwheel) accounts for this … I could get figwheel to compile but the browser hot-reload websocket couldn’t connect.
currently I've just pasted the code into a file on my classpath. is that enough, or do I need to add a foreign-libs
declaration as well?
The page at https://clojurescript.org/reference/dependencies has broken markup at the bottom. Not sure what's a better way to notify someone about it.
Thanks, we will fix it up. FYI, the site docs are at https://github.com/clojure/clojurescript-site
Issues and prs are good places to report
Should i be able to bundle es6 modules using :npm-deps? When trying to run the build, I'm getting SyntaxError: Unexpected token 'export'
@danielstockton it's not clear what you mean
:npm-deps
probably doesn't do what you imagine - it's just used to install Node dependencies
Right ok, this is browser side. I wanted to require an npm library into one of my namespaces
if it's present it does mean the compiler with other configuration will index node_modues
Nope, will do, thanks
this is the recommended way now - trying to push a node_module through Closure is very challenging or sometimes impossible (and challenging to figure out if it is actually impossible)
@dnolen if I have a Closure JS file in disk that I want to require, do I need to write a foreign lib entry for it?
cljs.user> (require 'lilactown.harmony)
nil
cljs.user> lilactown.harmony
Execution error (ReferenceError) at (<cljs repl>:1).
lilactown is not defined
cljs.user> lilactown.harmony/ref
Execution error (ReferenceError) at (<cljs repl>:1).
lilactown is not defined
Is there any other documentation for core.async
's <p!
macro?
This is all I've found
https://clojurescript.org/guides/promise-interop#using-promises-with-core-async
theres also these helpers, which i didn't know about until recently https://github.com/wilkerlucio/wsscode-async
Thanks @U051V5LLP!
is there a specific question you have about it? AFAICT the docstring describes it succinctly, but maybe you’re seeing something that’s missing?
I found it here: https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async/interop.clj
@lilactown don't use goog.module
😕 I'm using code generated by tsickle. I would have to do a lot more rewriting of the Closure JS by hand
@lilactown I do understand that such a feature would be useful, file a ticket, anybody can work on it
@lilactown if you interested happy to explain some pointers in #cljs-dev