This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-21
Channels
- # announcements (10)
- # aws (38)
- # beginners (220)
- # calva (2)
- # cider (26)
- # clj-kondo (194)
- # cljs-dev (4)
- # clojure (190)
- # clojure-dev (7)
- # clojure-europe (3)
- # clojure-italy (6)
- # clojure-nl (4)
- # clojure-uk (8)
- # clojured (1)
- # clojurescript (29)
- # code-reviews (31)
- # community-development (9)
- # core-async (24)
- # cursive (38)
- # data-science (51)
- # datomic (52)
- # dirac (2)
- # emacs (3)
- # events (1)
- # figwheel-main (4)
- # fulcro (49)
- # graphql (13)
- # heroku (1)
- # hoplon (19)
- # immutant (3)
- # leiningen (1)
- # nrepl (59)
- # off-topic (12)
- # onyx (2)
- # pathom (51)
- # reitit (15)
- # shadow-cljs (88)
- # spacemacs (6)
- # sql (3)
- # tools-deps (107)
- # xtdb (11)
https://clojurians.slack.com/archives/C0617A8PQ/p1571620670136300 Anybody seen this before?
@lvbarbosa yes I’ve seen this, I think it’s a CIDER bug
sometimes it works when I press enter a few times in the REPL, esp. with a CLJS buffer open next to it
Seems like it works if I cider-set-repl-type
to cljs
Nope, goes back to clj mode after a while :(
I am trying to rollback cider to an older version to see what happens
previously on 0.23, now trying 0.21
Same thing.. I'll try to downgrade shadow-cljs now Nothing. Went back to a few months ago and still have the same problem. I have no idea on what it might be
I usually do shadow-CLJS watch app
And then cider-connect-cljs
Screen Shot 2019-10-21 at 10.12.06 (3).png
Same thing with watching the build on terminal and connecting to the repl
The repl work, but it is "disconnected" from the project files. I can't evaluate code in the cljs buffer, nor cider-switch-to-repl-buffer
while in .cljs
files.
I just noticed that the repl buffer says "clojure" and not "clojurescript". Is that an evidence of something?
I forgot to include cider-nrepl this time
Alright, now there's the old message: "WARNING: No Clojure Project was detected"
Still can't switch to repl buffer/evaluate code in source files. What versions of cider and shadow-cljs are you using? @UEQGQ6XH7
Screen Shot 2019-10-21 at 10.17.19 (3).png
Try to your shadow-cljs.edn file on GitHub
And we can maybe find your problem
Seems to work
It is the default acme
sample app from shadow-cljs:
npx create-cljs-project acme-app
But you have access to the repl?
If I do a cider-set-repl-type
and change the repl to cljs
, it works for a while, but then it goes back to clj
mode and stops working on cljs files
By the way yes
The issue that the repl does not say clojureSciprz is an issue
Piggiebsck
Or cider-connect-CLJS
:dependencies
[[cider/piggieback "0.4.2"]
[cider/cider-nrepl "0.23.0-SNAPSHOT"]]
This is what I'm using
Does the ordering matter?
@lvbarbosa I changed something in the latest release that may be causing these issues. can you try 2.8.64
and see if those problems are still there?
Thanks @thheller, it worked after a downgrade!
@thheller I went to 2.8.64 and it works also! I was on 2.8.52 previously
I can imagine... thank you so much for the effort! ⭐
I'll take a deeper look at the tool in the future
@lvbarbosa @U0ETXRFEW could you try 2.8.66
? I think it should be fixed but I have no clue how to use emacs so I can't test myself
of course, just a sec
@thheller works fine on Emacs!
This is my first time doing cljs, so I'm not an "advanced" user. I'll keep an eye on things, but it works for what I need right now
Make sure to have piggieback as well
I recently updated to 2.8.64
and that was working on one project, but on a different project I am getting
CompilerException: java.lang.RuntimeException: Unable to resolve symbol: read+string in this context, compiling:(shadow/cljs/devtools/server/repl_system/clojure.clj:113:32)
still works when I manually include 2.8.16 (which was what I was using before iirc) so I not a big issue right now.alright, that worked, time to fix the issues that come with the higher version closure compiler now.
Well the one that came with .64.. I had some troubles with importing js a certain way in the other project.
And in this case it was complaining it couldn't find process
and I had to npm install it, I'm thinking that was the thing you mentioned earlier when I said I had to include js-options to get my build to work. e.g. npm install shadow-cljs
The repl work, but it is "disconnected" from the project files. I can't evaluate code in the cljs buffer, nor cider-switch-to-repl-buffer
while in .cljs
files.
I just noticed that the repl buffer says "clojure" and not "clojurescript". Is that an evidence of something?
Try to your shadow-cljs.edn file on GitHub
in https://shadow-cljs.github.io/docs/UsersGuide.html#_preloads it mentions it adds cljs-devtools (https://github.com/binaryage/cljs-devtools) to preloads as long as the dep is on the path (in dependencies). When i do this, cljs-devtools formatting feature is enabled but not the "hints" feature (https://github.com/binaryage/cljs-devtools/blob/master/docs/faq.md#what-is-the-hints-feature). Any hint on how to enable this in the shadow setup?
i tried adding features to install [:formatters :hints]
to my devtools map
@drewverlee that goes into the :compiler-options {:external-config {:devtools/config ...}}
not :devtools
I was accepted into the Github Sponsors Beta some days ago ... still kinda clueless about the tiers stuff. any comments are welcome
I am gonna sponsor you through GitHub then :)
With the matching mechanism it will double :)
is there a reason to prefer github to patreon? happy to switch if there's a benefit for you @thheller
Using shadow-cljs, is possible to pre-process/manipulate code before it gets sent to the ClojureScript compiler?
Considering enabling something like this feature in Elixir (Phoenix), where one can give a name to a set of imports/requires, and then use them in any file:
defmodule MyAppWeb.UserController do
use MyAppWeb, :controller
...
May not be worth it in Clojure, since namespaces tend to be bigger, though part of the reason for that is also how bad ns
is, so not sure