Fork me on GitHub
#shadow-cljs
<
2018-02-16
>
tony.kay00:02:18

Seeing the HUD crash with this:

failed to parse websocket message {:type :build-failure, :build-config {:target :browser-test, :test-dir "resources/public/js/test", :ns-regexp "-test$", :runner-ns gondola.client.client-test-main, :devtools {:http-port 8022, :http-resource-root "public", :http-root "resources/public/js/test"}, :id :test, :build-id :test}, :report "------ ERROR -------------------------------------------------------------------\n File: /Users/tonykay/owsy/gondola-client/src/cljs/gondola/client/smartystreets.cljs:13:1\n--------------------------------------------------------------------------------\n  10 |   ([id] [::address-result id])\n  11 |   ([id field] [::address-result id field]))\n  12 | \n  13 | (defsc AddressResult [this {:keys [id]}]\n-------^------------------------------------------------------------------------\nSyntax Error at gondola.client.smartystreets:13\n{:cause clojure.lang.ExceptionInfo: Invalid arity for query {:expected 0, :got 1}}\nExceptionInfo: Syntax Error at gondola.client.smartystreets:13\n\tclojure.core/ex-info (core.clj:4739)\n\tclojure.core/ex-info (core.clj:4739)\n\tfulcro.client.primitives/defsc (primitives.cljc:3203)\n\tfulcro.client.primitives/defsc (primitives.cljc:3142)\n\tclojure.core/apply (core.clj:661)\n\tclojure.core/apply (core.clj:652)\n\tcljs.analyzer/macroexpand-1*/fn--3565 (analyzer.cljc:3286)\n\tcljs.analyzer/macroexpand-1* (analyzer.cljc:3285)\n\n--------------------------------------------------------------------------------\n  14 |   {:ident (fn [] (address-result-path id))\n  15 |    :query '[*]})\n  16 | \n  17 | (defmutation get-street-address [{:keys [id] :as params}]\n--------------------------------------------------------------------------------\n", :e clojure.lang.ExceptionInfo: failed to compile resource: [:shadow.build.classpath/resource "gondola/client/smartystreets.cljs"] {:tag :shadow.build.compiler/compile-cljs, :source-id [:shadow.build.classpath/resource "gondola/client/smartystreets.cljs"], :url #object[java.net.URL 0x71843d1d "file:/Users/tonykay/owsy/gondola-client/src/cljs/gondola/client/smartystreets.cljs"], :file #object[java.io.File 0x1367c8aa "/Users/tonykay/owsy/gondola-client/src/cljs/gondola/client/smartystreets.cljs"], :line 13, :column 1, :source-excerpt {:start-idx 9, :before ["  ([id] [::address-result id])" "  ([id field] [::address-result id field]))" ""], :line "(defsc AddressResult [this {:keys [id]}]", :after ["  {:ident (fn [] (address-result-path id))" "   :query '[*]})" "" "(defmutation get-street-address [{:keys [id] :as params}]"]}}} 

tony.kay00:02:30

this is an exception thrown from a macro

tony.kay04:02:19

The REPL experience is also less than ideal (using 2.1.11). I get things like Error handling response - class java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.CharSequence for expressions like (+ 1 1)

claudiu08:02:30

noob question ๐Ÿ˜ž Is it technically really hard to have figwheel with shadow-cljs ? In the latest defn-podcast think Bruce mentioned that he's planning on working on the internals of figwheel to make it more flexible.

tony.kay08:02:51

@claudiu The hot code reloading is done by shadow-cljs, as is the compiling. Figwheel is both of those, but with the stock compiler. So, the short answer is โ€œno, you donโ€™t use figwheel with shadow-cljsโ€

thheller09:02:46

@claudiu the question would be "why would you want to use figwheel with shadow-cljs?". what does figwheel provide that you do not get yet?

claudiu10:02:29

@thheller They seem to be two things that do the same thing. I get why it does not work out of the box, was just curious, it could theoretically work, with some updates to figwheel that made it more modular . ๐Ÿ™‚

thheller10:02:05

shadow-cljs is much more low level than figwheel so it really wouldn't be practical to use figwheel for anything

thheller10:02:10

but again .. why would you?

thheller10:02:35

if figwheel does something shadow doesn't I can take a look at adding it

thheller10:02:29

it may look like they do the same thing but they really don't

thheller10:02:44

figwheel is for development only and doesn't do anything for release builds

thheller10:02:56

shadow-cljs started with release builds and later added the dev stuff

claudiu11:02:30

Ahh oky got it ๐Ÿ™‚

thheller11:02:37

I have never used figwheel so I might totally be missing something obvious ... so if you have something that shadow is missing over figwheel .. tell me.

claudiu11:02:41

So far so good. More of a noob question ๐Ÿ™‚ since figwheel does hot reloading and is the 'default' in the clojurescript community, was just wondering if there technical aspects to why not work on integrating vs making the hot-reload from scratch ๐Ÿ™‚ . Was listening to the defn podcast, Bruce said something about figwheel updates (can't remember exactly what), I immediately thought about shadow-cljs ๐Ÿ™‚

thheller11:02:20

he also said

thheller11:02:22

> As a UI to ClojureScript the codebase is complex and complected.

thheller11:02:50

shadow-cljs is a lot more complex due to being much more low level

thheller11:02:09

integrating figwheel would probably be more work than just building it from scratch

thheller11:02:23

hot reload is a tiny fraction of the code

thheller11:02:44

the config validation stuff is nice but not usable as a lib

thheller11:02:05

also shadow-cljs config is probably too different to use it

thheller11:02:01

figwheel has had much more work done on the usability front and yes I'd love to use some of that

thheller11:02:29

but I really can't

claudiu11:02:30

makes sense. Thank you for explaining the details ๐Ÿ™‚

thheller11:02:38

the rebel-readline stuff he is doing I can probably integrate at some point

claudiu12:02:14

that would be pretty awesome ๐Ÿ™‚

wilkerlucio13:02:48

@thheller following Tony comments, the only thing that I miss from Figwheel at this point is the REPL, it works really well there, but in shadow I've had problems with timeouts and sometimes not loading files at all

thheller13:02:30

please report those things don't just ignore it

thheller13:02:39

first time I hear of that ๐Ÿ™‚

wilkerlucio13:02:55

other thing that I miss, but I think it's not directly a shadow concern, is been able to start my REPL directly from Cursive, with Figwheel I can create a run with clojure.main pointing to a tiny script that starts figwheel, this boots up the compilation and with a REPL ready to use, with shadow I have to do it in 2 steps (open the process in a terminal and connect via nREPL on Cursive)

thheller13:02:34

can you paste that figwheel startup file?

wilkerlucio13:02:57

other than that, only love ๐Ÿ™‚ and a special congrats on allowing external source paths, this is so good to work while developing multiple libs (I have a project where I'm having to use devbuilds for pathom, inspect and fulcro, without shadow it would be very painful)

wilkerlucio13:02:08

sure, one moment

wilkerlucio13:02:32

figwheel.clj

(use 'figwheel-sidecar.repl-api)
(start-figwheel! "devcards" "test")
(cljs-repl)

thheller13:02:05

(require '[shadow.cljs.devtools.server :as server])
(require '[shadow.cljs.devtools.api :as shadow])
(require '[shadow.cljs.devtools.cli])

(server/start!)
(shadow/watch :devcards)
(shadow/watch :test)

thheller13:02:35

put that into the figwheel.clj instead. change nothing else. done.

thheller13:02:56

I guess I don't really know what (cljs-repl) does

thheller13:02:03

since you are starting two builds which repl do you get?

thheller13:02:42

(shadow/repl :devcards) would drop you into the REPL for devcards

wilkerlucio13:02:42

figwheel seems to choose it kind by random (probably a (first) on a map), but you can type :cljs/quit, it takes you to a place where you can select which REPL to connect

thheller13:02:20

what I personally do is just launch a lein repl

wilkerlucio13:02:20

just tried running the script, got this:

wilkerlucio13:02:49

objc[32799]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java (0x10ce484c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10ced44e0). One of the two will be used. Which one is undefined.
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: es5>= in this context, compiling:(shadow/build/cljs_hacks.cljc:439:22)

thheller13:02:02

(require 'repl) (repl/go)

thheller13:02:32

uhm which clojurescript version are you using?

wilkerlucio13:02:02

oh, sorry, so the project.clj version matters on this case, because of cursive classpath, correct?

wilkerlucio13:02:24

the lein file on this project was just a dump one for cursive, the real deps were in shadow, let me update and try again

thheller13:02:51

problem here really is that cursive only supports lein

thheller13:02:08

if there was a shadow-cljs startup option we wouldn't have those issues

wilkerlucio13:02:23

I hope this gets better with deps.edn does shadow supports deps.edn?

wilkerlucio13:02:08

cool, is there something on the guide about it? I tried to find these days but I failed

thheller13:02:37

its not really finished since clj isn't available on windows

thheller13:02:56

but you can set {:deps {:aliaes [:foo :bar]}} in shadow-cljs.edn

thheller13:02:15

shadow-cljs will then run the jvm via clj

wilkerlucio13:02:09

cool ๐Ÿ™‚

wilkerlucio13:02:39

the script now ran

wilkerlucio13:02:53

during the start it generated a lot of those:

wilkerlucio13:02:55

Feb 16, 2018 11:48:15 AM clojure.tools.logging$eval27442$fn__27445 invoke
INFO: duplicate resource goog/locale/scriptToLanguages.js on classpath, using jar:file:/Users/wilkerlucio/.m2/repository/org/clojure/google-closure-library/0.0-20170809-b9c14c6b/google-closure-library-0.0-20170809-b9c14c6b.jar!/goog/locale/scriptToLanguages.js over jar:file:/Users/wilkerlucio/.m2/repository/org/clojure/google-closure-library/0.0-20170519-fa0499ef/google-closure-library-0.0-20170519-fa0499ef.jar!/goog/locale/scriptToLanguages.js
Feb 16, 2018 11:48:15 AM clojure.tools.logging$eval27442$fn__27445 invoke
INFO: duplicate resource goog/positioning/anchoredviewportposition.js on classpath, using jar:file:/Users/wilkerlucio/.m2/repository/org/clojure/google-closure-library/0.0-20170809-b9c14c6b/google-closure-library-0.0-20170809-b9c14c6b.jar!/goog/positioning/anchoredviewportposition.js over jar:file:/Users/wilkerlucio/.m2/repository/org/clojure/google-closure-library/0.0-20170519-fa0499ef/google-closure-library-0.0-20170519-fa0499ef.jar!/goog/positioning/anchoredviewportposition.js

thheller13:02:17

classpath conflicts are fun arent they? ๐Ÿ™‚

wilkerlucio13:02:35

no, they are not ๐Ÿ™‚

wilkerlucio13:02:50

and the REPL experience seems limited, it seems to don't understand some REPL send commands:

wilkerlucio13:02:56

[0:0]~cljs.user=> 3
3
[0:0]~cljs.user=> 4
4
[0:0]~cljs.user=> (in-ns 'com.wsscode.pathom.book.graphql.fulcro-network.demos)
Feb 16, 2018 11:51:36 AM clojure.tools.logging$eval27442$fn__27445 invoke
WARNING: client sent unknown msg {:type :repl/set-ns-complete, :id 7, :ns com.wsscode.pathom.book.graphql.fulcro-network.demos}
Timeout while waiting for REPL result.
[0:0]~com.wsscode.pathom.book.graphql.fulcro-network.demos=> (css/upsert-css "token-demo" RequireTokenApp)
#object[HTMLStyleElement [object HTMLStyleElement]]
[0:0]~com.wsscode.pathom.book.graphql.fulcro-network.demos=> {:map "with content"}
{:map "with content"}
[0:0]~com.wsscode.pathom.book.graphql.fulcro-network.demos=> [:book] Compiling ...
[:book] Build completed. (317 files, 2 compiled, 0 warnings, 0.78s)

wilkerlucio13:02:25

the output is not been formatted, seems like something is missing to cursive to understand

wilkerlucio13:02:59

it was better on the nREPL version

thheller13:02:19

well its mixing repl output with log output

thheller13:02:33

fighweel probably just doesn't log anything?

wilkerlucio13:02:45

no, just an information at start, then no logs

wilkerlucio13:02:49

(only responses)

thheller13:02:46

WARNING: client sent unknown msg {:type :repl/set-ns-complete will be gone in next version.

wilkerlucio13:02:12

cool ๐Ÿ™‚

wilkerlucio13:02:17

there is another one like this:

wilkerlucio13:02:18

Feb 16, 2018 11:58:03 AM clojure.tools.logging$eval27442$fn__27445 invoke
WARNING: client sent unknown msg {:type :repl/require-complete, :id 10}

thheller13:02:26

problem with the logs is that I really want them

thheller13:02:32

could add an option though

wilkerlucio13:02:50

I like the logs too, would be nice if they could live together

wilkerlucio13:02:15

this message seems to come now and then: Timeout while waiting for REPL result.

thheller14:02:20

also fixed. the responses from the client weren't routed correctly in same cases

wilkerlucio14:02:37

nice ๐Ÿ™‚

Jon14:02:56

[2018-02-16 22:42:59 - WARNING] TCP Port 9630 in use.
BindException: Address already in use (Bind failed)
	java.net.PlainSocketImpl.socketBind (PlainSocketImpl.java:-2)
	java.net.AbstractPlainSocketImpl.bind (AbstractPlainSocketImpl.java:387)
	java.net.ServerSocket.bind (ServerSocket.java:375)
	java.net.ServerSocket.<init> (ServerSocket.java:237)
	shadow.cljs.devtools.server.socket-repl/start (socket_repl.clj:161)
	shadow.cljs.devtools.server.socket-repl/start (socket_repl.clj:153)
	shadow.cljs.devtools.server/start-system (server.clj:157)
	shadow.cljs.devtools.server/start-system (server.clj:132)

error Command failed with exit code 1.
info Visit  for documentation about this

Jon14:02:18

it exits when 9630 is used now?

thheller14:02:31

shadow.cljs.devtools.server.socket-repl/start

thheller14:02:34

socket repl port conflict

thheller14:02:48

like I said .. fixed ports are annoying

Jon14:02:08

agreed...

Jon14:02:51

how about auto increment?

thheller14:02:25

what is the point then? just use a random port

Jon14:02:47

it defaults to a random port?

thheller14:02:12

say you want a fixed port but that is taken by something else so you increment

thheller14:02:26

your tool now connects to something else

thheller14:02:36

ie. whatever claimed the port first

thheller14:02:47

that seems strictly worse

thheller14:02:07

I can offer you two things

thheller14:02:24

create a shadow-cljs command that dumps the currently active ports

thheller14:02:48

which doesn't seem all that useful given that you can just look at the files directly

thheller14:02:37

either way ... whenever you use fixed ports you are going to run into conflicts

thheller14:02:47

which is why I said to not use them or avoid them wherever possible

thheller14:02:51

or you simly RUN shadow-cljs cljs-repl foo instead of connecting to any socket at all

Jon14:02:00

not sure how it interacts with my toolchains, but at current I can accept random ports, as long as I can find the ports easily.

thheller14:02:26

whats easier than looking at target/shadow-cljs/socket-repl.port?

Jon14:02:30

like :socket-repl {:port 0}, it would be fine also.

Jon14:02:37

it's printed in the logs

Jon14:02:47

I can just see them.

thheller14:02:00

seriously? you want to look at logs every time you start up a new server?

Jon14:02:22

old habit from Webpack, did that a lot

thheller14:02:22

look at the file and you'll never look for some random port

thheller14:02:09

that seems like a horrible way to find out about a port but I can add that if you want

Jon14:02:46

how do you use these ports currently?

Jon14:02:59

reading them with scripts? and do what?

thheller14:02:36

the shadow-cljs script looks at the cli-repl.port and connects to that

thheller14:02:53

I made a tiny little helper for cursive to connect to the repl

Jon14:02:01

just remembered nREPL did that a lot...

Jon14:02:18

I didn't understand why before. now it is...

thheller14:02:21

nrepl always looks at .nrepl-port yes. but that belongs to lein and I don't want to conflict with that

Jon14:02:29

is that common...solution in Java or in Clojure?

Jon14:02:47

I haven't seen that before in JavaScript world

thheller14:02:32

what is? writing ports to files?

Jon14:02:42

yeah, ports in files

Jon14:02:51

Unix systems?

thheller14:02:58

seems pretty common. definitely not a java/clojure thing. probably a unix thing.

thheller14:02:13

pretty similar to .pid files I guess

Jon14:02:25

sounds quite similar.

Jon15:02:01

well, just new stuff to JavaScript, we don't read files from browsers before. not seen in Node.js also.

Jon15:02:57

anyway, I barely read those files, it's not in my toolchains yet. Reading them from logs is the most natural way for me.

Jon15:02:44

oh, mistake...

Jon15:02:59

no need to update, it's not socker REPL.

Jon15:02:20

just they have different strategies of picking ports.

thheller15:02:42

no they don't? they are all random by default unless you configure them

thheller15:02:48

only the http port is sort of fixed

thheller15:02:19

which was sort of a bad idea and should be removed to be honest

Jon15:02:21

okay, only http port special.

Jon15:02:45

consistency is preferred.

thheller15:02:46

humans should never need to remember ports

thheller15:02:52

thats just annoying to work with

Jon15:02:32

but I still use localhost:8080 in browser history to develop my apps everyday.

thheller15:02:36

unfortunately it will require a proper UI to make working with those easier

Jon15:02:04

sounds like a groups of toolchains to me...

thheller15:02:15

its certainly enough work for a couple of years ๐Ÿ˜‰

Jon15:02:25

can't wait that long~

Jon15:02:10

somehow I want to see how you use shadow-cljs in you browser apps... just want to find out how mach difference out there

Jon15:02:41

most of my habits are from Webpack.

Jon15:02:55

might be different with many other tools.

thheller15:02:39

I thought about writing that down somewhere. Probably would make it easier to understand why certain things are the way they are

Jon15:02:08

that would be good.

thheller15:02:35

can't use my work projects as examples though since I'm not allowed to post names

Jon15:02:06

I need to rethink some of my toolchains also. Habits brought from JavaScript to Clojure, not all of them are good.

Jon15:02:56

"work" means your current "job"?

Jon15:02:39

demo projects are fine... todoMVC app?

thheller15:02:05

I haven't set up a full demo project

thheller15:02:11

the workflow is simple shadow-cljs clj-repl. connect to that from Cursive.

thheller15:02:20

launch the build in the cursive repl. edit code.

Jon15:02:08

then you still need to demonstrate how to use inside the REPL

thheller15:02:41

(shadow/watch :the-build)?

Jon15:02:29

I think shadow variable is not in REPL by default?

Jon15:02:37

maybe I'm wrong...

thheller15:02:49

looks somewhat like that

thheller15:02:33

REPL always on the side with build log output and eval results

thheller15:02:27

browser on a 2nd monitor when building a website

Jon15:02:37

I started REPL in iTerm3

Jon15:02:13

Sublime Text for exiting raw code, that browser for Calcit Editor.

thheller15:02:15

I do have the shadow-cljs clj-repl process running in a terminal

thheller15:02:24

but pretty much never need to look at it

Jon15:02:30

also need another browser tab for my real app.

hlolli15:02:52

I'm haveing a situation where I have two builds :admin and :public, with shadow-cljs watch admin it starts the http server for :public as well as :admin. Is it possible to prevent this?

thheller15:02:30

no. but it only starts the http server not the build.

thheller15:02:02

it starts the http server because I wanted to be able to use them with compile and release

hlolli15:02:12

ok then it's harmless, the ports were conflicting with other processes I was running

hlolli15:02:19

cool, thanks for clarifying!

thheller15:02:59

yeah fixed ports are a PITA to work with

thheller15:02:19

wish there was a proper cross-platform way to just use virtual hosts

thheller15:02:31

ie. DNS not ports

hlolli15:02:55

yes, dns's would be neat.

hlolli15:02:31

off-topic, you seem the have mastered the urban dictionary more than anyone here on the slack, but nice to learn abbreviations like PITA along clojurescript ๐Ÿ˜„

Jon15:02:29

I used Google to look up. English->Chinese dict not enough.

hlolli15:02:17

P.E.M.D.A.S

thheller15:02:58

@wilkerlucio 2.1.13 should fix the REPL issues you had

thheller15:02:40

also fixed an issue where the build would get stuff if a macro had errors, changes to that would not trigger a reload.

justinlee15:02:45

@thheller I donโ€™t know if you did something specific to fix my protorepl issue, but if not, whatever you did in 2.1.13 fixed it

justinlee15:02:55

its nice and stable now

thheller16:02:23

good to know

justinlee16:02:40

oops no i spoke too soon. there is definitely something weird going on here.

justinlee16:02:58

iโ€™ll do a bit more investigation. its going to be annoying because things arenโ€™t erroring, they are timing out

wilkerlucio16:02:37

@thheller confirmed that changing ns and loading file are working now ๐Ÿ™‚

justinlee16:02:20

is this expected behavior? when i connect to my app using shadow-cljs cljs-repl app, I get a timeout trying to switch to a library (and I confirmed that Iโ€™m connected to the browser by logging there first)

[3:1]~com.rpl.specter=> (js/console.log "***")
nil
[3:1]~com.rpl.specter=> (in-ns 'com.rpl.specter)
Timeout while waiting for REPL result.

justinlee16:02:32

the timeout causes bad things to happen in atom protorepl (a spinner shows up in the buffer and never goes away), but i wonder why iโ€™m getting timeouts to begin with

thheller16:02:24

is it possible that the namespace isn't loaded yet?

thheller16:02:38

does it work if you (require 'com.rpl.specter) first?

thheller16:02:56

oh wait you are already in that ns

thheller16:02:41

but I can confirm that I get a timeout when switching to non existing namespaces

wilkerlucio16:02:01

I tried to go back to terminal usage, now I'm getting:

wilkerlucio16:02:03

shadow-cljs - config: /Users/wilkerlucio/Development/pathom-book/shadow-cljs.edn version: 2.1.13
shadow-cljs - socket connect failed, server process dead?

thheller16:02:36

did you kill the REPL process?

thheller16:02:17

hmm its supposed to clean up properly

thheller16:02:32

delete the target/shadow-cljs/cli-repl.port file

wilkerlucio16:02:38

is there a way to force the clean up, or check for it?

thheller16:02:08

dunno I use a JVM shutdown hook to delete the port files

thheller16:02:23

but maybe those don't trigger if you kill the jvm?

wilkerlucio16:02:36

entering a meeting now, will check a bit later

justinlee16:02:42

@thheller other random question: it looks like you used asciidoctor to compose the user guide? i started using gitbook to do something similar but it doesnโ€™t understand clojure. are you happy with asciidoctor?

thheller16:02:19

kind of. I recently found slate which look a bit better but no idea if it supports clojure. https://lord.github.io/slate/

thheller16:02:47

asciidoctor works well though. no complaints so far.

thheller16:02:02

asciidoctor is probably better all around but slate definitely looks neat for API docs

tony.kay16:02:36

I just upgraded to the latest version, and the REPL experience in IntelliJ is better, but still gives some errors on output. If I use the โ€œsend to REPLโ€ for something in a comment block like (defn g [a] (js/console.log :HI a)), I see the error Failed to parse client result: No dispatch macro for: '

tony.kay16:02:57

Guessing someoneโ€™s parsing doesnโ€™t like the return of def #'the-ns/g

tony.kay16:02:44

@thheller would that be in shadow or Cursive?

tony.kay16:02:02

actually, this is perhaps a better representation of the output:

(def h (f/debounce g 1000))
Failed to parse client result: No dispatch macro for: '
=> "#'the-ns/h"

tony.kay16:02:29

so it does give back a string of what the def returnedโ€ฆeverything โ€œworksโ€โ€ฆitโ€™s just a bit misleading/annoying

wilkerlucio17:02:50

@thheller just FYI, running shadow-cljs stop fixed the start issue, after that it ran fine

thheller17:02:49

omg .. I finally figured out how nrepl is supposed to be used ...

thheller17:02:17

that took way too long to figure out

wilkerlucio17:02:33

interesting, how much different it is from the current impl?

thheller17:02:45

:printed-value true

thheller17:02:19

I couldn't figure out why results from the shadow-cljs were always displayed as a string

thheller17:02:34

so I though other tools must be reading the response value

thheller17:02:54

but that causes all kinda of issues apparently

thheller17:02:10

but instead I'm supposed to set :printed-value on the message and just pass the string along

thheller17:02:55

never knew that this middleware is used by default ...

thheller17:02:40

yep ... appears to resolve all issues ...

wilkerlucio17:02:39

so 2.1.14 on the way? ๐Ÿ™‚

thheller17:02:15

available now yes

thheller17:02:49

I tested atom and cursive. both appear to be working correctly now

wilkerlucio17:02:47

@thheller just tried, but got some problems, the nrepl is not responding, and I see this on the shadow-cljs terminal:

thheller17:02:09

meh .. I guess that explains why its :printed-value 1 in piggieback .. no true

tony.kay17:02:13

Some things are better, but Iโ€™m also seeing an issue

tony.kay17:02:36

If I run something like a react DOM render by accident it causes an exception on the client, then I get no more REPL output. If this helps, it is the js console message:

encoding of result failed TypeError: Cannot convert a Symbol value to a string
    at Array.join (native)
    at Function.cljs.core.str.cljs$core$IFn$_invoke$arity$1 ()
    at Object.cljs$core$pr_writer_impl [as pr_writer_impl] ()
    at cljs$core$pr_writer ()
    at 
    at Object.cljs$core$pr_sequential_writer [as pr_sequential_writer] ()
    at Object.cljs$core$print_prefix_map [as print_prefix_map] ()
    at cljs$core$print_map ()
    at Object.cljs$core$pr_writer_impl [as pr_writer_impl] ()
    at Object.cljs$core$pr_writer [as pr_writer] () {$$typeof: Symbol(react.element), type: "div", key: null, ref: null, props: {โ€ฆ}, โ€ฆ}
Restarting nREPL fixes it (do not have to restart shadow)

wilkerlucio17:02:54

I noticed any command I type on the REPL generate one of those

wilkerlucio17:02:05

and :code is whatever I sent

tony.kay17:02:13

Iโ€™m not seeing Wilkerโ€™s issue, though

thheller17:02:18

that the error doesn't show up in the REPL is definitely not intended

wilkerlucio17:02:35

mine seems to got totally borked, nothing that I send to the REPL is working

thheller17:02:15

I fixed that I think

thheller17:02:48

coming in a sec

thheller18:02:08

2.1.15 prints errors and should fix the Boolean issue

thheller18:02:19

errors aren't yet source mapped, need to hook that up first

wilkerlucio18:02:51

cool, sends are back on nREPL here

wilkerlucio18:02:34

one more thing: when using figwheel repl Intellij is able to recognize it's cljs and switch the repl for it (there is combobox to switch), but on shadow it can't and I have to manually change it

thheller18:02:58

hmm wonder what magic achieves that

thheller18:02:16

hehe its just the printed message

thheller18:02:26

To quit, type: :cljs/quit

thheller18:02:33

but I printed To quit, type: :repl/quit

thheller18:02:42

cursive seems to only detect the first one

wilkerlucio18:02:08

I think worth asking on #cursive, colin surely knows how it happens ๐Ÿ™‚

tony.kay18:02:19

and Colin is really open to that sort of thing

thheller18:02:29

I mean it works now

wilkerlucio18:02:47

ah, you changed for :cljs/quit and it did the trick?

thheller18:02:48

changing the message was all it requred

tony.kay18:02:23

you rock Thomas!

thheller18:02:06

2.1.16 seems to work properly with Cursive now

wilkerlucio19:02:26

yes, confirmed, thanks for such quick fixes ๐Ÿ’š

thheller19:02:26

if you find anything else let me know. I barely ever use the CLJS REPL so I never noticed these things

wilkerlucio19:02:14

yeah, I guess after years of really bad REPL's on CLJS people just got used to live without it, but for me it's very important part of my workflow

thheller19:02:51

I just rely on live reloading for CLJS. For CLJ I use the REPL all the time.

wilkerlucio19:02:06

I can understand that. what I do is that while writing functions, I just keep doing small changes and running on the REPL, that's the fastest feedback loop I know about, specially when writing data transformations

theasp19:02:55

Sooo... When are you going to support clojure? ๐Ÿ˜‰

thheller19:02:20

the deftest workflow unfortunately doesn't work for CLJS in Cursive

thheller19:02:28

otherwise I'd probably use that more there as well

thheller19:02:43

@theasp probably never. enough tooling for that exists.