Clojurians
#hoplon
<
2015-12-24
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

laforge4903:12:01

Could use a bit of help here, :confused:

laforge4903:12:29

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?

laforge4903:12:44

Does the hoplon/notify package need to be notify.core?

laforge4903:12:13

I've checked and in my .m2/repository/hoplon/notify I see a 0.0.1-SNAPSHOT folder.

laforge4904:12:24

I changed the package names in notify to begin with notify to no avail.

laforge4904:12:05

The only change is in the error message, which references the revised package names:

laforge4904:12:08

No such namespace: notify.notification-rpc, could not locate notify/notification_rpc.cljs, notify/notification_rpc.cljc, or Closure namespace "notify.notification-rpc"

flyboarder04:12:14

@laforge49: is there a boot file we can loot at?

laforge4904:12:36

(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)))

laforge4904:12:19

Or did you want the build-boot for notify?

laforge4904:12:05

It is at least shorter:

laforge4904:12:07

(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"}})

flyboarder04:12:05

how are you building notify?

laforge4904:12:41

boot build-jar

flyboarder04:12:54

yeah you have a .hl file in there

laforge4904:12:14

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>

flyboarder04:12:49

you need (hoplon :manifest true) to include the .hl file in the build

laforge4904:12:13

in the boot.build, yes?

flyboarder04:12:26

in the notify build, then hoplon in the castra demo the hoplon task will pick up those files

laforge4904:12:52

In the env I assume.

flyboarder04:12:03

?? in the build pipeline

flyboarder04:12:43

haha faster than my example :stuck_out_tongue:

laforge4904:12:33

I did this and there was no change:

laforge4904:12:35

(comp (serve :port 8000 :handler 'simple-notifications.handler/app :reload true) (watch) (speak) (hoplon :manifest true) (reload) (cljs)))

flyboarder04:12:07

ah you added it to castra, it should be part of the notify boot.build

flyboarder04:12:04

so you would compile notify like so…

(hoplon :manifest true)
(build-jar)

laforge4904:12:05

no such place. here it is again (notify)

laforge4904:12:06

(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"}})

flyboarder04:12:30

right there currently isnt a build task in the notify build.boot file

flyboarder04:12:31

you’ll also want to change https://github.com/hoplon/notify/blob/master/build.boot#L15-L16 so that all the files are resources

laforge4904:12:10

no change after running both devs.

laforge4904:12:38

another change to build.boot?

flyboarder04:12:45

cljs files are only source in notify build.boot

flyboarder04:12:53

they wont be included in jar

laforge4904:12:23

so they need to be in resource paths, hmm?

flyboarder04:12:58

yes you intend on consuming the cljs from a different package with that config they are not included in target

laforge4904:12:46

:resource-paths #{"src/clj src/cljs"}

flyboarder04:12:13

:resource-paths #{"src/clj" "src/cljs”}

flyboarder04:12:11

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?

flyboarder04:12:35

in that case you can drop the hoplon task from dev

laforge4904:12:52

no idea. micha made it a .hl file.

flyboarder04:12:29

yeah there are cells and such so he probably did it so you dont have to require javelin and castra

laforge4904:12:30

I am also not seeing any compiling messages for hoplon or clojurescript

laforge4904:12:58

at least when doing dev on notify

flyboarder04:12:49

there wont be

flyboarder04:12:54

Writing Hoplon manifest...

flyboarder04:12:59

is what you should get

laforge4904:12:17

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>

laforge4904:12:05

obviously not getting it... on some level :simple_smile:

flyboarder04:12:41

are the rest of your changes synced to the hoplon demos repo?

laforge4905:12:27

yes it is there and everything is synced

laforge4905:12:36

I still need to write the readme... of course.

laforge4905:12:44

I had everything working before splitting it into 2 projects.

flyboarder05:12:06

no prob, gimme a few minutes with it

laforge4905:12:15

:simple_smile:

flyboarder05:12:02

there ya go :simple_smile:

laforge4905:12:14

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

laforge4905:12:52

still there?

flyboarder05:12:07

hmmm thats strange it builds for me

flyboarder05:12:36

are there other changes?

laforge4905:12:38

I'm on windows

laforge4905:12:45

anything in your profile?

laforge4905:12:27

(I'm just a stranger in a strange land.)

laforge4905:12:20

I am thinking tomorrow I could try to change the hl file back to cljs?

flyboarder05:12:38

have you added that?

laforge4905:12:52

Yeah, I wrote that

laforge4905:12:10

There was more, but then Micha fixed some things.

flyboarder05:12:31

yeah it’s building fine for me

flyboarder05:12:44

what is the actual line it fails on?

laforge4905:12:05

I'll call it a night then. is 12:30 am here. But time well spent. Thanks!

laforge4905:12:50

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

flyboarder05:12:45

@laforge49: that looks like a windows issue, the error is coming from boot pod, probably unrelated to the actual project

laforge4905:12:33

getting rid of the haplon might be easiest

flyboarder05:12:18

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

flyboarder05:12:48

buy you will need to require javelin and fix up the namespaces in that file

flyboarder05:12:45

cool let me know if I can be of assistance :simple_smile:

laforge4905:12:54

I'll get it working on the unified project first...https://github.com/laforge49/simple-notifications

laforge4905:12:39

Sure! Good night then. Was up at 5 working on this today. But its come a long way.

alandipert21:12:12

@flyboarder: got vinyl running, nice stuff!

flyboarder22:12:42

@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