This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-01
Channels
- # bangalore-clj (1)
- # beginners (16)
- # bigdata (1)
- # boot (16)
- # cljs-dev (79)
- # cljsjs (37)
- # cljsrn (62)
- # clojars (1)
- # clojure (260)
- # clojure-austin (3)
- # clojure-dev (3)
- # clojure-dusseldorf (3)
- # clojure-italy (1)
- # clojure-russia (32)
- # clojure-serbia (2)
- # clojure-spec (8)
- # clojure-uk (146)
- # clojure-ukraine (16)
- # clojurescript (66)
- # cursive (27)
- # datomic (57)
- # dirac (124)
- # emacs (10)
- # hoplon (12)
- # juxt (6)
- # keechma (6)
- # lein-figwheel (18)
- # leiningen (6)
- # lumo (51)
- # off-topic (1)
- # om (66)
- # onyx (41)
- # perun (1)
- # play-clj (1)
- # protorepl (9)
- # re-frame (20)
- # reagent (11)
- # ring (4)
- # ring-swagger (10)
- # rum (22)
- # specter (8)
- # sql (2)
- # test-check (5)
- # untangled (27)
- # yada (29)
https://github.com/gfredericks/exact <-- is this the library to use for bigInt in cljs ?
Hey all... I'm trying out a boot cljs project using https://github.com/martinklepsch/tenzing
1. boot -d seancorfield/boot-new new -t tenzing -n test-project -a +rum -a +garden -a +test -a +dirac
- ok
2. cd test-project
- ok ๐
3. start dev:
$ boot dev
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0
Writing boot_cljs_repl.cljs...
Starting reload server on
Writing adzerk/boot_reload/init1547.cljs to connect to ...
2017-03-01 12:35:33.814:INFO::clojure-agent-send-off-pool-0: Logging initialized @8360ms
2017-03-01 12:35:33.862:INFO:oejs.Server:clojure-agent-send-off-pool-0: jetty-9.2.10.v20150310
2017-03-01 12:35:33.885:INFO:oejs.ServerConnector:clojure-agent-send-off-pool-0: Started ServerConnector@787995cd{HTTP/1.1}{0.0.0.0:3000}
2017-03-01 12:35:33.886:INFO:oejs.Server:clojure-agent-send-off-pool-0: Started @8431ms
Started Jetty on
Starting file watcher (CTRL-C to quit)...
nREPL server started on port 46404 on host 127.0.0.1 -
Adding :require adzerk.boot-cljs-repl to app.cljs.edn...
Adding :preloads dirac.runtime.preload to app.cljs.edn...
nREPL server started on port 8230 on host 127.0.0.1 -
Adding :require adzerk.boot-reload.init1547 to app.cljs.edn...
Compiling ClojureScript...
โข js/app.js
Dirac Agent v1.1.3
Connected to nREPL server at .
Agent is accepting connections at .
Compiling garden.css...
Wrote: [...]/css/garden.css
Elapsed time: 23.257 sec
- ok , but 2 nrepl server started (46404 en 8230)? And what about that clojure version conflict? - Why is it looking for clojure 1.7.0?
$ cat boot.properties
#
#Wed Mar 01 12:17:21 CET 2017
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.8.0
BOOT_VERSION=2.7.1
BOOT_EMIT_TARGET=no
4. connect to nrepl:
$ boot repl --client
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
OpenJDK 64-Bit Server VM 1.8.0_92-b15
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Find by Name: (find-name "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from : [clojuredocs or cdoc]
(user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
boot.user=> (start-repl)
boot.user=> java.lang.IllegalStateException: Can't change/establish root binding of: *cljs-repl-env* with set
boot.user=>
boot.user=> (.log js/console "test")
java.lang.RuntimeException: No such namespace: js
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such namespace: js, compiling:(/tmp/boot.user1255255195879186583.clj:1:1)
boot.user=> (quit)
Bye for now!
- nope... What am I doing wrong here? (And there's that clojure version conflict again?)- I hope I got the right channel, or should I put it on #boot ?
@kurt-o-sys why donโt you start first by not including +dirac and +test? and then add them one by one until it breaks
sounds like a plan
also I briefly checked the template code and it looks like the dirac version is hard-coded here: https://github.com/martinklepsch/tenzing/blob/master/src/leiningen/new/tenzing.clj#L108 this could be another source of very sharp edges, v1.1.3 is about a month old and running it against latest canary could cause hard-to-understand compatibility issues, you should be always running latest dirac with latest canary or stick to particular versions: https://github.com/binaryage/dirac/blob/master/docs/faq.md#why-should-i-use-recent-chrome-canary-with-dirac-devtools
ok, nrepl works if dirac is not added... The Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0
is still there
@kurt-o-sys you can probably use boot show --pedantic
to track down that conflict
let me try:
$ boot show --pedantic
Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.7.0
Retrieving[...]
[!] com.google.guava/guava
โ 19.0
org.clojure/clojurescript
โ 18.0
weasel
com.cemerick/piggieback
[!] com.google.javascript/closure-compiler
โ v20150505
weasel
โ v20150126
com.cemerick/piggieback
[!] com.google.javascript/closure-compiler-externs
โ v20160911
org.clojure/clojurescript
โ v20150505
weasel
โ v20150126
com.cemerick/piggieback
[!] org.clojure/clojure
โ 1.8.0
rum
org.clojure/clojurescript
โ 1.7.0-RC1
weasel
โ 1.7.0
pandeiro/boot-http
โ 1.6.0
com.cemerick/piggieback
โ 1.2.0
org.clojure/tools.nrepl
[โ] org.clojure/clojurescript
โ 1.9.293
org.clojure/clojurescript
โ 0.0-3308
weasel
โ 0.0-3165
com.cemerick/piggieback
[!] org.clojure/google-closure-library
โ 0.0-20160609-f42b4a24
org.clojure/clojurescript
โ 0.0-20150505-021ed5b3
weasel
โ 0.0-20140718-946a7d39
com.cemerick/piggieback
[!] org.clojure/google-closure-library-third-party
โ 0.0-20160609-f42b4a24
org.clojure/clojurescript
โ 0.0-20150505-021ed5b3
weasel
โ 0.0-20140718-946a7d39
com.cemerick/piggieback
[!] org.clojure/tools.reader
โ 1.0.0-beta3
org.clojure/clojurescript
โ 0.9.2
weasel
โ 0.8.16
com.cemerick/piggieback
right... so it's taking the clojure version from boot-http ?well... easiest way to solve it seems to be to add :exclusions ['org.clojure/clojure]
to set-env!
@kurt-o-sys I think you should probably just add [org.clojure/clojure โ1.8.0โ]
to your list of dependencies
maybe thats something that should be fixed in tenzing, I surprisingly havenโt noticed this issue myself though
ok... let's try that one ๐
yeah, seems to be ok as well
nice, thx
welcome ๐
Our open source learning group is hosting the free online webinar Essential Klipse this Saturday at 7 pm UTC. ClojureScript fundamentals will also be discussed. Everyone is welcome! http://discuss.thevalueoflearning.org/t/webinar-discussion-2-essential-klipse/39?u=jay
@martinklepsch: Any chance you have some time for some questions about OpenLayers and the cljsjs package for it? I'm trying to get it working with CLJS and I think I'm missing something fundamental in my understanding of how the GClosure files and externs interact.
@shaun-mahood can try to help but never used it myself. Either way letโs take this to #cljsjs
Hi there ๐ Just a quick question Iโm not sure about: letโs say we have ns example.stuff.utils
from project example
. Which are available locations for the file declaring this ns? src-root/example/stuff/utils.cljs
, src-root/example/stuff.utils.cljs
, anywhere you want under the source root directory? is there any difference between clj and cljs on this point?
used to have to conditionally require clojure.pprint
and cljs.pprint
for cljs/clj in a .cljc file but now i can apparently just require clojure.pprint
.
1. is that a trend that will continue? e.g. will I be able to do the same for cljs.spec
?
2. why do they differ โ is it because there are slight differences in how they work?
Anyone have a good workflow for writing tests with cljs.spec? I'm trying to incorporate some macros for conformance, but I keep getting a ton of warning and errors
Hello @benzap ๐ Just as a notice, you might be willing to as this in #clojure-spec
I would, but i'm not sure if the problem is with spec, or just clojurescript not liking my macros
if I make a function 'is-conformed' within the same file as slider.cljs, it works fine
if I put it in a separate file, it doesn't work. I think i'm misunderstanding how macros are generated in clojurescript
sorry, I mean it doesn't matter if it's a macro or a function. I'll try a few more things, maybe i'm just brainfarting on something simple
so functions work, but the test doesn't show what's being tested. I want to use a macro so the body of the cljs.test/is macro is caught and displayed in the test output
However, when I use the macro listed up top, I get Use of undeclared Var fluch.devtests.slider/spec
which refers to the spec parameter in is-conformed
@grav js/process.env
Iโm sure PRs are welcome ๐
lots of libs could benefit from porting to cljc
I donโt know about environ specifically, but you could probably open an issue and start the conversation with the maintainer
there might be some sharp edges to watch out for the the maintainer can help you deflect
using figwheel and garden, is it possible to have them both running with the same command?
at the moment I call figwheel from cider
but then launch lein garden
separately
not the end of the world really but I guess there might be anotherway
also is there anything to see the test coverage of clojurescript code?
@bostonaholic good point
https://github.com/dbrenden/gracilius/blob/master/src/gracilius/core.clj here is an example
why to do or
dynamically on each call, when you know (env kw)
is a compile-time constant, you should do something like this IMO:
https://gist.github.com/darwin/e64eeae5f4b698f559fc722b6860f612