Fork me on GitHub
#om
<
2017-06-14
>
gmercer10:06:11

@ssaul simply bump the version from 1.9.542 (as it is in the repo) to 1.9.562 the examples will compile - NB you must clear your caches in your browser

gmercer10:06:23

if someone here has commit rights they could bump this version and your pain would go away - can one of the committers do a fresh clone and run the hello example ??

ssaul13:06:04

That is why I wanted to know if anyone actually got the example (or any of the examples) to work.

ssaul13:06:53

Oh yeah, it compiled with warnings.

lein cljsbuild once hello
Compiling ClojureScript...
Compiling "examples/hello/main.js" from ["src" "examples/hello/src"]...
WARNING: Use of undeclared Var cljs.pprint/pprint at line 15 examples/hello/out/devcards/util/utils.cljs
WARNING: Use of undeclared Var cljs.pprint/with-pprint-dispatch at line 23 examples/hello/out/devcards/util/utils.cljs
WARNING: Use of undeclared Var cljs.pprint/code-dispatch at line 23 examples/hello/out/devcards/util/utils.cljs
WARNING: Wrong number of args (1) passed to UUID at line 564 examples/hello/out/cljs/reader.cljs
WARNING: Use of undeclared Var clojure.string/starts-with? at line 822 examples/hello/out/cljs/analyzer.cljc
WARNING: Use of undeclared Var clojure.string/ends-with? at line 972 examples/hello/out/cljs/analyzer.cljc
WARNING: Use of undeclared Var clojure.string/starts-with? at line 2643 examples/hello/out/cljs/analyzer.cljc
WARNING: Can't take value of macro cljs.core/require at line 15 examples/hello/out/cljs/nodejs.cljs
WARNING: require already refers to: cljs.core/require being replaced by: cljs.nodejs/require at line 15 examples/hello/out/cljs/nodejs.cljs
Successfully compiled "examples/hello/main.js" in 22.095 seconds.
Not sure if that matters to much but just putting it out there incase there is some solution issue tied to any of these warnings.

dnolen17:06:49

@anmonteiro still have issues with the README? Thinking about merging this in

anmonteiro17:06:27

@dnolen I’ll look into it in 5

gmercer20:06:25

@ssaul I got the same error it ended up being a cached version of devtools, hence the note about clearing the cache - I tried in four other browsers (where I rarely use clojurescript) and they worked, went back to chrome with a hard reload and Bob's your uncle

ssaul20:06:39

oh ok. I cleared my cache (at least I thought I did). Will try it again. Thanks you so much.

gmercer20:06:30

or different browser? time to try Brave browser (debugging is less fun as the inspector is not dockable, yet)

ssaul20:06:50

i tried it in another browser, (safari) and got the same error. I think I will blow away my local om repo, clear my cache, and restart my computer. At this point, I am pretty sure it has to be something I am doing wrong or something with my environment.

gmercer21:06:30

yeah - I tied absolutely fresh clone then bump version then compile

ag21:06:02

can someone help me with the correct quoting I need to include mutation key in the query, something like this:

(defui Comp
  static om/IQuery
  (query [_] ['foo/create!]))
why? because when I use :remote true in mutate method, it sends it to the server, there result of operation comes back in {:value result}, as novelty it gets stored in the state under 'foo/create! key. Now I need to read it. Can't figure out proper way to quote it

ag21:06:18

I can create intermediate key e.g. :create-result and do it in corresponding read method, but why can't I just grab it directly?

dnolen22:06:41

@ag because mutations can change anything they want

dnolen22:06:57

you can’t possibly know which keys are affected

dnolen22:06:36

I mean if you’re in total control of client/server sure - but in general you cannot

dnolen22:06:46

so we made the same tradeoff that Falcor/Relay did here

ag22:06:07

got it. I am now still returning result of remote mutation which as novelty gets attached to the state with the key .e.g: 'foo/create!, but I'm using a different key e.g: :foo/create-result and read method to read that