This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-12
Channels
- # adventofcode (6)
- # announcements (10)
- # beginners (70)
- # boot (55)
- # calva (15)
- # cljs-dev (18)
- # clojure (32)
- # clojure-europe (4)
- # clojure-nl (2)
- # clojure-spec (20)
- # clojure-uk (6)
- # clojurescript (14)
- # cursive (11)
- # datomic (31)
- # figwheel-main (7)
- # fulcro (1)
- # incanter (1)
- # jobs-discuss (3)
- # juxt (1)
- # off-topic (17)
- # onyx (5)
- # pathom (3)
- # pedestal (2)
- # quil (20)
- # re-frame (6)
- # reitit (1)
- # ring (2)
- # rum (5)
- # shadow-cljs (73)
- # spacemacs (5)
- # tools-deps (11)
- # uncomplicate (1)
- # unrepl (1)
- # yada (11)
@davidcerezoinigo I generally recommend staying away from environment variables for builds since they are typically abused for something that should be runtime configuration to instead be used for build configuration
run into several issues when I was introducing shadow-cljs to my friend today. not confirmed.
1. when :target :node-script
is used with :modules {:main {:init-fn a.b/c}}
, I saw no warnings on running shadow-cljs.edn.
2. ":after-load x.y/reload" is written in the configs while the real namespace is a.b/reload
,
3. I added ["fs" :as fs]
and save file, is how replaces and import fs
. however it throws an error. restarting the process then it will be ok.
@jiyinyiyong I don't understand what you mean with 3.? what error does it throw?
I'm gonna need a full error report and preferably reducible example. I'm not going to try and guess what you were seeing
hello! I'm trying to do the free reagent course but using emacs/cider instead of atom. can someone please take a look at the project's shadow-cljs.edn file and help me switch out proto-repl so that I can use cider. I keep getting errors when trying to connect the repl about my middleware. https://github.com/jacekschae/learn-reagent-course-files/blob/master/giggin/shadow-cljs.edn
@chase-lambert you just take out the proto-repl and add cider-nrepl with the version matching your cider config
i thought that was it but maybe i'm using the wrong version. let me find out how to check my cider config
there are some instructions here but I don't know how current they are. cider seems to be changing a lot. https://shadow-cljs.github.io/docs/UsersGuide.html#cider
cider does change a lot! I also failed to set my config to only use cider stable. this tech game is hard for me this week!
ahh. when you connect-cljs in cider it asks for host, port, and then Clojurescript repl type. it has two options for shadow-cljs. shadow and shadow-select. Then it also asks for build type so I select dev
and it gives me this error:
WARNING: No Clojure project was detected. The
refactor-nrepl middleware was not enabled. (You can mute this
warning by customizing `cljr-suppress-no-project-warning'.)
shadow.user> ExceptionInfo no build with id: :dev clojure.core/ex-info (core.clj:4739)WARNING: No Clojure project was detected. The
refactor-nrepl middleware was not enabled. (You can mute this
warning by customizing `cljr-suppress-no-project-warning'.)
shadow.user> ExceptionInfo no build with id: :dev clojure.core/ex-info (core.clj:4739)
https://github.com/jacekschae/learn-reagent-course-files/blob/master/giggin/shadow-cljs.edn#L10
hmmm, ok. still didn't work but it's a little different. Cider is telling me this: CIDER 0.20.0snapshot (package: 20190112.721), nREPL 0.4.5 but if I put that in the dependencies instead of [cider/cider-nrepl "0.19.0"] I get a dependency error when starting the server
WARNING: No Clojure project was detected. The
refactor-nrepl middleware was not enabled. (You can mute this
warning by customizing `cljr-suppress-no-project-warning'.)
shadow.user> To quit, type: :cljs/quit
[:selected :app]
cljs.user>
but it says shadow-cljs - connection closed still on the browser. what's a simple expression I can throw in the repl to see if it's working? something like (js/alert "It's working!")?
oh. damn that is frustrating. I have it open in both my linux "container" and my regular os.
wait it worked! It is in my linux browser but the bottom left corner is just blank instead of the green shadow-cljs connection open or whatever I thought it would be. Sweet!
thanks again for helping me out. I know i'm probably making things overly difficult. But boy howdy is it frustrating to not even be able to get set up. I'm learning though.
can't comment on cider anymore. I quit using it a long time ago, got too tired of it breaking π
Iβm getting a compile warning
------ WARNING #5 --------------------------------------------------------------
File: xxx/animate.cljc:34:21
variable ReactTransitionGroup is undeclared
--------------------------------------------------------------------------------
it seems to closure optimize fine when I grep the output β¦ but Iβm worried Iβm missing what its warning me about πthis is with infer externs / npm package react-transition-group and doing the cljsjs hack of (js/goog.exportSymbol "ReactTransitionGroup" react-transition-group)
(weβre still migrating β¦)
similar warning with Raven
-- compiled output: https://gist.github.com/eyston/9b60e0896bb344ffd4055637d79e6a48 β I think that sa
is the goog.exportSymbol
π
so it gets all the externs right, it just seems upset at the top level even tho the exportSymbol
is right there
@U0KHZ4HNG where or how do you access the ReactTransitionGroup
?
(js/React.createElement
js/ReactTransitionGroup.CSSTransition
(clj->js props)
#(f (keyword %)))
also β this warning is before the final output β like I get two groups of warnings, its in the first
well .. they are both during closure I think? at least it seems that way β¦ or maybe Iβm misinterpreting
-> Closure - Optimizing ...
------ WARNING #1 --------------------------------------------------------------
File: com/cognitect/transit.js:649:8
variable module is undeclared
--------------------------------------------------------------------------------
[:widget] Build completed. (437 files, 303 compiled, 1 warnings, 75.64s)
------ WARNING #1 --------------------------------------------------------------
File: om/next.cljc:493:4
--------------------------------------------------------------------------------
check if .shadow-cljs/builds/<your-id>/release/shadow.externs.js
contains ReactTransitionGroup
.
/** @const {ShadowJS} */ var FormData;
/** @const {ShadowJS} */ var PropTypes;
/** @const {ShadowJS} */ var React;
/** @const {ShadowJS} */ var requestAnimationFrame;
this is at the top, the rest is on ShadowJS β no ReactTransitionGroupbut it does have the externs for ReactTransitionGroup itself, e.g.
ShadowJS.prototype.CSSTransition;
we have our own extern file as well β would it be reasonable to add /** @const {ShadowJS} */ var ReactTransitionGroup;
plus the handful of others not picked up?
it seems to pick up all the properties correctly which is all that will matter once we migrate away from the cljsjs shims