Fork me on GitHub
#boot
<
2017-09-03
>
Chris Bidler02:09:20

@donyorm when you say “inside the same repl” do you mean that you expect the file to be on disk after you run the task, or is your repl inside the task pod or something like that?

donyorm02:09:18

I opened a repl, ran (boot (garden :styles-var 'oss-world.style/main)) then (slurp "main.css"), but slurp could not find the files (boot garden said it ouputted to main.css)

Chris Bidler02:09:41

right, I see - you need (boot (comp (garden :styles-var 'oss-world.style/main) (target)))

Chris Bidler02:09:44

tasks receive, modify, and pass on an ephemeral fileset; target is the builtin task for “write the fileset you get to disk”

Chris Bidler02:09:54

I’ve been bitten by that more than once 🙂

donyorm02:09:07

do you have to do that when you're only accessing it from the repl?

donyorm02:09:23

I don't really want to save it yet, I just need it on the classpath for testing

donyorm02:09:35

I honestly thought this worked earlier, but I may have had some loose files

Chris Bidler02:09:27

hm - I’ll bet that it is possible to include a file in the repl fileset without committing it to disk but my boot-fu is not strong enough for such heroics, I’m afraid.

donyorm02:09:51

ok then I'll stick to writing it to the disk

richiardiandrea05:09:22

@donyorm try io/resource before slurp

donyorm05:09:14

That worked. For some bizarre reason I got into my head that I needed to class .getResource directly. Sorry about that slightly dumb mistake 🙂

qqq12:09:28

does boot-reload support firefox, or does it only work in chrome? boot-reload works fine in chrome for me the exact same code, when a 'reload' occurs in firefox, gives me the error:

Reload websocket connected.  boot_reload:57:30
Reloadboot_reload:66:30
/main.out/client/main.cljs.cache.edn  boot_reload:67:2
/main.out/client/main.js.map  boot_reload:67:2
/main.out/adzerk/boot_reload.js.map  boot_reload:67:2
/main.out/boot/cljs/main1218.js.map  boot_reload:67:2
/main.out/client/main.cljs  boot_reload:67:2
/main.out/client/main.js  boot_reload:67:2
/main.out/adzerk/boot_reload.js  boot_reload:67:2
/main.out/boot/cljs/main1218.js  boot_reload:67:2
TypeError: goog.net.jsloader.loadMany is not a function[Learn More]  boot_reload:47:4
	adzerk$boot_reload$reload$reload_js boot_reload:47:4
	adzerk$boot_reload$reload$reload boot_reload:86:4
	<anonymous> boot_reload:39:3
	G__12138__3 core.cljs:10539:7
	G__12138 
	adzerk.boot_reload.client.connect.cljs$core$IFn$_invoke$arity$2/< boot_reload:62:26
	goog.events.EventTarget.prototype.fireListeners 
	goog.events.EventTarget.dispatchEventInternal_ 
	goog.events.EventTarget.prototype.dispatchEvent 
	goog.net.WebSocket.prototype.onMessage_ 
	<anonymous>
I'm now trying to figure out if I'm using boot-reload incorrectly or if it only supports chrome.

juhoteperi15:09:22

missing loadMany sounds like problem with old boot-reload and new clojurescript (which uses new closure-lib which removed that fn)

juhoteperi15:09:44

could be cache issue (boot-reload or closure file cached) if it is working on one browser but not in other

qqq15:09:42

@U061V0GG2 : lol, this is twice you've helped me; last time, I updated cljs (but didn't change boot-reload); I've just uploaded boot-reload now, and everything works

qqq15:09:13

from now on, anytime anything breaks, I'm updating everything to latest first

juhoteperi15:09:51

It is a bit unfortunate boot cljs tooling has a had a few of these problems lately, which have caused the tools to break after updating cljs

juhoteperi15:09:03

but I can't go back and fix the bad assumptions I have made, so I just release fixes and try to note the fixes on changelogs 🙂

qqq15:09:23

in case my comments came off as snarky -- your bug fixes are much appreciated 🙂 // in fact, as I ponder on this issue, it's very hard to write helpful error msgs -- because, by definition, these breaks happens because "future cljs" breaks an assumption "current boot-reload" is using

qqq15:09:15

actually, one hypothetical (probably other bad side effects) thing to do would be: 1. every version of boot-x has a corresponding cljs-y version tagged 2. then on exception, if cljs version > y, it prints "this boot-x was intended for cljs-y, you're using cljs-y+1" along with the original msg

dominicm13:09:11

@qqq it works in firefox

qqq15:09:37

@dominicm : thanks for confirming; I must be doing something really weird to have it work in chrome but error in firefox