Fork me on GitHub
#hoplon
<
2016-04-01
>
leontalbot01:04:34

or to move all other .hl files in a temp folder to hide them? (not sure at all) (sift :move {#"^(?!index).*\.hl$" "vpc-hoplon/archives"})

leontalbot01:04:46

(not sexy and maybe wrong...)

leontalbot01:04:02

yeah, it is broken, index page doesn't load...

leontalbot02:04:25

yeah this would work :

(sift :move {#"parcs\-beauport\.cljs\.hl|evenements\-vieux\-limoilou\.cljs\.hl|quartierouvert\.cljs\.hl" "src/vpc-hoplon/archives"})

leontalbot02:04:46

@alandipert: Maybe you have better suggestion... still thanks for the sift tip... seems to work simple_smile

onetom03:04:40

micha: is there any reason why Keywords are not converted into strings here?: https://github.com/hoplon/hoplon/blob/master/src/hoplon/core.cljs#L73-L75

alandipert13:04:42

@leontalbot: that looks good to me!

alandipert13:04:01

i know with some testing frameworks i've seen the idea is called "focus"

leontalbot13:04:37

@alandipert: Great! I now use a fn that converts a set of files to excluded into a regex pattern to pass to sift fn.

alandipert13:04:51

i have a minute to write up my idea though, let's see how it compares

alandipert13:04:01

oh that sounds cool too

alandipert13:04:04

programming ftw

leontalbot13:04:42

^^^ my temp solution

alandipert13:04:59

@leontalbot:

(require '[boot.core :as core])

(core/deftask focus
  "Only process a subset of the cljs.hl files on the fileset."
  [s subset PATH #{str} "Set of fileset-relative paths of cljs.hl files to exclude from the fileset."]
  (core/with-pre-wrap [fs]
    (if (seq subset)
      (->> (core/by-ext ["cljs.hl"] (core/input-files fs))
           (filter #(contains? subset (core/tmp-path %)))
           (core/rm fs)
           core/commit!)
      fs)))

;; example:
(comp (focus :subset #{"index2.cljs.hl"})
      (hoplon)
      (cljs))

leontalbot14:04:32

@alandipert: Seems great though when I test, every .hl files seems to be laoded/reloaded. reloading takes about 12 sec...

leontalbot14:04:43

I'll double check...

alandipert14:04:46

oh weird, yeah i put the hoplon task after and it still compiles them

alandipert14:04:00

i didn't see the file when i did show -f

leontalbot14:04:38

it seems to be still compiling everything

alandipert14:04:14

@micha: any idea why the above task wouldn't actually filter out cljs.hl files?

leontalbot14:04:58

(I tried with .cljs.hl(with a dot) still won't work...)

micha14:04:32

that should work, is rm maybe broken?

micha14:04:55

does sift not work there?

alandipert14:04:18

sift works, but i wanted to make a task to do it just out of by-ext and rm

alandipert14:04:39

like if you do boot focus -s foop.cljs.hl show -f foop.cljs.hl doesn't show up

micha14:04:45

i think maybe rm has a bug, can you try with 2.6.0-SNAPSHOT?

micha14:04:29

also maybe a show -f tactically deployed might show something

alandipert14:04:49

no dice w/ 2.6.0-SNAPSHOT

micha14:04:30

you're filtering foop.cljs.hl out

micha14:04:38

so it shouldn't show up, should it?

micha14:04:43

you're excluding it

alandipert14:04:25

oh sorry, yeah there's also bar.cljs.hl in there

alandipert14:04:27

i see them both

micha14:04:58

oh i see the issue

micha14:04:04

ok i get it now

micha14:04:11

commit! returns the new fileset

micha14:04:18

but you're throwing it away

micha14:04:29

so the fs you pass to the enxt task is actually corrupted

micha14:04:40

because it doesn't correspond to the filesystem

alandipert14:04:38

hm i dont understand, how am i throwing it away?

micha14:04:40

(core/deftask focus
  "Only process a subset of the cljs.hl files on the fileset."
  [s subset PATH #{str} "Set of fileset-relative paths of cljs.hl files to exclude from the fileset."]
  (core/with-pre-wrap [fs]
    (if (seq subset)
      (->> (core/by-ext ["cljs.hl"] (core/input-files fs))
           (filter #(contains? subset (core/tmp-path %)))
           (core/rm fs)
           core/commit!))))

micha14:04:57

i was confused

alandipert14:04:09

yeah it no do if subset empty

alandipert14:04:16

probably needless

micha14:04:17

yeah i missed the if there

alandipert14:04:37

(core/deftask focus
  "Only process a subset of the cljs.hl files on the fileset."
  [s subset PATH #{str} "Set of fileset-relative paths of cljs.hl files to exclude from the fileset."]
  (core/with-pre-wrap [fs]
    (->> (core/by-ext ["cljs.hl"] (core/input-files fs))
         (filter #(contains? subset (core/tmp-path %)))
         (core/rm fs)
         core/commit!)))
better version

micha14:04:51

perhaps the filter isn't returning anything?

micha14:04:09

trying to narrow down where the bug is

alandipert14:04:15

yeah - i will bust that out and see

micha14:04:47

i have a sinking feeling that it's rm though

alandipert14:04:07

discard that feel

alandipert14:04:14

the filter part is empty

alandipert14:04:45

my logic is f'd

alandipert14:04:52

filter is wrong there

alandipert14:04:08

i need to rm the ones not in the set

micha14:04:23

man off topic but i have to say i am stoked to do some hoplon stuff this weekend

raywillig15:04:13

@micha: aren’t we in #C08BDAPRA ?

micha15:04:11

@raywillig: i hope so...are we not?

raywillig15:04:18

haha yeah. i just meant how can talking about hoplon be off topic in #C08BDAPRA ?

micha15:04:34

oh hahahaha

micha15:04:44

brain weird today

raywillig20:04:31

@micha: is the right way to send multiple namespaces to wrap-castra in a vector?

micha20:04:13

yes, it's like the :require thing

micha20:04:28

you can have a vector of namespace symbols

micha20:04:34

or a vector of vectors with like

micha20:04:48

[[foo.bar :only [baz]] asdf.qwer]

micha20:04:03

that would add all of asdf.qwer and only foo.bar/baz

micha20:04:13

not the rest of foo.bar

raywillig20:04:43

does something [foo.bar baz biff bop] work? where baz biff and bop are ns that start with foo.bar?

micha20:04:16

well i dont think so

micha20:04:23

it's ben a while

raywillig20:04:34

it;s legit for require why i was asking

micha20:04:36

the source will show it

micha20:04:11

yeah ideally it would have the same syntax as require i think

raywillig20:04:25

not a big deal. it’s not like doing it everywhere like require