This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-17
Channels
- # admin-announcements (63)
- # beginners (1)
- # boot (83)
- # cider (17)
- # clojure (33)
- # clojure-android (3)
- # clojure-france (3)
- # clojure-gamedev (1)
- # clojure-russia (20)
- # clojure-sg (9)
- # clojurescript (81)
- # core-async (77)
- # cursive (13)
- # datomic (30)
- # hoplon (7)
- # instaparse (54)
- # ldnclj (1)
- # off-topic (4)
- # om (2)
- # onyx (23)
- # re-frame (16)
- # reagent (3)
- # yada (2)
@dottedmag last I knew modern-cljs was very outdated
it doesn't take long for anything related to cljs to get outdated, in spite of whatever name it is given... đ
@arohner you said you had an issue with lein 2.5.2 about a dependency not being found... I tracked a similar issue in juxt/joplin down to a change in arguments parsing in lein run
. Are you directly or indirectly using lein run?
Here's the issue in joplin: https://github.com/juxt/joplin/issues/68
And here's the commit in leiningen: https://github.com/technomancy/leiningen/commit/4bc49ec5bfd8676e21e497105d6d57b248263d41
@jonas: Planck now works properly for clojure.string
:
cljs.user=> (require '[clojure.string :as string])
nil
cljs.user=> (string/upper-case "foo")
âFOOâ
@dottedmag http://swannodette.github.io/, https://funcool.github.io/clojurescript-unraveled/, http://clojurescriptmadeeasy.com/
@dottedmag: as far as the language itself any clojure resource is valid, semantics are the same
pkillean: Thanks. I'm more interested in tooling and libraries than the language though: lein/boot/various REPLs/figwheel/testing libraries/whatever. I saw there is a bunch of "project templates", but what I'm looking for is actually a tutorial or a guide on various tools which covers enough to allow me to build the similar "template" myself, with a full understanding of what happens inside.
@dottedmag: Tenzing uses a lot of boot-* libraries, most having decent READMEs with instructions how to integrate them into your project
I have this defrecord: https://github.com/darwin/re-frame/blob/3d72b79c4a26ba9db33424ab14a568277714e26a/src/re_frame/frame.cljs#L35-L48 and when compiling after lein clean, the compiler reports: WARNING: Protocol IHash implemented multiple times at line 35 checkouts/re-frame/src/re_frame/frame.cljs WARNING: Protocol IPrintWithWriter implemented multiple times at line 35 checkouts/re-frame/src/re_frame/frame.cljs I donât understand why. Also IPrintWithWriter doesnât seem to have effect.
@darwin: You could try with extend-type
. It works with types defined with deftype, but I guess it also works with defrecord. An example (with deftype): https://github.com/andrewmcveigh/cljs.node.io/blob/aa216f93d65ac4e08b456e228cb5dbd723ab624e/src/cljs/js/url.cljs#L37-L40
looking into sources, extend-type has that warning built-in: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L1485
Anyone here got experience with OpenLayers in Clojurescript? I am trying to get the Cljsjs artifact (https://github.com/cljsjs/packages/tree/master/openlayers) to work, but it doesnât seem to include the code when loading the app in the browser.
@dottedmag: the figwheel quick start is pretty good I think https://github.com/bhauman/lein-figwheel/wiki/Quick-Start
@bhauman: This was fun, and not too hard: https://github.com/bhauman/devcards/pull/30
@meow: very easy to work on devcards eh? One of the advantages of creating an environment to make dev easier.
@bhauman: Well, I don't have much experience with macros, so I was a little slow on that part. And not being familiar with the code base slowed me down as well. But I'm getting there.
@meow: i really love how the devcards for source code display leave no doubt about what the code is and how it should be used.
so I see comments in the code suggesting a desire to eliminate defcard-doc
but things like these mkdn macros don't currently work in a regular defcard
but I didn't know if that's where you want to go or how big a job that would be so I considered that out-of-scope for now
to be clear, the real issue is the api for defcard
and whether it can be altered to support multiple chunks of docstrings.
@meow: the dispatch is very difficult, and would lead to lots of problems in the future. Better to keep defcard-doc
@bhauman: I hear ya. I do very much like how flexible you've made defcard
and how it eliminated so many of the other specialty cards.
Hi all, anyone know if thereâs some way to get lein-cljsbuild to return non-zero if it throws an error? Iâm seeing this behavior locally:
% lein with-profile +qa cljsbuild once min
Compiling ClojureScript.
Compiling "resources/public/js/compiled/app.js" from ["env/qa" "src/cljs" "src/cljc"]...
WARNING: run! already refers to: #'clojure.core/run! in namespace: reagent.ratom, being replaced by: #'reagent.ratom/run!
Aug 17, 2015 11:19:37 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: ERROR - Duplicate extern input: /Users/tim/kontor/goldfinger/externs/jquery-1.9.js
Aug 17, 2015 11:19:37 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: ERROR - Duplicate extern input: /Users/tim/kontor/goldfinger/externs/materialize.js
Aug 17, 2015 11:19:37 AM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 2 error(s), 0 warning(s)
ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: /Users/tim/kontor/goldfinger/externs/jquery-1.9.js at (unknown source) line (unknown line) : (unknown column)
ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: /Users/tim/kontor/goldfinger/externs/materialize.js at (unknown source) line (unknown line) : (unknown column)
Successfully compiled "resources/public/js/compiled/app.js" in 17.564 seconds.
% echo $?
0
Not sure why itâs reporting âsuccessfully compiledâ when there was an error
@timgilbert: I'm pretty sure that would require a commit. The idea here is that cljsbuild does autocompiling and doesn't normally stop if there is an error
(To be clear, I know what the error is from an have fixed it, but this build sailed right through our CircleCI)
@bhauman: even if I call it with once
? I just want it to compile one time and tell me if something failed
@timgilbert: I'm not looking at the code right now. But the behavior you are getting is the behavior that is there, I'm pretty sure you would have to change cljsbuild to catch this.
@timgilbert: you should look at the build script route i.e. quick start. It will give you all the control you need for a production build.
Do you mean boot or the like?
@timgilbert: you will probably have other requirements pop up for your production build as well and this will be helpful.
many people must have this problem already â i doubt theyâre all manually scripting the compiler â surely there are ways around this?
Manually scripting the compiler is no longer arduous and gives you the opportunity to do just what you want.
bhauman: agreed, but something as basic as compiler errors should fail the cljsbuild regardless
There is a warning in there, but there are two errors as well
WARNING: 2 error(s), 0 warning(s)
Very confusing! The fact that it says "Successfully compiledâ i think is the thing you want to change...
Yeah, I think thatâs just the loglevel the message was printed at (purely guessing though)
Possibly itâs just a bug in lein-cljsbuild for this specific error case of duplicate externs entries?
Ah, I think thatâs it, by just putting regular syntax error in a file Iâm able to provoke a non-zero exit code
Sorry for the noise everyone, will open a ticket with, I guess, lein-cljsbuild
look here: https://github.com/emezeske/lein-cljsbuild/blob/master/support/src/cljsbuild/compiler.clj#L69-L92
according to that code the cljs compiler isn't throwing an exception for this type of Error but rather is reporting it instead.
Yeah, looks like it
And this type of error is probably coming from Google closure and doesn't mean that anything is necessarily wrong with the build
is joel martin on slack?
Not difficult to see that is on vacation â letâs hope he isnât doing anything dangerous⌠https://github.com/clojure/clojurescript/commits/master