This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-24
Channels
I've created a demo in hoplon/demos called castra-simple2. It depends on hoplon/notify 0.0.1-SNAPSHOT, which I have installed locally: [hoplon/notify "0.0.1-SNAPSHOT"] Now in the castra-simple2 folder I do a "boot dev" and get the following error: C:\Users\Bill\Documents\GitHub\demos\castra-simple2>boot dev Starting reload server on <ws://localhost:53405> Writing boot_reload.cljs... 2015-12-23 22:22:33.388:INFO::clojure-agent-send-off-pool-0: Logging initialized @7595ms 2015-12-23 22:22:35.630:INFO:oejs.Server:clojure-agent-send-off-pool-0: jetty-9.2.10.v20150310 2015-12-23 22:22:35.661:INFO:oejs.ServerConnector:clojure-agent-send-off-pool-0: Started ServerConnector@1ddae818{HTTP/1.1}{0.0.0.0:8000} 2015-12-23 22:22:35.666:INFO:oejs.Server:clojure-agent-send-off-pool-0: Started @9873ms Started Jetty on http://localhost:8000 Starting file watcher (CTRL-C to quit)... Compiling Hoplon pages... ò simple_notifications\index.cljs.hl Adding :require adzerk.boot-reload to index.html.cljs.edn... Compiling ClojureScript... ò index.html.js adzerk.boot_cljs.util.proxy$clojure.lang.ExceptionInfo$ff19274a: No such namespace: server-notifications.notification-rpc, could not locate server_notifications/notification_rpc.cljs, server_notifications/notification_rpc.cljc, or Closure namespace "server-notifications.notification-rpc" data: {:tag :cljs/analysis-error, :from :boot-cljs} clojure.core/ex-info core.clj: 4593 adzerk.boot-cljs.impl/handle-ex impl.clj: 60 adzerk.boot-cljs.impl/compile-cljs impl.clj: 97 ... clojure.core/apply core.clj: 630 boot.pod/eval-fn-call pod.clj: 223 boot.pod/call-in* pod.clj: 230 ... boot.pod/call-in* pod.clj: 233 adzerk.boot-cljs/compile boot_cljs.clj: 71 adzerk.boot-cljs/compile-1/fn boot_cljs.clj: 125 clojure.core/binding-conveyor-fn/fn core.clj: 1916 ... Elapsed time: 10.366 sec Any ideas?
The only change is in the error message, which references the revised package names:
No such namespace: notify.notification-rpc, could not locate notify/notification_rpc.cljs, notify/notification_rpc.cljc, or Closure namespace "notify.notification-rpc"
@laforge49: is there a boot file we can loot at?
(set-env! :dependencies '[[adzerk/boot-cljs "1.7.170-3"] [adzerk/boot-reload "0.4.2"] [compojure "1.4.0"] [hoplon/boot-hoplon "0.1.10"] [hoplon/castra "3.0.0-alpha3"] [hoplon/notify "0.0.1-SNAPSHOT"] [hoplon/hoplon "6.0.0-alpha11"] [org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.189"] [pandeiro/boot-http "0.7.0"] [ring "1.4.0"] [ring/ring-defaults "0.1.5"] [adzerk/cljs-console "0.1.1"]] :resource-paths #{"assets" "src/clj"} :source-paths #{"src/cljs" "src/hl"}) (require '[adzerk.boot-cljs :refer [cljs]] '[adzerk.boot-reload :refer [reload]] '[hoplon.boot-hoplon :refer [hoplon prerender]] '[pandeiro.boot-http :refer [serve]]) (deftask dev "castra-simple reworked to use notify." [] (comp (serve :port 8000 :handler 'simple-notifications.handler/app :reload true) (watch) (speak) (hoplon) (reload) (cljs))) (deftask prod "Build simple-notifications for production deployment." [] (comp (hoplon) (cljs :optimizations :advanced) (prerender))) (deftask make-war "Build a war for deployment" [] (comp (hoplon) (cljs :optimizations :advanced) (uber :as-jars true) (web :serve 'simple-notifications.handler/app) (war)))
(set-env! :dependencies '[[adzerk/bootlaces "0.1.13" :scope "test"] [adzerk/boot-cljs "1.7.170-3"] [adzerk/boot-reload "0.4.2"] [compojure "1.4.0"] [hoplon/boot-hoplon "0.1.10"] [hoplon/castra "3.0.0-alpha3"] [hoplon/hoplon "6.0.0-alpha11"] [org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.189"] [pandeiro/boot-http "0.7.0"] [ring "1.4.0"] [ring/ring-defaults "0.1.5"] [adzerk/cljs-console "0.1.1"]] :resource-paths #{"src/clj"} :source-paths #{"src/cljs"}) (require '[adzerk.boot-cljs :refer [cljs]] '[adzerk.boot-reload :refer [reload]] '[hoplon.boot-hoplon :refer [hoplon prerender]] '[pandeiro.boot-http :refer [serve]] '[adzerk.bootlaces :refer :all]) (def +version+ "0.0.1-SNAPSHOT") (bootlaces! +version+ :dont-modify-paths? true) (task-options! pom {:project 'hoplon/notify :version +version+ :description "Passes notifications via castra to a hoplon client. Uses polling." :url "https://github.com/hoplon/notify" :scm {:url "https://github.com/hoplon/notify"} :license {"EPL" "http://www.eclipse.org/legal/epl-v10.html"}})
how are you building notify
?
yeah you have a .hl
file in there
C:\Users\Bill\Documents\GitHub\notify>boot build-jar Writing pom.xml and pom.properties... Writing notify-0.0.1-SNAPSHOT.jar... Installing notify-0.0.1-SNAPSHOT.jar... Implicit target dir is deprecated, please use the target task instead. Set BOOT_EMIT_TARGET=no to disable implicit target dir. C:\Users\Bill\Documents\GitHub\notify>
you need (hoplon :manifest true)
to include the .hl file in the build
in the notify build, then hoplon in the castra demo the hoplon task will pick up those files
?? in the build pipeline
so like
haha faster than my example đ
(comp (serve :port 8000 :handler 'simple-notifications.handler/app :reload true) (watch) (speak) (hoplon :manifest true) (reload) (cljs)))
ah you added it to castra, it should be part of the notify boot.build
so you would compile notify like soâŚ
(hoplon :manifest true)
(build-jar)
(set-env! :dependencies '[[adzerk/bootlaces "0.1.13" :scope "test"] [adzerk/boot-cljs "1.7.170-3"] [adzerk/boot-reload "0.4.2"] [compojure "1.4.0"] [hoplon/boot-hoplon "0.1.10"] [hoplon/castra "3.0.0-alpha3"] [hoplon/hoplon "6.0.0-alpha11"] [org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.189"] [pandeiro/boot-http "0.7.0"] [ring "1.4.0"] [ring/ring-defaults "0.1.5"] [adzerk/cljs-console "0.1.1"]] :resource-paths #{"src/clj"} :source-paths #{"src/cljs"}) (require '[adzerk.boot-cljs :refer [cljs]] '[adzerk.boot-reload :refer [reload]] '[hoplon.boot-hoplon :refer [hoplon prerender]] '[pandeiro.boot-http :refer [serve]] '[adzerk.bootlaces :refer :all]) (def +version+ "0.0.1-SNAPSHOT") (bootlaces! +version+ :dont-modify-paths? true) (task-options! pom {:project 'hoplon/notify :version +version+ :description "Passes notifications via castra to a hoplon client. Uses polling." :url "https://github.com/hoplon/notify" :scm {:url "https://github.com/hoplon/notify"} :license {"EPL" "http://www.eclipse.org/legal/epl-v10.html"}})
right there currently isnt a build task in the notify build.boot file
one secâŚ.
youâll also want to change https://github.com/hoplon/notify/blob/master/build.boot#L15-L16 so that all the files are resources
cljs files are only source in notify build.boot
they wont be included in jar
yes you intend on consuming the cljs from a different package with that config they are not included in target
:resource-paths #{"src/clj" "src/cljsâ}
my question tho is if there is any actual hoplon code in the notification_rpc.cljs.hl
or can this just be a regular .cljs file?
in that case you can drop the hoplon task from dev
yeah there are cells and such so he probably did it so you dont have to require javelin and castra
there wont be
Writing Hoplon manifest...
is what you should get
C:\Users\Bill\Documents\GitHub\notify>boot dev Starting file watcher (CTRL-C to quit)... Writing pom.xml and pom.properties... Writing notify-0.0.1-SNAPSHOT.jar... Installing notify-0.0.1-SNAPSHOT.jar... Implicit target dir is deprecated, please use the target task instead. Set BOOT_EMIT_TARGET=no to disable implicit target dir. Elapsed time: 0.226 sec ^C C:\Users\Bill\Documents\GitHub\notify>
are the rest of your changes synced to the hoplon demos repo?
no prob, gimme a few minutes with it
there ya go
some problem now: C:\Users\Bill\Documents\GitHub\demos\castra-simple2>boot dev Starting reload server on <ws://localhost:54521> Writing boot_reload.cljs... Starting file watcher (CTRL-C to quit)... Extracting Hoplon dependencies... ò cljs\notify\notification_rpc.cljs.hl java.lang.IllegalArgumentException: No implementation of method: :make-input-stream of protocol: #'http://clojure.java.io/IOFactory found for class: nil
hmmm thats strange it builds for me
are there other changes?
have you added that?
yeah itâs building fine for me
what is the actual line it fails on?
Extracting Hoplon dependencies... ò cljs\notify\notification_rpc.cljs.hl java.lang.IllegalArgumentException: No implementation of method: :make-input-stream of protocol: #'http://clojure.java.io/IOFactory found for class: nil clojure.core/-cache-protocol-fn core_deftype.clj: 554 http://clojure.java.io/fn/G io.clj: 69 http://clojure.java.io/input-stream io.clj: 136 ... boot.pod/copy-resource pod.clj: 167 hoplon.boot-hoplon/extract-deps! boot_hoplon.clj: 98 hoplon.boot-hoplon/eval564/fn/fn boot_hoplon.clj: 111 ... clojure.core/deref core.clj: 2206 hoplon.boot-hoplon/eval564/fn/fn/fn boot_hoplon.clj: 115 boot.task.built-in/fn/fn/fn/fn/fn/fn built_in.clj: 264 boot.task.built-in/fn/fn/fn/fn/fn built_in.clj: 264 boot.task.built-in/fn/fn/fn/fn built_in.clj: 261 boot.core/run-tasks core.clj: 791 boot.core/boot/fn core.clj: 801 clojure.core/binding-conveyor-fn/fn core.clj: 1916
@laforge49: that looks like a windows issue, the error is coming from boot pod, probably unrelated to the actual project
if it works when the .hl file is just cljs then that might be the fastest solution, im also having issues with the hoplon task using manifest files in my other projects
buy you will need to require javelin and fix up the namespaces in that file
cool let me know if I can be of assistance
I'll get it working on the unified project first...https://github.com/laforge49/simple-notifications
@flyboarder: got vinyl running, nice stuff!
@alandipert: iâll have some more advanced examples after the new year, just finished creating a âwizardâ style component out of a paper-card element, very slick