Fork me on GitHub
#boot
<
2016-09-13
>
mitchelkuijpers08:09:24

Does anyone have any idea why this preloads vector does not seem get picked up

(cljs :ids #{"public/js/main"}
        :source-map true
        :compiler-options {:preloads '[devtools.preload]
        :external-config {:devtools/config {:features-to-install [:formatters :hints :async]}}})

mitchelkuijpers08:09:58

I see the external config is wrong hmm

mitchelkuijpers08:09:16

Ow nvm that is my formatting 😛

mitchelkuijpers08:09:59

I have updated some deps and now it started working!

bill16:09:55

hello @flyboarder my Mavenfreude has reached a critical point. Seeking solace.

flyboarder16:09:39

Hahaha you have come to the right place, what problem are you having?

flyboarder16:09:59

Downloading things?

flyboarder16:09:04

Uploading things?

bill16:09:32

just Maven Would it be feasible, or maybe even profitable to replace all my pom.xml in a medium-sized Java project (say 20 POMs building a Java REST server) with Boot scripts?

bill16:09:04

I’m the only one on the team of 6 that currently knows Clojure but I swan, I just can’t take Maven any more

flyboarder16:09:13

Are you looking to replace them with a boot generated Pom?

bill16:09:55

couldn’t I just actually use Boot and if it needed to gen POMs in order to deploy artifacts then that’d be ok but I wouldn’t manage POMs as source code

bill16:09:57

Saw the Boot Fileset and was so happy

bill16:09:25

but perhaps I’m overly-optimistic… was seeking a more declarative build spec, more like make(1) where I ask for what I want and the build system deduced what’s needed instead of (Maven’s) sequential phases looping through plugin goals in nested for loops forever

micha16:09:52

you want to convert builds to boot, or use maven classes from inside of boot?

micha16:09:45

boot is sort of the opposite of make (and maven), it does not actually know anything about your build

micha16:09:45

@bill boot will let you make a straightforward clojure program to execute the build

micha16:09:55

that includes writing pom.xml files etc

bill17:09:21

neat @micha. You say boot does not actually know anything about your build. I kinda get that. But does Boot have a notion of dependency and a notion of when a dependency is out of date? My impression was dependency and “out of date” were building blocks I could rely on in Boot

micha17:09:42

boot exposes functions that use the Aether library to interact with maven repos

micha17:09:22

@bill so you can do like boot -d hoplon show -d for example

micha17:09:41

that tells boot to add the hoplon dependency from maven

micha17:09:52

and the show -d task tells it to print the dependency graph

micha17:09:12

but you don't necessarily need to use those tasks

micha17:09:48

boot exposes them in a way that is easy to use, because most of the time you'll want to get dependencies from maven etc

micha17:09:04

but boot itself doesn't assume that, you have to tell it to do it

bill17:09:45

the term “dependency” is overloaded. You’re talking specifically about Maven’s dependency notion. I wonder about Boot’s native notion of dependency (if any). Make’s dependencies are declarative. Does boot have a first-class dependency notion that’s declarative? Seems like it does. Seems like there is a “planner” in Boot that knows when to call certain tasks (and not call others) based on the Fileset right?

flyboarder17:09:30

@bill boot doesn’t have notions when to call or not to call boot tasks, it does have a boot environment which you can declare dependencies in and will be fetched by boot along with specifying folder paths for the fileset

flyboarder17:09:41

but that has nothing to do with the actual build pipeline

bill17:09:02

that makes sense (Mavensense)

bill17:09:25

within a Boot project though, I can have things that are interdependent right?

flyboarder17:09:49

so you can use the environment deps to fetch things that contain boot tasks which you can then use

flyboarder17:09:50

@bill could you maybe rephrase your question, your current project has about 20 deps and you are looking to convert it from make or lein or whatever to boot yes?

dominicm17:09:29

@flyboarder: I get the impression @bill wants to run boot build and have boot say that X is built, so I can skip that, but Y isnt, so I need to do that.

bill17:09:33

I’m all Maven right now, building Java sources almost exclusively. I have a top-level POM that depends on three other subproject POMs which in turn my depend on a dozen or so other subproject POMs. 2 KLOC in 15 POM files in all

bill17:09:59

(2,000 lines of XML/Maven code in those 15 POMs)

bill17:09:56

plugins like surefire, shade, assembly, dependency, compiler, enforcer, javadoc, jar, cobertura (code coverage)

bill17:09:31

wondering about feasibility/sensibility of turning the whole shootin’ match to glorious Clojure

flyboarder18:09:46

@bill so since you have nested projects I would think thats more of an advanced setup, which may need boot-in-boot im not sure where that example lives

flyboarder18:09:11

I dont work with java at all, so my knowledge on that is limited

bill18:09:47

I dont’ want nested projects. It’s just that in Maven, if you want any modularity you have to create another POM and you end up with another Maven artifact in repositories everywhere

bill18:09:18

looks like Gradle and Boot break that connection (Maven artifact to module) yay

alandipert18:09:31

@bill one thing you can do in boot that i want to do, but haven't yet

alandipert18:09:46

hmm what's the maven thing called, that's like a template you can subclass?

alandipert18:09:00

i guess a parent pom

alandipert18:09:26

anyway the way you can do that in boot is with mixing-in instead of inheritance

alandipert18:09:48

for example you can make a clojure program with a function that returns a [[vector/of "1.2.3"] [dependencies "1.0.0-SNAPSHOT"]]

alandipert18:09:33

so in your build.boot you could: (set-env! :dependencies '[[acme/company-deps "1.0.0"]]) (require '[acme.company-deps :refer [deps]]) (set-env! :dependencies (into '[[foo/bar "1.2"]] (deps))

alandipert18:09:38

i need to make something like acme/company-deps because i'm constantly managing exclusions between slf4j versions, jackson deps, etc

alandipert18:09:52

so what you can do with boot is make a library that produces a program that brings in the deps you want

alandipert18:09:20

a downside to this is if you already have very maven-aware jenkins machinery powered by parent poms etc

bill18:09:19

I’m going to abandon Jenkins too because it promotes a world where stuff really can only ever get built (right) on Jenkins servers

alandipert18:09:29

a thousand times this sentiment

smw18:09:13

I think the solution to that is to not allow anything but environment variables in your ‘build configuration’ or whatever on the jenkins server, and have all the actual build work checked in

smw18:09:02

along with using agents that get wiped out regularly and have no deps installed… make people bring their own deps — containers, virtualenv, whatever.

pseud21:09:33

Trying to use boot-new, anyone have a clue how to begin debugging this ? http://paste.ubuntu.com/23175338/ / https://github.com/readux/readux-starter

flyboarder22:09:48

@pseud i dont see you including the template dep

flyboarder22:09:05

im not sure boot-new downloads templates for us

seancorfield23:09:47

boot-new looks on Clojars etc for the named template.

seancorfield23:09:54

That exception looks like a failure in the template itself or while applying the template generating function… let me try that locally...

seancorfield23:09:07

FWIW, trying exactly what it says on that project’s README fails:

(! 502)-> boot -d seancorfield/boot-new new -t readux-starter -n pseudapp2
Retrieving maven-metadata.xml from  (1k)
Retrieving boot-template-0.1.1.pom from 
Retrieving boot-template-0.1.1.jar from  (8k)
Could not load template, failed with: Could not locate boot/new/readux_starter__init.class or boot/new/readux_starter.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
clojure.lang.ExceptionInfo: 1
    data: {:file
           "/var/folders/p1/30gnjddx6p193frh670pl8nh0000gn/T/boot.user4270760942851705989.clj",
           :line 17}
             boot.App$Exit: 1
          boot.new-helpers/resolve-remote-template/fn  new_helpers.clj:   64
boot.new-helpers/resolve-remote-template/invokeStatic  new_helpers.clj:   64
             boot.new-helpers/resolve-remote-template  new_helpers.clj:   16

seancorfield23:09:32

I’ll clone the redux-starter repo and see if I can figure out what’s wrong with it...