This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-20
Channels
- # aws-lambda (8)
- # beginners (37)
- # cider (43)
- # cljs-dev (12)
- # clojure (121)
- # clojure-italy (19)
- # clojure-nl (1)
- # clojure-poland (1)
- # clojure-russia (14)
- # clojure-spec (6)
- # clojure-uk (98)
- # clojurescript (28)
- # core-async (1)
- # cursive (7)
- # datomic (4)
- # emacs (63)
- # events (8)
- # fulcro (19)
- # graphql (4)
- # hoplon (3)
- # mount (1)
- # nrepl (101)
- # off-topic (15)
- # om (3)
- # pedestal (2)
- # portkey (31)
- # protorepl (2)
- # re-frame (26)
- # reagent (26)
- # reitit (2)
- # shadow-cljs (58)
- # spacemacs (8)
- # specter (5)
- # sql (56)
- # test-check (11)
- # tools-deps (48)
- # vim (52)
I just fixed an unnecessary dependency on lein in the shadow-cljs support of Calva. I guess most people have lein installed. But anyway, now the integrated REPLs are started using the shadow-cljs
command.
No, sadly it isn't. And sadly they seem to have decided to let the REPL needs be served by those integrated terminals: https://github.com/Microsoft/vscode/issues/547
I am still hungry for feedback from anyone revving Calva up for a spin for shadow-cljs projects.
The key functionality I’d want (may be equivalent to brain surgery to do it in VSCode from what I understand) is the ability to highlight text, or put my cursor behind forms and press certain key combinations to send that to the REPL. If Calva has this already forgive me, but I think last time I checked I didn’t see it. Showing the results in the editor isn’t something I really care about at all as long as I can see the repl output somewhere for what I just evaluated
If I could interview some people about their shadow-cljs workflows, that would be awesome.
I can tell you mine briefly. run shadow-cljs server
or lein repl
(when working on shadow-cljs itself). connect to nREPL remotely. run everything else through the REPL.
one neat feature of Cursive is that it allows you to define snippets of code to send to the REPL on keypress
see https://cursive-ide.com/userguide/repl.html REPL Commands
could it be that shadow-cljs watch
isn't shutting down cleanly when stopped via CTRL + C?
it happened to me for the second time that i ended up with two ghost proccesses (one in node and one in java); i only realized when i started another instance and experienced very weird bugs
like objects not satisfying interfaces anymore even though they were when testing it on the repl
it also doesn't happen always (of course not, that would maybe even make it reproducible)
@thheller - about the thing we talked about yesterday - different dependencies in dev and release mode - I actually think this may not be worth looking into at all. The two projects I mentioned are actually one, because re-frame/tracing is a fork of debux and I'm not aware of any other projects that do this. Since there's a workaround for the current situation and it's not really a great idea to do it this way in general, I'd say no reason to waste time/energy on this, unless there's another important use case.
I am making a quick editor helper with
.
Said library uses (js/require ... )
to include the acorn-jsx
js parser.
I have forked it to patch it, what would be the correct approach to make libs that use js/require
universally compatible?
Hi! Could someone point me at good explanation about the advantages of shadow-cljs? I wonder is it worth and is it possible to replace standard pipeline and figwheel with shadow?
btw: because it's not quite clear in the docs and you said you needed help, cider works via cider-connect
, and then opening a cljs-repl as described (`(s/nrepl-select :build-id)`)
what doesn't work is refactoring. but i don't know how good refactoring is with cljs anyways, with jvm-clj it's quite good
@achikin that's actually what i did. it's nice because interaction with the npm ecosystem feels very painless, also configuration is quite easy and mostly just works
also it feels like compilation is a bit quicker? maybe that's just subjective. biggest pluspoint for me is embracing npm, because i work in a team of frontend-webdevs and if it's on npm it's a bit less alien
works. you just require npm modules as you would with clojurescript modules. only surprise i had was when working with d3 i was requiring a module (d3-requests i think?) and it gave me the nodejs version of the module whereas i was expecting the browser version.
For example here https://github.com/mhuebert/shadow-re-frame/blob/8d1bc1057e5b28dd8df6b34872a95a12a39a735a/package.json#L9 react is included in package.json
dependencies. Why?
shadow-cljs pulls in npm modules directly from the node_modules
, so what you do is install them normally using npm
or yarn
and a package.json
.
note that cljsjs libraries (and some other libraries, like promesa) put the javascript in the jar and wrap it with a :foreign-libs
declaration. but shadow-cljs doesn’t support foreign-libs, so it just fakes the namespace and continues to rely on node_modules
I think this business of reading the javascript directly is why the externs inference works so well
The key functionality I’d want (may be equivalent to brain surgery to do it in VSCode from what I understand) is the ability to highlight text, or put my cursor behind forms and press certain key combinations to send that to the REPL. If Calva has this already forgive me, but I think last time I checked I didn’t see it. Showing the results in the editor isn’t something I really care about at all as long as I can see the repl output somewhere for what I just evaluated