Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add live demo with re-frame-10x #180

Merged
merged 1 commit into from
Apr 5, 2018
Merged

Conversation

jacekschae
Copy link
Contributor

Recently I added this and was wondering if that would be a good addition here.

Recently I added this and was wondering if that would be a good addition here.
@mike-thompson-day8
Copy link
Contributor

mike-thompson-day8 commented Mar 24, 2018

Love the idea, but is there any chance you could upgrade to the latest version of re-frame-10x so it is more current? And perhaps use the new fn-trace feature, so we see the event handlers, that's our new big feature.
https://github.com/Day8/re-frame-10x/blob/master/docs/HyperlinkedInformation/EventCodeTracing.md

@mike-thompson-day8
Copy link
Contributor

mike-thompson-day8 commented Apr 2, 2018

@jacekschae we are about to do another release, so that application is soon to be two releases out of date. So it won't be a good example to point to.

I'm going to close this for now. But if you get a chance to upgrade to the latest, and hopefully use the new code tracing fn-traced stuff, then we'd be very happy to use your app as an example.

@jacekschae
Copy link
Contributor Author

@mike-thompson-day8 i tried to update but it wasn't as easy as just bump the version. I was trying few other things but it never worked. I'm using shadow-cljs and I believe there is something with cljsjs not working? Will reach out to @thheller to see if there is anything we can do about this.

Will do another PR when we get this settled, thanks.

yarn run v1.5.1
$ shadow-cljs watch app;
shadow-cljs - config: /Users/jacek/Projects/conduit-re-frame-10x/shadow-cljs.edn version: 2.2.20
shadow-cljs - starting ...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/Users/jacek/.m2/repository/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.KQueueSelectorProvider()
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[2018-04-03 06:30:01 - WARNING] failed to inspect resource "jar:file:/Users/jacek/.m2/repository/zprint/zprint/0.4.7/zprint-0.4.7.jar!/zprint/main.cljc", it will not be available.
clojure.lang.ExceptionInfo: failed to inspect cljs file: jar:file:/Users/jacek/.m2/repository/zprint/zprint/0.4.7/zprint-0.4.7.jar!/zprint/main.cljc {:tag :shadow.build.classpath/inspect-cljs, :resource-name "zprint/main.cljc", :url #object[java.net.URL 0x70913c85 "jar:file:/Users/jacek/.m2/repository/zprint/zprint/0.4.7/zprint-0.4.7.jar!/zprint/main.cljc"]}
	at clojure.core$ex_info.invokeStatic(core.clj:4739)
	at clojure.core$ex_info.invoke(core.clj:4739)
	at shadow.build.classpath$inspect_cljs$fn__12343.invoke(classpath.clj:170)
	at shadow.build.classpath$inspect_cljs.invokeStatic(classpath.clj:161)
	at shadow.build.classpath$inspect_cljs.invoke(classpath.clj:156)
	at shadow.build.classpath$inspect_resource.invokeStatic(classpath.clj:206)
	at shadow.build.classpath$inspect_resource.invoke(classpath.clj:198)
	at shadow.build.classpath$inspect_resources$fn__12390.invoke(classpath.clj:417)
	at clojure.core$map$fn__5587.invoke(core.clj:2745)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:528)
	at clojure.core$seq__5124.invokeStatic(core.clj:137)
	at clojure.core$filter$fn__5614.invoke(core.clj:2801)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:528)
	at clojure.core$seq__5124.invokeStatic(core.clj:137)
	at clojure.core$map$fn__5587.invoke(core.clj:2738)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:528)
	at clojure.core$seq__5124.invokeStatic(core.clj:137)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
	at clojure.core.protocols$fn__7835.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__7835.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__7781$G__7776__7794.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6748)
	at clojure.core$into.invokeStatic(core.clj:6815)
	at clojure.core$into.invoke(core.clj:6807)
	at shadow.build.classpath$inspect_resources.invokeStatic(classpath.clj:426)
	at shadow.build.classpath$inspect_resources.invoke(classpath.clj:412)
	at shadow.build.classpath$process_root_contents.invokeStatic(classpath.clj:434)
	at shadow.build.classpath$process_root_contents.invoke(classpath.clj:429)
	at shadow.build.classpath$find_jar_resources.invokeStatic(classpath.clj:455)
	at shadow.build.classpath$find_jar_resources.invoke(classpath.clj:436)
	at shadow.build.classpath$find_resources.invokeStatic(classpath.clj:498)
	at shadow.build.classpath$find_resources.invoke(classpath.clj:496)
	at shadow.build.classpath$index_path_STAR_.invokeStatic(classpath.clj:692)
	at shadow.build.classpath$index_path_STAR_.invoke(classpath.clj:689)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:341)
	at clojure.core$reduce.invokeStatic(core.clj:6747)
	at clojure.core$reduce.invoke(core.clj:6730)
	at shadow.build.classpath$index_classpath$fn__12509$fn__12510.invoke(classpath.clj:807)
	at clojure.lang.Atom.swap(Atom.java:37)
	at clojure.core$swap_BANG_.invokeStatic(core.clj:2344)
	at clojure.core$swap_BANG_.invoke(core.clj:2337)
	at shadow.build.classpath$index_classpath$fn__12509.invoke(classpath.clj:807)
	at shadow.build.classpath$index_classpath.invokeStatic(classpath.clj:806)
	at shadow.build.classpath$index_classpath.invoke(classpath.clj:801)
	at shadow.build.classpath$index_classpath.invokeStatic(classpath.clj:803)
	at shadow.build.classpath$index_classpath.invoke(classpath.clj:801)
	at shadow.cljs.devtools.server.common$fn__18244.invokeStatic(common.clj:103)
	at shadow.cljs.devtools.server.common$fn__18244.invoke(common.clj:101)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.core$apply.invoke(core.clj:652)
	at shadow.runtime.services$start_one.invokeStatic(services.clj:98)
	at shadow.runtime.services$start_one.invoke(services.clj:87)
	at shadow.runtime.services$start_many$fn__9622.invoke(services.clj:127)
	at shadow.runtime.services$start_many.invokeStatic(services.clj:126)
	at shadow.runtime.services$start_many.invoke(services.clj:105)
	at shadow.runtime.services$start_all.invokeStatic(services.clj:144)
	at shadow.runtime.services$start_all.invoke(services.clj:139)
	at shadow.cljs.devtools.server$start_system.invokeStatic(server.clj:242)
	at shadow.cljs.devtools.server$start_system.invoke(server.clj:159)
	at shadow.cljs.devtools.server$start_BANG_.invokeStatic(server.clj:290)
	at shadow.cljs.devtools.server$start_BANG_.invoke(server.clj:280)
	at shadow.cljs.devtools.server$start_BANG_.invokeStatic(server.clj:283)
	at shadow.cljs.devtools.server$start_BANG_.invoke(server.clj:280)
	at shadow.cljs.devtools.server$from_cli.invokeStatic(server.clj:406)
	at shadow.cljs.devtools.server$from_cli.invoke(server.clj:382)
	at shadow.cljs.devtools.cli$blocking_action.invokeStatic(cli.clj:143)
	at shadow.cljs.devtools.cli$blocking_action.invoke(cli.clj:130)
	at shadow.cljs.devtools.cli$main.invokeStatic(cli.clj:191)
	at shadow.cljs.devtools.cli$main.doInvoke(cli.clj:146)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:661)
	at clojure.core$apply.invoke(core.clj:652)
	at shadow.cljs.devtools.cli$_main.invokeStatic(cli.clj:233)
	at shadow.cljs.devtools.cli$_main.doInvoke(cli.clj:231)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.main$main_opt.invokeStatic(main.clj:317)
	at clojure.main$main_opt.invoke(main.clj:313)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: failed to parse ns form {:clojure.spec.alpha/problems ({:path [:clauses :refer-clojure :clause], :pred #{:refer-clojure}, :val :gen-class, :via [:shadow.build.ns-form/ns-form :shadow.build.ns-form/ns-refer-clojure :shadow.build.ns-form/ns-refer-clojure], :in [3 0]} {:path [:clauses :require :clause], :pred #{:require :require-macros}, :val :gen-class, :via [:shadow.build.ns-form/ns-form :shadow.build.ns-form/ns-require :shadow.build.ns-form/ns-require], :in [3 0]} {:path [:clauses :import :clause], :pred #{:import-macros :import}, :val :gen-class, :via [:shadow.build.ns-form/ns-form :shadow.build.ns-form/ns-import :shadow.build.ns-form/ns-import], :in [3 0]} {:path [:clauses :use-macros :clause], :pred #{:use-macros}, :val :gen-class, :via [:shadow.build.ns-form/ns-form :shadow.build.ns-form/ns-use-macros :shadow.build.ns-form/ns-use-macros], :in [3 0]} {:path [:clauses :use :clause], :pred #{:use}, :val :gen-class, :via [:shadow.build.ns-form/ns-form :shadow.build.ns-form/ns-use :shadow.build.ns-form/ns-use], :in [3 0]}), :clojure.spec.alpha/spec :shadow.build.ns-form/ns-form, :clojure.spec.alpha/value (ns zprint.main (:require [zprint.core :refer [zprint-str czprint zprint-file-str set-options!]]) (:gen-class)), :tag :shadow.build.ns-form/invalid-ns, :input (ns zprint.main (:require [zprint.core :refer [zprint-str czprint zprint-file-str set-options!]]) (:gen-class))}
	at clojure.core$ex_info.invokeStatic(core.clj:4739)
	at clojure.core$ex_info.invoke(core.clj:4739)
	at shadow.build.ns_form$parse.invokeStatic(ns_form.clj:452)
	at shadow.build.ns_form$parse.invoke(ns_form.clj:444)
	at shadow.build.ns_form$parse.invokeStatic(ns_form.clj:446)
	at shadow.build.ns_form$parse.invoke(ns_form.clj:444)
	at shadow.build.cljs_bridge$get_resource_info.invokeStatic(cljs_bridge.clj:40)
	at shadow.build.cljs_bridge$get_resource_info.invoke(cljs_bridge.clj:25)
	at shadow.build.classpath$inspect_cljs$fn__12343.invoke(classpath.clj:162)
	... 89 more

shadow-cljs - HTTP server for :app available at http://localhost:3000
shadow-cljs - server running at http://0.0.0.0:9630
shadow-cljs - socket repl running at localhost:52086
shadow-cljs - nREPL server started on port 3333
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build failure:
The required namespace "cljsjs.react-highlight" is not available, it was required by "day8/re_frame_10x/view/components.cljs".

@thheller
Copy link
Contributor

thheller commented Apr 3, 2018

This is purely shadow-cljs. It does not support cljsjs and requires shim namespaces for compatibility so npm packages can get used directly without changing the re-frame-10x code. They were added already but I didn't push a new release yet. Will do that in a few min.

thheller/shadow-cljsjs@6907943

@danielcompton
Copy link
Contributor

@thheller are you able to publish the new release at some point? It looked like it hadn’t been updated, but maybe I wasn’t looking at the right spot.

@thheller
Copy link
Contributor

thheller commented Apr 4, 2018

I release the fixed version yesterday after posting here. It should work since 2.2.22.

I just ran the conduit demo and just had to bump re-frame-10x to [day8.re-frame/re-frame-10x "0.3.0-2-react16"] + yarn add highlight.js react-highlight.js.

Don't know how you feel about adding the npm deps to :npm-deps in a deps.cljs for re-frame-10x so they don't have to be added manually. I believe however this messes with standard CLJS when still using CLJSJS.

@danielcompton
Copy link
Contributor

@thheller thanks, I was looking in the wrong place :) We're just about to put out another release of re-frame-10x so I'll leave adding the :npm-deps stuff for this release and add notes for shadow-cljs users, and circle back to investigate it more afterwards. Thanks heaps for your help here (and @jacekschae!), it's much appreciated.

@jacekschae
Copy link
Contributor Author

Thanks @thheller and @danielcompton

I just bumped re-frame-10x to 0.3.1

The demo with 10-x is running here: https://jacekschae.github.io/conduit-re-frame-10x-demo/

The code is here: https://github.com/jacekschae/conduit-re-frame-10x-demo/tree/master

@danielcompton danielcompton reopened this Apr 5, 2018
@danielcompton danielcompton merged commit 4ade29c into day8:master Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants