Fork me on GitHub
#boot
<
2017-01-26
>
qqq00:01:21

@richiardiandrea : yes, I'm using require-amcros

qqq00:01:27

require-macros

qqq00:01:41

let me see if I can get a min failure case, I have this weird setup where my org file generates everything, so it's ahrd to share atm

richiardiandrea00:01:58

uhm, yeah, even an error message might be helpful

qqq00:01:02

basically, I could share my org file, but people can't run it without my .emacs.d/init.el

qqq00:01:31

if I can get a live streaming in 15 minutes, would you still bea round?

qqq00:01:38

might be best if I just screen sahred to http://livecoding.tv

richiardiandrea00:01:38

uhm, I might be done for the day soon...what is the error you get?

qqq00:01:59

"wrong number of args (0) passsed to g.m/compile-time-read-file at line 39"

richiardiandrea00:01:17

woah...odd very odd

qqq00:01:24

however, the macro is defined as:

(defmacro compile-time-read-file [& rst]
  "Hello World")

qqq00:01:42

yeah, I not be getting a "wrong number of args" error on that 🙂

richiardiandrea00:01:32

I assume you call the macro like (compile-time-read-file) ?

qqq00:01:10

I call the macro as

(ns ... (:require-macros [g.m]))
[:pre (g.m/compile-time-read-file)]

qqq00:01:23

don't worry about this

qqq00:01:30

this is impossible to debug without me screencasting or sharing the code

qqq00:01:41

take your well deserved break 🙂

richiardiandrea00:01:50

oh ok, so that syntax is odd to me

qqq00:01:02

it's hiccup, I'm generating a pre html element

qqq00:01:06

which should say "Hello World"

richiardiandrea00:01:24

ah ok, now it makes sense 😄

qqq00:01:25

ah, I got it working

qqq00:01:01

back when I was using lein, I was able to get a single *.cljc file to comiple twice: to define the amcro in the clj compilation then to use it via (:require-macros [name-of-self-namesapce]) to use the amcros in cljs apparently this doesn't work with whatever boot setup I have right now

richiardiandrea00:01:55

macros in .cljc files should go in :clj clauses iirc

qqq00:01:24

tried that, doesn't fix it

qqq00:01:28

different files somehow fixes it

richiardiandrea00:01:48

different namespace?

qqq00:01:16

yeah, different namespaces = works same namesapce = does not work, despite http://dev.clojure.org/jira/browse/CLJS-1782

qqq00:01:40

oh well, not big deal, back to hacking

qqq00:01:42

thanks for your time

qqq01:01:40

how can I specify a function to be called wevery time a cljs reload happens ?

qqq01:01:53

is this basically reload/:on-jsload ?

martinklepsch04:01:52

@ag tmux and the lack of reattach-to-user-namespace also often cause issues with programmatic notifications

qqq10:01:10

when boot reloads my cljs code, what cljs/js reload function is called?

qqq10:01:20

i.e. whenever a code reload happens, I want a certain function to be called

qqq10:01:23

how do I register that function ?

martinklepsch11:01:21

@qqq boot reload —help should show a on-jsload option or similar. That’s what you’re looking for I think

martinklepsch11:01:56

@tbrooke The Boot+Netlify user I thought of the other day is @grounded_sage

grounded_sage11:01:52

@tbrooke last I checked my builds still weren't working on Netlify. It's either the boot version was older than I was running or they haven't quite figured it out yet.

grounded_sage11:01:56

I made a serious push for boot to be made a priority. Even though they say that they don't normally make it a priority to get have languages/build tool set up until at least a couple of people ask for it.

grounded_sage11:01:33

Personally hasn't been a priority for me to have automatic builds yet as I have been working on some more critical pieces to my own code. So I haven't pushed for it for a while.

tbrooke13:01:48

@grounded_sage I’ll ask them too - I know most folks use S3 but Netlify is fast, cheap, free wth the banner, and provides a lot of convenience get it set and you could could crank out Perun or even Hoplon sites in no time

martinklepsch13:01:53

@tbrooke S3/Cloudfront is also cheap, if you don’t need any of netlify’s advanced features like prerendering etc. confetti may also be interesting to you https://github.com/confetti-clj/confetti

martinklepsch13:01:23

It basically helps putting together the AWS puzzle pieces for static sites

vinnyataide14:01:49

Hello! Can I run boot-environ with .lein-env to get easily keys in the :keys map in my repo map?

vinnyataide14:01:43

If not, how can I use the env function of boot-environ inside the :repositories map?

vinnyataide14:01:54

I'm trying to get my datomic credentials inside my datomic repo with boot-environ

grounded_sage14:01:55

@tbrooke: yea S3 is great though I'm interested in SPA development. So handling auto deployments and feature branches are big wins for me. I'm also convinced they are on the money with a lot of decisions they make to be a worthwhile investment.

vinnyataide16:01:51

how can I get vals from .boot-env with the environ task? in the docs it's only showing how to set

vinnyataide16:01:14

but I want to keep my db creds in another file outside build.boot

geoffs17:01:48

@vinnyataide: shameless self-promotion, but I wrote a blog on using datomic pro with boot. It doesn't use environ, but it does use environment variables and (I think) has a reasonable discussion of what you need to do to get things working and why seemingly obvious things won't necessarily work

vinnyataide17:01:23

jesus then we're back again with why sequence of operations matters, I was trying to pull datomic before adding the repository, shame! your blog pointed that out, now I think I can work with environ

vinnyataide19:01:54

just made datomic creds work with environ in a .boot-env file 😄 made a little adjustment in @geoffs files and good to go, but now I have 3 set-env!'s, is that normal?

vinnyataide19:01:45

and 2 requires, one after my system is loaded and one before to load env

vinnyataide19:01:13

so I can get my env function before getting the http://datomic.pro dep

geoffs19:01:40

Normal? probably not 🙂 but if it's what you need to do to make it work ¯\(ツ)

geoffs19:01:56

One thing that I would be cognizant of though is that having multiple set-env!s with dependencies in them can cause Aether's transitive dependency resolution algorithm to fail in strange ways because you're not giving it the full set of dependencies to resolve at any one time.

geoffs19:01:30

I don't personally have much experience, but just thinking about it, I would try and make sure that your main app dependencies are all in the same (probably final?) set-env! and put boot task related things together before that.

geoffs19:01:38

@vinnyataide ^^

vinnyataide19:01:44

@geoffs ohhhh that seems more like it, two concerns of course, one for my deps conf and other for my system itself... gonna refactor that

vinnyataide19:01:32

@geoffs one concern though is that one set-env! is for setting the datomic repository and the other is to get datomic itself

geoffs19:01:04

hmm, you should be able to set the datomic repository in the same set-env! as where you declare the datomic dependency

geoffs19:01:06

I thought I'd gotten there with the examples in my blog post, but I see I did not. so maybe you can't? Seems like it should work though...

kenny23:01:21

Is there a way to attach the build timestamp to locally installed SNAPSHOT builds? If I do a simple boot pom jar install, it will install a jar into my local maven without the build timestamp (e.g. myproject-0.1.0-SNAPSHOT.jar). However, if I do boot pom jar push, it will push a timestamped version of the jar to my repository (e.g. myproject-0.1.0-20160524.001833-1.jar).

micha23:01:12

maven snapshots are black magic

kenny23:01:56

@micha It seems like installing a local snapshot should produce the same jar name as when pushing to a remote repository. The asymmetrical behavior doesn’t seem right.