This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-01
Channels
- # aleph (7)
- # bangalore-clj (1)
- # beginners (89)
- # boot (5)
- # clara (21)
- # cljs-dev (2)
- # cljsrn (57)
- # clojure (58)
- # clojure-austin (1)
- # clojure-conj (1)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-russia (4)
- # clojure-sanfrancisco (4)
- # clojure-spec (31)
- # clojure-uk (67)
- # clojurebridge (4)
- # clojurescript (56)
- # cursive (92)
- # data-science (4)
- # datomic (15)
- # emacs (23)
- # events (1)
- # fulcro (121)
- # gorilla (2)
- # jobs-discuss (1)
- # juxt (1)
- # lambdaisland (6)
- # lumo (13)
- # off-topic (11)
- # om (1)
- # onyx (17)
- # overtone (5)
- # parinfer (9)
- # planck (3)
- # re-frame (21)
- # reagent (95)
- # ring-swagger (7)
- # spacemacs (58)
- # vim (13)
- # yada (2)
I’m trying to locally bump and test a CLJSJS package version. I updated the version number and MD5-checksum in build.boot
and run
maharj:react-leaflet git:(master*) $ boot package install target
Downloading v1.6.5.zip
Extracting 133 files
Sifting output files...
Sifting output files...
Writing pom.xml and pom.properties...
Writing react-leaflet-1.6.5.jar...
Installing react-leaflet-1.6.5.jar...
Writing target dir(s)...
However, the package is not being installed to my local MVN repo (`~/.m2/repository`) and thus when I added the new version as a dependency to a project I get an error. What am I missing here? I’m completely new to boot
since I’ve managed to use leiningen until now. Any ideas how to debug what is not working?Ah, nevermind. I was missing cljsjs/
from my prfefix in the dependency.
I guess Leiningen adds the empty ~/.m2/repository/react-leaflet
-directory when I declared it as a dependency. It misguided me.
I have a lib available on js/react-google-maps
and I would like to import an object which is in a nested folder places
. In javascript that would be: import { SearchBox } from "react-google-maps/places";
but although I have access to the first level objects such as js/react-google-maps.GoogleMap
, I can't access js/react-google-maps.places.SearchBox
. Do you know what the interop method in that case?
It doesn't find the namespace, I wonder if it might be due to the way I require Javascript library: through a Javascript file doing the require
Can people throw out some names for some very lightweight cljs frameworks please?
the most general one I can think of is https://github.com/stuartsierra/component
Hi, quick Q: is it possible to compile some CLJS code into a CommonsJS module for use in a JS project?
I've spent the last hour searching Google and seen many articles talking about including JS modules in a CLJS project but nothing the other way round...
Do you want to pass compiled CLJS namespaces directly into something like Webpack?
Because ClojureScript compiler emits a lot of code you’d need an optimizing compiler with decent DCE to remove what is not needed, non of JS tools can do it well
@sleepyfox not directly, there’s a different build tool called shadow-cljs that can do that
@sleepyfox if you go down that path you still need to understand how Closure Compiler works as @roman01la suggested
if this for client side stuff, you will want advanced compilation and that means you need to understand externs
@sleepyfox https://github.com/thheller/shadow-cljs/wiki/ClojureScript-for-JS-Devs or https://github.com/thheller/shadow-cljs/wiki/ClojureScript-for-node.js-libraries might work for you
@dnolen is there any easy way to use the master version of clojure script in a project? I'd like to get the npm-deps fixes?
Cool thanks
How do I begin debugging a case where the app doesn't show up under :advanced optimizations, but there's no error in the console?
@urbank trying a different browser, and doing lein clean
@sleepyfox http://clojureverse.org/t/beginner-guide-to-compile-clojurescript-to-commonjs-and-use-webpack/523?u=jiyinyiyong
@pesterhazy Hm... same on chrome edge and firefox. Did notice that I'm getting
ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: file:/C:/Users/urban/.m2/repository/cljsjs/react/15.3.1-0/react-15.3.1-0.jar!/cljsjs/react/common/react.ext.js at (unknown source) line (unknown line) : (unknown column)
that's an ancient cljsjs/react version too
Which is weird. Isn't it true that if dependencies share a dependency the one at the bottom of the deps will be used? Or is that figment of my imagination?
No longer getting this error after adding enough :exclusions
. Now I'm getting a ton of
required "some.my_namespace" namespace never provided.
ERROR - required "some.my_namespace" namespace never provided goog.require('some.my_namespace');
Oooh… :parallel-build true
from @mfikes recommendation is awesome! My builds went from 71 seconds to 53 seconds (2012 MacBook Pro w/16 GB memory). Thx @dnolen ! 🙂 http://blog.fikesfarm.com/posts/2015-11-14-try-clojurescript-parallel-compilation.html
@genekim If you are curious, the most I've been able to gain is about a speedup of 7 🙂 Here is the repo which has some ridiculous namespaces in it https://github.com/mfikes/fifth-postulate
Ha! @mfikes — that’s so great! Looking at your system configuration is making me wonder whether I ordered the wrong system yesterday. 2017 MacBook Pro. 😞 Hahaha.
@genekim Another thing worth trying is fixing the heap at something like -Xmx8g
. (Give it a decent amount of RAM, but it also appears to be important that this is limited to a fixed amount. If you don't have such a setting, some builds can actually be slower as the JVM seems to allocate too much RAM, or in some way inefficiently manage things.)
If you are using lein
, put something like this in your project.clj
:
:jvm-opts ["-Xmx8g"]
Wow, @mfikes… That’s so awesome! 31.451 seconds. THANK YOU! You made my week!!! (and I’ve had a pretty great week already!)
Cool! Presuming you are using the latest compiler as well. It has had something like a speedup of 2 over the past several months (depending on your codebase, of course).
@lockdown- that stuff supported in JS - well defined behavior - in ClojureScript undefined behavior