This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-18
Channels
- # adventofcode (62)
- # aws (5)
- # beginners (59)
- # calva (63)
- # cider (26)
- # cljdoc (1)
- # cljsrn (22)
- # clojure (99)
- # clojure-austin (1)
- # clojure-dev (19)
- # clojure-europe (4)
- # clojure-hamburg (2)
- # clojure-italy (3)
- # clojure-nl (23)
- # clojure-spec (2)
- # clojure-uk (85)
- # clojurescript (41)
- # core-async (17)
- # cursive (20)
- # data-science (11)
- # datascript (2)
- # datomic (31)
- # emacs (7)
- # figwheel (28)
- # figwheel-main (12)
- # graphql (2)
- # hyperfiddle (3)
- # juxt (1)
- # kaocha (2)
- # leiningen (5)
- # nrepl (13)
- # off-topic (45)
- # pathom (13)
- # pedestal (11)
- # re-frame (20)
- # reagent (10)
- # shadow-cljs (92)
- # spacemacs (9)
- # sql (39)
- # tools-deps (32)
- # unrepl (3)
hi guys, upon starting shadow-cljs watch :my-app
, I am getting this:
[2018-12-18 09:39:02.276 - INFO] Using tools.nrepl 0.2.* server!
This is my shadow-cljs.edn
:
{:source-paths ["src/cljs"]
:nrepl {:port 8777
:middleware [refactor-nrepl.middleware/wrap-refactor]}
:dependencies [[bidi "2.1.4"]
[binaryage/devtools "0.9.10"]
[cider/cider-nrepl "0.18.0"]
[cljs-ajax "0.8.0"]
[clojure-humanize "0.2.2"]
[com.cemerick/url "0.1.1"]
[hickory "0.7.1"]
[day8.re-frame/http-fx "0.1.6"]
[kibu/pushy "0.3.8"]
[macchiato/hiccups "0.4.1"]
[re-frame "0.10.6"]
[reagent "0.8.1"]
[reagent-utils "0.3.1"]
[refactor-nrepl "2.4.0"]]
:builds {:my-app {:target :browser
:output-dir "resources/public/js"
:asset-path "/js"
:modules {:main {:entries [my-app.core]}}}}}
Any ideas? ๐I'm not sure it's related, but I get these warnings when I do cider-connect:
WARNING: CIDER requires nREPL 0.2.12 (or newer) to work properly
More information.
WARNING: Can't determine Clojure's version. CIDER requires Clojure 1.8.0 (or newer).
More information.
WARNING: CIDER requires cider-nrepl to be fully functional. Many things will not work without it!
More information.
(I cross-posted this problem in #cider, because I don't know to what it's related TBH)
nope, CIDER 0.19.0snapshot (package: 20181212.1936)
. But even using [cider/cider-nrepl "0.19.0-SNAPSHOT"]
in shadow-cljs.edn
doesn't fix it.
are you sure? did you restart properly after changing it? AFAICT the versions need to match
and are you sure you are connecting to 8777? not using some other built-in nrepl mechanism that starts something via deps.edn
? since you mentioned that
note that on another project with [cider/cider-nrepl "0.18.0"]
I haven't got neither the message nor the warnings after CIDER connect.
โฏ shadow-cljs clj-repl
shadow-cljs - config: /home/manuel/githubs/manuel-uberti/boodle/shadow-cljs.edn cli version: 2.7.9 node: v8.14.0
shadow-cljs - starting ...
Dec 18, 2018 10:45:14 AM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.8.Final
Dec 18, 2018 10:45:14 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.8.Final
shadow-cljs - server version: 2.7.9
shadow-cljs - server running at
shadow-cljs - socket REPL running on port 36281
shadow-cljs - nREPL server started on port 8777
shadow-cljs - REPL - see (help)
To quit, type: :repl/quit
[1:0]~shadow.user=> (require '[ :as io])
nil
[1:0]~shadow.user=> (io/resource "cider/nrepl.clj")
#object[java.net.URL 0x324afa73 "jar:file:/home/manuel/.m2/repository/cider/cider-nrepl/0.18.0/cider-nrepl-0.18.0.jar!/cider/nrepl.clj"]
[com.cemerick/austin "0.1.3"]
[com.cemerick/piggieback "0.1.2"]
[org.clojure/tools.nrepl "0.2.3"]
Hi. We have an app that uses a library, both app and lib are under our control, both have clj/cljs/cljc code. We use deps.edn and the app references the library with a git sha. We need to hand over the source code for the app to our client but not the source code for the library. On the jvm side I can create an aot compiled skinny jar for the lib. Is there something similar I can do on the javascript side so that I can still use the library, with no/minimal code changes, but without distributing the source?
@davidw no that is not possible. CLJS compiler needs the full analyzer data to compile which it can only build from source
I don't really know how the whole compilation process works so this may be a stupid question but would it not be possible to bundle up the js files that get generated during a dev build in cljs-runtime and then use them when compiling the app? The CLJS compiler has already generated js for those namespaces, no?
why is it so bad to ship the source code? its not exactly "secret" either with AOT compilation
I understand it's not "secret", etc. It's a constraint I've been given so it's what I'm trying to work within for now.
yeah. It would not be impossible to do this but it would involve a bit of compiler work and nobody has worked on anything like that AFAICT
if you don't mind I'd like to pick your brains on it a little more. Leaving macros aside for now ๐. You've made it possible to :require
npm modules and they obviously don't have the cljs analyzer data. In theory could something similar be done to :require
the pre-compiled .js output?
not really. the cljs compiler can only emit cljs code with the anaylzer data present
so stuff like protocols don't work for example (since they require analyzer data and don't exist in JS)
If it's possible, how do you think you'd you solve it? Would you package up the analyzer data?
So it seems my options are, compile the lib to js and use js interop which means quite extensive changes to the app code, or just distribute the source code in a jar.
I never actually tried and it is not recommended to do so but in theory it could work as it will be treated as Closure JS, like the closure library itself and that works fine.
do a dev compile. take the files from the cljs-runtime
dir for your lib only and put them into the classpath of the other app
so that is only finds the js files (shadow-cljs will scan the classpath so make sure it doesn't contain the actual sources)
Hi folks. Anyone have an idea how to require Grommet in from NPM? I think they're doing something a bit odd with the es6 module exports, but I don't have the experience to say what that is or figure a way around it. Thanks.
[grommet :as g] at first. Nothing in g when I printed it in console other than that it was an es6 module. After that I looked at the index file the package.json indicated, and tried ["grommet/components" :as gc] ["grommet/contexts" :as gcon] ["grommet/default-props" :as gdp] ["grommet/themes" :as gt]. The latter three had relevant bits, but not components. Also tried pulling in components from the subdirectories, but everything I tried turned up undefined. I don't grok the exports stuff enough to know what else I should try.
not really sure whats happening but it has nothing to do with exports or how you require it
sorry. not a clue what is happening here. completely clueless what is even going on in that code
Not a problem. I've been getting the feeling that library might not be dependable anyway. Thanks for trying, and thanks for shadow too. It's made things much easier.
Having a bit of trouble finding some info on this- is there a semi-painless way to have shadow use a different version of clojurescript? Essentially, there has been a commit to the cljs repo that fixes an annoying bug for me, and Iโd like to give it a shot while also continuing to use shadow etc.
@shanelester55 only if you use deps.edn
or lein
to manage your deps
Ahh I see. The dependencies section of the shadow-cljs.edn wonโt do the trick then? (I did attempt to require a clojurescript version in there but it spit out a message saying it wouldnt use it)
Right, that makes sense. Alrighty. Does shadow generally follow releases of clojurescript pretty closely?
I could just wait for another release after all
Perfect. Iโll probably just wait for the next release then ๐
Thanks for your help!
does this error ring any bells for anyone?
java.lang.NoSuchFieldError: PARSE_RESULTS
just after the server starts up
I assume this is a dependency problem