This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-21
Channels
- # architecture (9)
- # beginners (192)
- # boot (1)
- # bristol-clojurians (2)
- # cider (213)
- # cljs-dev (10)
- # clojure (195)
- # clojure-art (2)
- # clojure-austin (3)
- # clojure-belgium (4)
- # clojure-dev (4)
- # clojure-dusseldorf (1)
- # clojure-gamedev (9)
- # clojure-greece (21)
- # clojure-italy (27)
- # clojure-losangeles (2)
- # clojure-russia (1)
- # clojure-seattle-old (2)
- # clojure-serbia (1)
- # clojure-spec (114)
- # clojure-uk (136)
- # clojured (2)
- # clojurescript (100)
- # community-development (19)
- # core-async (12)
- # cursive (7)
- # duct (1)
- # figwheel (7)
- # fulcro (96)
- # hoplon (4)
- # jobs (2)
- # lein-figwheel (28)
- # leiningen (2)
- # luminus (14)
- # lumo (3)
- # off-topic (11)
- # om-next (2)
- # pedestal (10)
- # planck (11)
- # portkey (2)
- # proton (1)
- # protorepl (19)
- # re-frame (27)
- # reagent (12)
- # shadow-cljs (82)
- # spacemacs (42)
- # specter (15)
- # sql (3)
@denik semantic-ui-react
adds 726 files to the compilation. that takes a while. shouldn't be a problem on the second compile once caching kicks in.
-> Shadow JS converting 729 JS sources
<- Shadow JS converting 729 JS sources (3688 ms)
-> Shadow JS Cache write: 729 JS files
<- Shadow JS Cache write: 729 JS files (5814 ms)
@thheller running it with the verbose flag, cache doesn’t seem to kick in and it prints
-> Flushing 1023 sources
<- Flushing 1023 sources (108 ms)
-> Flushing unoptimized modules
<- Flushing unoptimized modules (95 ms)
the Flushing ...
is just writing the final JS to disk, not the actual compilation parts
so, I’m trying to use a similar workflow to the way I work in CLJ, where I send forms from my editor to the REPL, and I’m not having much success
even if I ns
into the namespace i’m working in at the REPL, none of the vars exist unless I manually evaluate the def
s at the REPL
@lilactown I can’t seem to get a reliable functional repl session working either, though to be fair I couldn’t get it working with the lein/ figwheel / piggieback rube goldberg contraption using the normal cljs compiler either
yeah, I have a feeling this is an issue with most cljs repls - I seem to recall similar issues with figwheel. was just wondering if someone had found a way to be productive
basically i gave up and I just rely on auto-reloading code and print statements to the console
I’m working on a Node.js app that serves a webpage. So e.g. I might have my-project.pages.sign-in
that has some logic, makes some requests, etc.
I’d like to be able to evaluate forms within that namespace at the REPL. e.g. if I have (def foo "bar")
inside of my-project.pages.sign-in
, I’d like to evaluate foo
at the REPL and see “bar” printed out
atm, I have to use the fully qualified namespace my-project.pages.sign-in/foo
, even if I do (ns my-project.pages.sign-in)
in the REPL first
evaluating without the fully qualified namespace results in printing “nil” unless I also evaluate the def
(shadow.cljs.devtools.api/nrepl-select :script)
To quit, type: :cljs/quit
=> [:selected :script]
(in-ns 'demo.script)
=> demo.script
(def foo "bar")
=> #'demo.script/foo
foo
=> "bar"
the only thing that’s not working once I ns
into the namespace are things that are (:require)
’d in the ns declaration
ie. if you don't have a namespace loaded and (ns that.foo)
it will be empty, no defs no requires nothing
I think I’m getting a bit mixed up since in my clj project it defaults to the ns my -main
function is in and I often evaluate the whole file
the sign-in ns looks like:
(ns cambia.web.experience.dashboard.pages.sign-in
(:require [cambia.web.ui.components.page-header :as page-header]
[cambia.web.experience.dashboard.components.page-setup :as page-setup]
[cambia.web.experience.dashboard.components.login :refer [login]]))
;; ...
(defn foobar [] "baz")
yeah I also realized that I’m on a really out of date shadow-cljs version, per your reply to my github issue 😛
what i was trying was just trying to run a function from one of my files via proto-repl. i’ve seen video where people have (defn my-func [] ...)
and then send forms that invoke it (my-func)
. I seem to need to run the definition manually before being able to use it. But @lilactown pointed out that it is actually loaded already but you have to use the fully qualified namespace
@lee.justin.m try switching to the ns that you’re trying to evaluate it in
I’m using Emacs & CIDER. I notice that if I try and send those forms from a file to the REPL, they don’t work. but if I enter them into the REPL directly, they work
oh interesting: this is showing up in the watch terminal [2018-02-21 12:29:33 - WARNING] client sent unknown msg {:type :repl/set-ns-complete, :id 0, :ns seekeasy.util}
@lee.justin.m also old version?
urg. i’ve been updating shadow-cljs globally but apparently it was pegged in my package.json
so I think i was on an old version. confusing because I apparently imagined that i was getting bug fixes from you last week.
ahhhh that explains it. i was testing your changes in a different test repo last week. i forgot that, which is why things seemed to go backwards
so things work if i manually switch namespaces using (in-ns). it would seem like protorepl should do that for me, but this does make it usable
I do a cmd-alt-b to send a form over to the repl. you’d think given that it knows what namespace i’m in when i do that, it would do a (in-ns) first
it looks like it wraps the form in an eval and sends it in an object like this {op: "eval", code: wrappedCode, ns: ns, session: session}
. I need to figure out a way to dump the actual serialized bytes being sent over the socket to tell more, but the code should be sending the namespace of the current file from which you send the form
hello folks, is shadow-cljs
using its own internal way to resolve the classpath? If so I have a feature request if possible 😄