Fork me on GitHub
#boot
<
2017-07-17
>
donyorm06:07:53

@dimovich you can get debugging output by passing the -v and -vv arguments to boot. Ex. boot -vv cljs

donyorm06:07:10

I'm working with a boot repl and boot refresh (https://github.com/samestep/boot-refresh), however when I add a new function refresh doesn't add it to the repl (after I've called use). If I change the code within an existing function it works fine. Is there any fix for this

donyorm06:07:48

Also (use 'namespace :reload) also fails, with a "symbol already refers to symbol in namespace 'boot.user" error

ska11:07:43

Hi. I tried to find some documentation and best practices for how to publish artifacts in a local Artifactory or Nexus, but failed so far. Any other pointers than the very generic https://github.com/boot-clj/boot/wiki/Repository-Credentials-and-Deploying ? I'd like to push snapshots to a different repo than releases, I build in Jenkins without any plug-ins.

martinklepsch11:07:43

@ska what do you find lacking from that wiki page? is the problem solely pushing snapshots to a different repo?

ska12:07:56

@martinklepsch I'd love to see a real-world example build script with best (or known to work) practices. Do I write my own task and then call different options of the push script? How do I call this in Jenkins? How do I add my repo URL and credentials from Jenkins? Should I write something like https://github.com/adzerk-oss/bootlaces/blob/master/src/adzerk/bootlaces.clj#L76 myself but focusing on a local Artifactory instead of Clojars... Something like that. Makes sense?

martinklepsch12:07:18

@ska

(deftask push-things
  (comp (pom)
        (jar)
        (push :repo “your-artifactory”) ; or
        ;; (push :repo-map {:url (System/getenv “REPO_URL”)
        ;;                  :username (System/getenv “REPO_USERNAME”)
        ;;                  :password (System/getenv “REPO_PASSWORD”)})
        ))

martinklepsch12:07:10

then you’d just make Jenkins run boot push-things

martinklepsch12:07:08

Hope this makes sense, I’m not sure I fully understand the issues surrounding jenkins

ska12:07:04

@martinklepsch Yeah, I understood things so far. But how would one use :ensure-release or :ensure-snapshot there? How set a different :url depending on whether it is a release or a snapshot?

martinklepsch12:07:21

(def version "0.0.1-SNAPSHOT")

(deftask push-things
  (comp (pom)
        (jar)
        (push :repo (if (.endswith version "SNAPSHOT") "snapshot-channel" "release-channel")) ; or
        ;; (push :repo-map {:url (System/getenv "REPO_URL")
        ;;                  :username (System/getenv "REPO_USERNAME")
        ;;                  :password (System/getenv "REPO_PASSWORD")})
        ))
@ska it’s just a program 🙂

ska12:07:42

So, I'll re-create something like https://github.com/adzerk-oss/bootlaces/blob/master/src/adzerk/bootlaces.clj#L76 with a suitable wrapper (`deftask push`) around it, which calls the appropriate backend. It feels kinda backwards, though, that I'll test for snapshot first only to then have the push task ensuring it again.

martinklepsch12:07:37

@ska the push task does nothing else than (.endsWith v "-SNAPSHOT") so you can skip that step if you’re taking care of it yourself

ska12:07:17

@martinklepsch I know. For lack of other docs I already read the source. 🙂 Anyhow, I think, I'll figure it out eventually. Thanks for your help.

martinklepsch12:07:54

@ska let me know what you come up with and then we can improve that wiki page 🙂

ska14:07:13

It'll take a few days. Extremely busy. Maybe we can have a chat on this during euroclojure end of the week.

martinklepsch14:07:44

@ska sure, looking forward to catching up 🙂

xiongtx20:07:09

What’s the boot equivalent of Lein’s :java-source-paths? I came across boot-java-task-example but it seems to be doing more than what I need: include Java source files that are AOT compiled. https://github.com/alandipert/boot-java-task-example/blob/master/build.boot

Ruben W21:07:08

Hey, I’m trying to have a task move files and then run another compile task, but it doesn’t seem to work because the move-task changes the fileset. If I wrap the move-task in with-pass-thru or with-post-wrap the compile task works but no files are being moved.. If I wrap it in with-pre-wrap I get an error that the task-handler must return a fileset.. What am I missing here? https://gist.github.com/freakinruben/6e117f7d6703b7f513cf612695ea5cf1

Ruben W22:07:36

I now changed mv-generated-files to:

(deftask mv-generated-files []
  (with-pre-wrap fileset
    (let [generated-dirs (->> fileset
                              ls
                              (by-meta #{::generated}))
                              (map tmp-dir)
                              (into #{}))]
      (apply sync! generated-dir generated-dirs)
      fileset))
Which seems to work! But what is a good use-case for sift then..?