Fork me on GitHub
#boot
<
2016-08-11
>
micha03:08:58

@jiyinyiyong: that's only the boot.sh part

micha03:08:09

it should work fine with version 2.6.0

micha03:08:27

boot is really distributed via maven

micha03:08:54

the homebrew package is just to distribute the shim that gets the "real" boot from maven

Jon03:08:04

So brew upgrade boot will not update boot?

micha03:08:13

no, you can do boot -u for that

micha03:08:39

this is because projects could depend on a specific version of boot

Jon03:08:09

just some confusion in the brew part. I'm fine with boot -u

micha03:08:55

hm actually that's way out of date

micha03:08:02

i need to edit that

Jon03:08:37

2.0.0 haha

micha03:08:37

i'll do that now actually, hang on a sec

micha03:08:49

hah yeah many moons since then

micha03:08:28

@jiyinyiyong: there we go, all updated now

Jon03:08:00

yeah, I see 2.6.0 now

micha03:08:15

excellent

flyboarder03:08:41

Is there any known performance difference when pinning the clojure version of boot?

danielsz04:08:00

@lambder: Your project pulls in an older tools.namespace version. You would need to do some detective work to identify which of your dependencies is the culprit, then exclude that version from your project.

danielsz04:08:17

Use boot show to help you in doing that.

Jon04:08:45

how to keep a task running rather exiting immediately? I create a server with ring in the task and I don't want it to exit

vikeri10:08:18

As I try to include my whole node_modules folder in :resource-paths I get the following error: (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21) Any idea? Too many files in that folder?

vikeri10:08:24

The actual exception is java.lang.OutOfMemoryError: unable to create new native thread

martinklepsch10:08:06

@vikeri: check the issue tracker, I've seen these before but not sure if there was a solution

martinklepsch10:08:22

(I think the solution was not to have node_modules in resources or so

vikeri10:08:44

@martinklepsch: Couldn’t find anything but I probably didn’t search hard enough

vikeri10:08:17

now I found it!

vikeri10:08:37

#badsearch

vikeri11:08:15

@martinklepsch: No solution seems to be found though, maybe I’d have to use flyboarder’s npm task to get this working. Might resort to just break boot philosophy by spitting things out with target for now since I’m not sure about the ramifications of hiding away my node_modules folder from RN.

pesterhazy12:08:40

@vikeri: remember the node_modules folder is massive

pesterhazy12:08:20

another idea may be to use boot's cache-dir feature. Does this run into the same problem?

vikeri12:08:16

@pesterhazy: I know. Have not tried that, will I get node_modules in my fileset then?

pesterhazy13:08:59

don't know any details I'm afraid

lwhorton13:08:25

is anyone familiar with using cljsjs to pull in react-with-addons? I’m for some reason always getting react.inc.js instead of with-addons.inc.js, despite a boot file as thus:

[reagent "0.6.0-alpha" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]
                  ,,,[cljsjs/react-with-addons "15.1.0-0"]
                  ,,,[cljsjs/react-dom "15.1.0-0"]
                  ,,,[cljsjs/react-dom-server "15.1.0-0"]
those exclusions look correct to me, though?

alandipert13:08:35

@lwhorton: maybe check out the reagent pom to confirm?

pesterhazy14:08:50

I have the "problem with refresh-dirs" mentioned here: https://github.com/boot-clj/boot/wiki/Repl-reloading

pesterhazy14:08:17

In a mixed cljs+clj project, my jvm process tries to reload ajax.core, even though it's a client-only dependency

pesterhazy14:08:37

I don't understand the workaround suggested in the wiki

dm314:08:12

@pesterhazy: the workaround suggests setting refresh-dirs to the actual source directories that you want to reload

dm314:08:24

not the tmpdirs that Boot creates

pesterhazy14:08:25

going behind Boot's back, huh?

pesterhazy14:08:36

(defn reset-dev []
  ;; hack: only find the boot temp-dir that contains this file.
  ;; this is to prevent problems relating to tools.namespace
  ;; trying to reload cljs dependencies

  (let [dirs (->> (boot.core/get-env :directories)
                  (filter (fn [xs]
                            (->> xs  file-seq (filter #(-> % .getPath (.contains "my/project/repl.clj"))) seq))))]
    (apply clojure.tools.namespace.repl/set-refresh-dirs dirs))
  (stop)
  (refresh :after 'my.project.repl/go))

pesterhazy14:08:01

this seems to do the job as well

pesterhazy14:08:57

omg it works

pesterhazy14:08:20

this may be a more general hack than the one suggested in the wiki

dm314:08:15

if you want to add all the directories, yes

pesterhazy14:08:42

for me the point is to exclude the cljs-related directory

dm314:08:59

in your case the problem is the dependency source files, not your sources, right?

flyboarder14:08:06

@vikeri: npm task uses the cache dir within boot for its operations.

pesterhazy14:08:08

@dm3, I'm simply using cljs-ajax (ajax.core) in my client code

pesterhazy14:08:17

that library also comes with a clj implementation

pesterhazy14:08:44

which for some reason gets included when reloading (I guess because the cljs compiler runs in the same process/classpath/?)

pesterhazy14:08:05

and reloading cljs.ajax breaks

dm314:08:21

it gets included because of cljc files

stuarthalloway15:08:03

anybody got push to s3 working using IAM roles? I know my creds are good (equivalent mvn deploy command works) but I cannot replicate in boot

pesterhazy15:08:15

@stuarthalloway: are you using boot-s3?

pesterhazy16:08:03

it's possible that boot-s3 uses subtly different S3 commands, requiring different permissions (e.g. "s3:ListBucket", "s3:GetObject")

pesterhazy16:08:57

looking at https://github.com/hashobject/boot-s3/blob/master/src/hashobject/boot_s3/s3.clj, it seems to require fairly extensive permissions (like listing all buckets)

pesterhazy16:08:37

what error message do you get?

stuarthalloway16:08:20

@pesterhazy: error message is gibberish due to ANSI escapes, let me rerun

alandipert16:08:42

sounds like push + s3 wagon, not the boot-s3 task. but yeah, could still be a perms issue, not sure if the wagon requires different ones than the maven plugin would

stuarthalloway16:08:30

I am going to try the Spring wagon

micha16:08:36

@stuarthalloway: the -C, --no-colors option strips the ANSI stuff, like boot -C sometask

pesterhazy16:08:30

you could try setting temporarily setting the permissions to "full" as explained in the last snippet in http://mikeferrier.com/2011/10/27/granting-access-to-a-single-s3-bucket-using-amazon-iam/

pesterhazy16:08:45

s3 permissions are surprisingly tricky

stuarthalloway16:08:32

that’s just giving up 🙂

pesterhazy16:08:51

I call it verifying a hypothesis 🙂

micha16:08:21

one thing that's confusing about s3 policies is that you need to allow ListObjects action on the bucket itself, but GetObject etc can be on key prefixes in the bucket

pesterhazy16:08:43

yeah, that's why I linked to the example on the blog

micha16:08:46

ListObjects applied to a resource like foo-bucket/* won't work

micha16:08:45

also if you don't have ListObjects permission then 404 (key not found) will be returned as 403 (premission denied)

micha16:08:55

to prevent bucket enumeration attacks

lambder18:08:42

@danielsz:

lambder18:08:53

So I added this to my build.boot

lambder18:08:55

(system :sys (resolve 'user/new-dev-system) :auto true :files ["edge/phonebook.clj"])

lambder18:08:06

I see no errors and even see in logs:

lambder18:08:16

Compiling ClojureScript... • edge.js #'user/new-dev-system:refreshing Unloading: (user edge.system edge.web-server edge.phonebook) Reloading: (edge.phonebook edge.web-server edge.system user) Writing target dir(s)... Elapsed time: 0.600 sec

lambder18:08:40

when I save changes to edge/phonebook.clj file

lambder18:08:16

Nevertheless changes in other files are not pickedup

lambder18:08:00

The system.boot doc says that all namespaces are refreshed on any file change

lambder18:08:15

Can you advise please?

stuarthalloway19:08:27

thanks @pesterhazy and @micha for the advice earlier. My tentative conclusions

stuarthalloway19:08:29

| wagon  | explict creds | system property creds | role creds |
|--------+---------------+-----------------------+------------|
| priv   | conveys       | no                    | no         |
| spring | conveys       | conveys               | conveys    |

stuarthalloway19:08:46

:wagons '[[s3-wagon-private "1.2.0"]]

stuarthalloway19:08:04

:wagons #(conj % '[org.springframework.build/aws-maven "5.0.0.RELEASE"
                    :schemes {"s3"
                              (fn []
                                (org.springframework.build.aws.maven.SimpleStorageServiceWagon.)) }])

micha19:08:13

i will slurp that into the wiki page for s3 repos

danielsz22:08:43

@lambder: Almost. But the system var should be defined in your project namespaces, not in user. Please refer to any of the examples.

lambder22:08:30

@danielsz: ok, will try tomorrow. thanks a lot

danielsz22:08:07

@lambder: np.

danielsz22:08:05

@lambder: Something else, not all namespaces are being reloaded, only the affected ones. Where in the docs does it say all?

lambder23:08:38

@danielsz: you’re right only affected not all. My bad but the changes I made affect what’s rendered on server-side

lambder23:08:05

so still don’t understand why I can’t see the update

danielsz23:08:39

@lambder: Can I see your build.boot?

lambder23:08:18

sure, one sec

danielsz23:08:04

I see. Why do you think you need line 103, line 104 and line 107? Where did you see that?

lambder23:08:00

(set-env! :source-paths #(conj % "dev”)) adds user anmespace

lambder23:08:37

107 likewise

lambder23:08:18

so basically my objective was to take https://github.com/juxt/edge and make it auto refresh after changes in the backend code

lambder23:08:02

edge is just refreshing clojurescript changes

danielsz23:08:32

The user namespace is a namespace available at the REPL, it is not part of the project. This seems wrong to me.

danielsz23:08:00

Anyway, you don't need all those lines with system.

lambder23:08:11

which one?

danielsz23:08:28

103, 104 and 107

lambder23:08:09

so if i set :source-paths #{"sass" “src” “dev"}

lambder23:08:15

then it should be ok?

danielsz23:08:30

No, dev shouldn't be there.

danielsz23:08:03

dev` is user, right?

lambder23:08:12

but i can have my sources in several dirs, don’t i?

lambder23:08:22

yes , user is in dev

lambder23:08:58

in line 104 : (set-env! :source-paths #(conj % "dev"))

lambder23:08:12

“dev” becomes part of proj src

lambder23:08:30

so it is part of the project, isn’t it?

danielsz23:08:31

You're just making things more complicated in my opinion.

lambder23:08:45

it’s not me , it’s juxt project

lambder23:08:17

I’m new to boot, so I wanted to start working on something established 😉

lambder23:08:58

anyway, what determines that given dirs are part of project?

danielsz23:08:26

@lambder: Don't worry, system is well established. 🙂

lambder23:08:40

yes, but system is a lib

lambder23:08:06

edge is a bootstraped yada app

lambder23:08:48

i’m happy to use system in edge

lambder23:08:58

the problem is i don’t know how

lambder23:08:13

e.g. how to use it so it works 😉

lambder23:08:45

the logs say the components are stopped and started

lambder23:08:07

the logs started to appear after adding system

lambder23:08:34

but still when i reload the browser i can’t see the update

lambder23:08:52

if i do call (refresh) in connected repl

lambder23:08:59

then i can see the changes applied

lambder23:08:29

sorry not (refresh) but (reset)

lambder23:08:44

reloaded.repl/reset

danielsz23:08:54

Right. I haven't tried to retrofit sytem onto an edge app, so I can't help you here. I have a set of guidelines when using system, and it's very simple. But I expect an app structure like the ones in the examples.

lambder23:08:37

ok, i will try that. Thanks

danielsz23:08:09

Sure. Good luck. In the system repo, you will find examples that offer similar functionality as edge.

danielsz23:08:51

Also, some people use this to bootstrap a reloadable back-end + front-end. https://github.com/danielsz/holygrail