This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-09
Channels
- # aws (3)
- # beginners (61)
- # boot (1)
- # cider (80)
- # clara (5)
- # cljs-dev (5)
- # cljsrn (19)
- # clojure (40)
- # clojure-dev (29)
- # clojure-dusseldorf (2)
- # clojure-greece (21)
- # clojure-italy (16)
- # clojure-russia (7)
- # clojure-spec (31)
- # clojure-uk (70)
- # clojurescript (31)
- # cursive (21)
- # data-science (5)
- # emacs (7)
- # fulcro (23)
- # graphql (4)
- # java (18)
- # jobs (1)
- # jobs-discuss (25)
- # juxt (14)
- # nrepl (2)
- # off-topic (18)
- # om-next (2)
- # onyx (3)
- # re-frame (16)
- # reagent (50)
- # ring-swagger (5)
- # shadow-cljs (70)
- # specter (5)
- # sql (24)
- # tools-deps (16)
- # vim (41)
I’ve been using cljs.spec.alpha
a bit, and it seems that exceptions thrown from cljs.spec.test.alpha/instrument
never include file, line number or column number. Does anyone know why, and/or how to fix?
I use fdef
and instrument
, and when argument specs fail, I get exceptions with empty file name and line numbers, making it hard to locate the origin of the problem
@dnolen bhb/expound
works nicely, however I realize I have another issue... the Error
objects being thrown by spec are wrapping the actual error message
interestingly, this illustrates the <filename missing>
that I was asking about just a few hours ago 🙂
There is some cljs api to compile a clojure string to a javascript string?
(cljs/str-build {:src "(prn \"hello\")"}) ;; => {:output "console.log(\"hello\")"}
http://bensu.github.io/clojurescript-docs/cljs.closure-api.html#cljs.closure/js-transforms
after long hiatus I'm doing some more serious clojurescript and have problems setting up the tests to produce reasonable feedback so some newbie questions ahead. * right now I'm "discovering" that (is ...) seems to swallow exception stack trace by design. Am I missing something? I have big problem figuring out which of the assertions in the production code failed * none of the testing tools seems to have the full picture when it comes to reporting, so I'm running doo and devcards in parallel to have reasonable insight what's failing
@christian767 there was some rudimentary work to do what Clojure does but this probably needs more work, look at the source of instrument if you want to help out here
Does any one know how to perform a SOAP call from Clojure Script?
If I were running CLJS on a Node server, I’d probably use an npm package (https://www.npmjs.com/search?q=SOAP). That would mean learning how to integrate npm and CLJS, though, and I’ve managed to avoid that so far.
@manutter51 :npm-deps
should give you that, even if it's still in "testing" phase. In my case for instance I am using pg
, node Postgres bindings from Cljs
I'm trying to use add-watch
in an async test. it doesn't seem to be running correctly
(t/deftest test-with-watch
(t/async done
(let [state-atom (thing-that-returns-atom-and-eventually-changes)]
(add-watch state-atom
:query
(fn [_key _atom old-state new-state]
(println old-state)
(println new-state)
(remove-watch state-atom :query)
(t/is false)
(done) )))))
ah, I figured it out. the thing-that-returns-atom-and-eventually-changes
isn't returning the atom correctly. PEBKAC
second question: is there an easy/simple/tested pattern for creating cursors out of atoms?
e.g. I have (atom {:foo "bar"}) and I want to get an atom that will only watch the value of :foo for changes
I'm about to start making my own out of add-watch
but I'm afraid of messing up cleanup of the watches
Is there anything like this for reagent https://github.com/storybooks/storybook ?
Maybe https://github.com/bhauman/devcards is what you’re after?
@dnolen ah, so the answer to “missing filename” is simply that it isn’t implemented yet? I’ll have a look and see if I understand what’s going on 🙂
@christian767 rather our reporting probably needs to be made more robust, not simply filename
I am trying to consume the @google/maps
(https://www.npmjs.com/package/@google/maps) NPM module from cljs, but compilation is failing with Error: Can't resolve 'util' in 'node_modules/@google/maps/lib'
. I have tried both cljs 1.10.238 as well as cljs built from master. Has anyone been able to consume the @google/maps
module from cljs or have any pointers?
If possible, could you write a JIRA for this? See https://clojurescript.org/community/reporting-issues