This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-29
Channels
- # adventofcode (7)
- # announcements (11)
- # beginners (76)
- # boot (3)
- # calva (139)
- # cider (24)
- # clara (2)
- # cljdoc (11)
- # cljs-dev (90)
- # cljsjs (1)
- # cljsrn (3)
- # clojure (98)
- # clojure-austin (2)
- # clojure-brasil (2)
- # clojure-dev (16)
- # clojure-europe (3)
- # clojure-italy (55)
- # clojure-nl (37)
- # clojure-sweden (11)
- # clojure-uk (40)
- # clojurebridge (1)
- # clojurescript (107)
- # core-logic (10)
- # cursive (34)
- # data-science (9)
- # datascript (19)
- # datomic (48)
- # emacs (6)
- # figwheel (13)
- # figwheel-main (3)
- # fulcro (67)
- # jobs (1)
- # juxt (4)
- # lumo (8)
- # mount (1)
- # off-topic (29)
- # onyx (1)
- # reagent (7)
- # reitit (3)
- # ring-swagger (5)
- # shadow-cljs (39)
- # spacemacs (5)
- # tools-deps (1)
@souenzzo this is a java 11 thing, not specific to shadow-cljs
Hi Thomas (sorry for the previous mention) - would you be interested in a "community maintained" branch 2.6.x but against Cljs 1.10.339? It seems like there are problems with source maps and expound and I was wondering if I can backport a couple of patches from 2.7.x except the cljs one
@richiardiandrea no. I'd much rather look at the problems and fix them. so far I haven't heard of any problems though.
When running a :browser-test
build of my project, it looks like specs don't get cleared when hot reloading, so some tests appear to still work until the page is reloaded and the registered specs cleared. I've just been re-namespacing a bunch of my specs, and was confused why tests weren't failing when I knew they should.
Is this a (known?) issue, or might I have just misconfigured something?
just reload the page to get rid of old tests. they do are not currently removed properly that is true
@richiardiandrea I assume this is the source map problem you mentioned? https://dev.clojure.org/jira/browse/CLJS-2993 added a patch for that. whats up with expound
?
that's what I thought, thanks. Should I file an issue for the old specs not being removed?
Good morning!
Is it possible to have a cljs REPL connected to an :npm-module
target?
ProtoREPL works with the base REPL, but as soon as I change to the build repl no further command works (even though the ns changes to cljs.user, and the message for :cljs/quit
appears)
@aisamu its a bit complicated for :npm-module
given that we are not in control how the JS is loaded
it is sort of possible if you require("shadow-cljs/shadow.cljs.devtools.client.browser")
from the JS
@aisamu fwiw, I'm having good success using something like this in my main CLJS entry point:
(goog-define EMBEDDED_DEV false)
(when EMBEDDED_DEV
(defonce _dirty_repl_hack
(js/require "my-module/build/npm/shadow.cljs.devtools.client.browser")))
This doesn't require anything additional in the embedding javascript project, and will get optimized away in release buildswhen I launch my app like this: $ electron public/main.js
it gives me this:
REPL client error { Error: connect ECONNREFUSED 192.168.43.81:9630
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.43.81',
port: 9630 }
REPL client disconnected
and now cider-connect-cljs gives me a failed error. 9630 isn't my repl port. It's the shadow console port. I've tried blowing off ~/.cache and .shadow-cljs in the project dir. Also rmmed .nrepl-port in the project dir. How do I fix?when I visit localhost:9630 I get:
shadow-cljs
Project: /home/kevin/0work/guardian-dashboard
Release Snapshots
rather than the normal shadow console
@vigilancetech 9630
is the default port used by the shadow-cljs webserver which serves the websockets used for the REPL
but it only typically connects to localhost? not sure why it tries to connect to an IP?
Good afternoon! Is it possible to locate the (simple) externs file somewhere else? A quick glance at the source seems to indicate that no, but I'd rather be sure! (a symlink is working) And is there a reason for keeping inference warning on properties that are defined in the externs file? I've hinted things covered by the externs just to clear the warnings - they're very useful and I didn't want to add noise there.
:devtools {:http-root "public"
:http-port 8080}}
@thheller I just updated to [email protected]
and I get the same error
@aisamu no idea what you are talking about. if you add hints you don't need to define them anywhere else?
When I add hints I don't have to define externs because that's taken care of. But when I add externs without hints, even though the final code is correct (doesn't munge the calls I've asked) I still get the "Cannot infer type" warning.
On this specific instance I'd prefer hints because this will probably be used in a lot of places... (immutableJS's toJS()
, get
and so on). Adding hints clears the errors and the warnings. Adding externs clears the errors only.
please open an issue. the simplified externs are just not token into account for the externs inference thats all
Got it, thanks!
And, regarding their location, is there a way (even if hacky) to specify a place other than externs/build.txt
?
That'd be very nice! It's mainly for consistency with the existing project's structure. (JS, with shadow-cljs painlessly bolted on. Thanks for this lovely tool!)
i just realized server mode picks up changes to shadow-cljs.edn
without needing a restart!
that’s really cool!
you can do pretty much everything without a restart. only changing CLJ(S) deps currently requires restart
you’re putting other build tools to shame lol
@thheller you are getting compliments at the Clojure Conj for being very helpful to folks.