Fork me on GitHub
#boot
<
2017-09-25
>
michal08:09:34

hi. is it possible to use boot with jitpack? I tried to follow this article but seems like it doesn't work. https://lambdaisland.com/blog/17-05-2017-loading-clojure-libraries-directly-from-github

dominicm08:09:19

@michal it is definitely

dominicm08:09:30

What is "it doesn't work"?

dominicm08:09:51

What have you tried, & what happened?

michal08:09:42

@dominicm ok, so here is what I did. I added :repositories [["jitpack" ""]] to build.boot first. then I added my dependency in a form [com.github.github-name/my-project-name "git-tag"]

michal08:09:00

and called boot deps at the end

michal08:09:27

it failed with exception like

org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.clojure:clojure:jar:1.8.0 in jitpack ()
      artifact: #object[org.sonatype.aether.util.artifact.DefaultArtifact 0x1b266842 "org.clojure:clojure:jar:1.8.0"]
    repository: #object[org.sonatype.aether.repository.RemoteRepository 0x738dc9b "jitpack (, releases+snapshots)"]

dominicm08:09:07

change to merge-env! instead of set-env!

michal08:09:07

I guess I should mention other repositories as well ?

michal08:09:33

ah. ok, I will try...

dominicm08:09:37

Well, two options, use merge-env! which merges for you, or use a function: (set-env! :repositories #(conj % ["datomic" {:url ""}]))

dominicm08:09:19

@michal did that work? 🙂

michal08:09:50

@dominicm I'm still trying. exception is gone, which is a good sign 🙂 but my artifact is still not available for some reason

clojure.lang.ExceptionInfo: Could not find artifact com.github.mbuczko:skalar:jar:v0.0.4 in clojars ()

michal08:09:02

this is my dependency [com.github.mbuczko/skalar "v0.0.4"]

michal09:09:27

repositories also seem to be ok:

boot.user=> (get-env :repositories)
[["clojars" {:url ""}] ["maven-central" {:url ""}] ["jitpack" {:url ""}]]

dominicm09:09:13

Looks like jitpack works by building your project, but they cannot build when you use boot.

michal09:09:43

ah, so they need my artifact to be lein-controlled, right?

dominicm09:09:38

but, yeah, generally, that's the expected way.

dominicm09:09:03

<mailto:[email protected]|[email protected]> on that BUILDING page, they suggest sending an email for other tools you're interested in, which seems worthwhile to me.

michal09:09:37

all the building process goes on the client side, does it? I mean, when I specify boot as install command it will be fired on my own machine?

dominicm09:09:23

no, runs on the jitpack servers

michal09:09:58

ok, this why they suggest sending an email for other tools 🙂

dominicm09:09:17

they might have a little more difficulty doing it with boot, as everyone can theoretically setup their project differently. They'd need to encourage a convention / config of the boot task to run.

dominicm09:09:56

I suppose, if you want to override the boot task(s), you create a jitpack.yml and specify it

dominicm09:09:12

otherwise boot jar install should work for most things (I think)

michal09:09:08

yup. I will try to ping them and ask again for boot support. in case of any questions from their side I will come back here to figure our together some reasonable solution

dominicm09:09:34

boot pom jar install should be the default task

michal09:09:17

yeah, I believe this is all we need.

djebbz09:09:11

Hello everyone. I'm trying to use :checkout dependencies between 2 boot projects, a lib that I'm building and a project. The lib side is fine, boot watch build does what you expect. The project side isn't, when I try to load the dependency in the repl it says java.io.FileNotFoundException: could not locate XXX blabalbla. Lib's build.boot :

(task-options!
 pom {:project     com.toto/tata
      :version     "0.1.0-SNAPSHOT"}
 repl {:port 9077})

(deftask build
  "Build and install the project locally."
  []
  (comp (pom) (jar) (install)))
Project's build.boot :
(set-env! :dependencies '[...]
                :checkout '[[com.toto/tata "0.1.0-SNAPSHOT]])

djebbz09:09:33

What did I do wrong ? In the project's repl, (require '[tata.core :as t]) fails

dominicm09:09:51

@djebbz :checkouts vs :checkout

dominicm09:09:57

You need an s

djebbz09:09:01

I tried, but it failed. I think it's because tata is nowhere in the Internet

djebbz09:09:35

seems to work...

djebbz09:09:27

You're the man @dominicm :+1:

ag21:09:34

have can I make sure that a process starts after another tasks? Le'ts say I am compiling cljs and only after that's completely finished I need to dosh something?

ag21:09:59

for example, if I do this:

(comp
    (watch)
    (build-cljs)
    (target)
    (dosh "./node_modules/.bin/karma" "start"))
it would start karma prematurely and errors out, how can I make it "wait" for build-cljs to get done?

dominicm21:09:23

Hmm, that shouldn't happen

juhoteperi21:09:57

Is dosh a task or just a normal function?

dominicm21:09:22

Dosh needs changing to fix this, I'm guessing you're returning identity or similar

ag21:09:01

are you saying I should create a task that returns identity and use dosh in there? I'm gonna try that. I also think wrapping it in (with-pass-thru _ block may also work

ag21:09:03

yup, I think that worked!