ANN: Om 0.8.2

458 views
Skip to first unread message

David Nolen

unread,
Jan 24, 2015, 11:39:56 AM1/24/15
to clojure, clojur...@googlegroups.com
The dependency information has changed:

[org.omcljs/om "0.8.2"]

The release depends on ClojureScript 0.0-2719 as it leverages the new foreign dependency functionality to simplify development and production builds.

Feedback welcome!


David

Makoto H.

unread,
Jan 25, 2015, 2:49:02 AM1/25/15
to clojur...@googlegroups.com, clo...@googlegroups.com
I am update om to 0.8.2, then:require causes an error.

(ns om-app.hello
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
)
)

clojure.lang.ExceptionInfo: No such namespace: com.facebook.React at line 1 file:/maven/.m2/repository/org/omcljs/om/0.8.2/om-0.8.2.jar!/om/dom.cljs {:tag :cljs/analysis-error, :file "file:/maven/.m2/repository/org/omcljs/om/0.8.2/om-0.8.2.jar!/om/dom.cljs", :line 1, :column 1}

I declared cljs and om libs in project.clj as follows:

[org.clojure/clojurescript "0.0-2727" :scope "provided"]
[org.omcljs/om "0.8.2"]
;;[org.om/om "0.8.1"]

The om 0.8.1 works fine.
Is there any suggestion ?

Makoto

Elliot Block

unread,
Jan 25, 2015, 3:18:16 AM1/25/15
to clojur...@googlegroups.com, clo...@googlegroups.com
On Saturday, January 24, 2015 at 8:39:56 AM UTC-8, David Nolen wrote:
> The release depends on ClojureScript 0.0-2719 as it leverages the new foreign dependency functionality to simplify development and production builds.

This is super super awesome. One observation for people trying this, if you strip out your old preamble/script tags/externs, Om will be okay but other libraries are probably also depending upon them, e.g. Sablono 0.2.22 is not compatible with this out of the box, though it looks like a trivial change to get it working. I expect similar issues are present with other libraries.

David Nolen

unread,
Jan 25, 2015, 9:27:33 AM1/25/15
to clojur...@googlegroups.com

On Sun, Jan 25, 2015 at 2:49 AM, Makoto H. <tokoma...@gmail.com> wrote:
[org.clojure/clojurescript "0.0-2727" :scope "provided"]

You need to drop :scope "provided". Sounds like you're probably not getting the version of the compiler you need.

David

Makoto H.

unread,
Jan 25, 2015, 9:24:08 PM1/25/15
to clojur...@googlegroups.com
I've removed :scope "provided". However I still face the same problem.
I put project.clj and cljs code on my gist.

- project.clj
https://gist.github.com/tokomakoma123/52db9120cfe6b64fca68
- hello.cljs
https://gist.github.com/tokomakoma123/4425ce8be0e24a97511c

Is something wrong in my project.clj ?

Thanks,
Makoto

tal giat

unread,
Jan 26, 2015, 3:18:35 AM1/26/15
to clojur...@googlegroups.com, clo...@googlegroups.com
Seems that the externs packages with react are not including the addons, how do one use those?

Antonin Hildebrand

unread,
Jan 26, 2015, 9:02:33 AM1/26/15
to clojur...@googlegroups.com
Hi Makoto,

> Is something wrong in my project.clj ?
Try to remove cemerick.piggieback/wrap-cljs-repl. I started to experience the same problem when launching 'lein repl' (since I integrated weasel+piggieback).

my $0.02
Antonin

Makoto H.

unread,
Jan 26, 2015, 6:14:01 PM1/26/15
to clojur...@googlegroups.com
He Antoni,
The situation was the same after remove cemerick.piggieback/wrap-cljs-repl.
I did another test.

I checked differences between om 0.8.1 and 0.8.2.

In the 0.8.2 ns for om.core and om.dom as follows:

(ns om.core
(:require com.facebook.React
[om.dom :as dom :include-macros true]
[goog.dom :as gdom])
(:import [goog.ui IdGenerator]))

(ns om.dom
(:refer-clojure :exclude [map meta time])
(:require-macros [om.dom :as dom])
(:require com.facebook.React
[goog.object :as gobject]))

In the 0.8.1 they are as follows:

(ns om.core
(:require [om.dom :as dom :include-macros true]
[goog.dom :as gdom])
(:import [goog.ui IdGenerator]))

(ns om.dom
(:refer-clojure :exclude [map meta time])
(:require-macros [om.dom :as dom])
(:require [goog.object :as gobject]))

I commented out "com.facebook.React" and run, there was no exception and it seemed working. I'm not sure this is a right solution. Otherwise, my environment may have a problem...

Thanks,
Makoto

David Nolen

unread,
Jan 26, 2015, 6:45:17 PM1/26/15
to clojur...@googlegroups.com
The latest released version of Om is 0.8.4 did you try this one?

David


Thanks,
Makoto

--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Makoto H.

unread,
Jan 26, 2015, 11:16:52 PM1/26/15
to clojur...@googlegroups.com
Hi,

I tried the 0.8.6 but I faced another error.

ExceptionInfo No such namespace: cljsjs.react at line 1 file:/userdata/appdata/maven/.m2/repository/org/omcljs/om/0.8.6/om-0.8.6.jar!/om/dom.cljs clojure.core/ex-info (core.clj:4403)

I am trying to find the cause but I was not able to do it.

Antonin Hildebrand

unread,
Jan 27, 2015, 7:12:19 AM1/27/15
to clojur...@googlegroups.com
> ExceptionInfo No such namespace: cljsjs.react
I have the same issue with 0.8.6 and I can confirm removing piggieback does not solve the problem.

I'm new to Clojure/ClojureScript. But my guess is that this problem arises when om is required by some code running in "clj" context. My app compiles and runs fine. But not when I try to enter 'lein repl'. REPL starts in "clj" mode, I enter some piggieback commands and it tries to bootstrap cljs contex and establish a browser connection. I think the problem is in that boostrap phase, when om gets somehow included in clj context and tries to require cljsjs.react which is not on classpath. There is no jar for that.

Unfortunately I was unable to dig deeper. Still don't know how get more verbose information about the situation.

Antonin

Antonin Hildebrand

unread,
Jan 27, 2015, 7:17:21 AM1/27/15
to clojur...@googlegroups.com
I have just double-checked my local maven repo:

https://gist.github.com/darwin/523ee0a1bc6e512fa27d

cljsjs.react is not present

David Nolen

unread,
Jan 27, 2015, 8:18:42 AM1/27/15
to clojur...@googlegroups.com
This isn't very useful without seeing the contents your project.clj or the output of `lein deps :tree`.

This goes for everyone having trouble on this thread.

David

Makoto H.

unread,
Jan 27, 2015, 8:37:24 AM1/27/15
to clojur...@googlegroups.com
I put an output of 'lein deps :tree'.

https://gist.github.com/tokomakoma123/63ea11a4d4a344750e34

David Nolen:

Antonin Hildebrand

unread,
Jan 27, 2015, 8:40:32 AM1/27/15
to clojur...@googlegroups.com
Weasel calling cljs.repl/analyze-source is throwing in my case. I didn't solve the cause, but I hacked a way around the problem in my local version of weasel:
https://github.com/darwin/weasel/commit/c2b5b963bcf10a7c341a4cbc8f21121d3adef6b0

I have updated the gist with more info:
https://gist.github.com/darwin/523ee0a1bc6e512fa27d

I cannot reason about these issues. But with Om 0.8.1 it worked for me.

btw. full project is available here:
https://github.com/darwin/flense-nw/tree/weasel-repl

I don't expect more help here because this is probably an issue on Weasel side:
https://github.com/tomjakubowski/weasel/issues/41 (and others)

Thanks for you patience.

David Nolen

unread,
Jan 27, 2015, 8:50:12 AM1/27/15
to clojur...@googlegroups.com
Ah ok, yes I suspect Weasel will need updating for ClojureScript 0.0-2727 and is likely the source of the issues on this thread.

I highly recommend learning how to use the built-in ClojureScript REPLs directly in order more quickly isolate REPL related issues.

David

David Nolen

unread,
Jan 27, 2015, 8:54:09 AM1/27/15
to clojur...@googlegroups.com
Instructions on running the built-in ClojureScript REPLs is covered here https://github.com/clojure/clojurescript/wiki/Running-REPLs.
Reply all
Reply to author
Forward
0 new messages