This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-29
Channels
- # admin-announcements (2)
- # beginners (20)
- # boot (139)
- # cider (6)
- # clara (1)
- # cljs-dev (7)
- # cljsrn (4)
- # clojure (160)
- # clojure-berlin (1)
- # clojure-canada (6)
- # clojure-gamedev (1)
- # clojure-japan (7)
- # clojure-russia (14)
- # clojure-spec (90)
- # clojure-uk (10)
- # clojurescript (73)
- # clojutre (1)
- # conf-proposals (8)
- # crypto (67)
- # cursive (9)
- # datomic (6)
- # editors-rus (1)
- # events (1)
- # figwheel (6)
- # funcool (2)
- # hoplon (19)
- # instaparse (37)
- # kekkonen (4)
- # lein-figwheel (2)
- # leiningen (5)
- # luminus (1)
- # off-topic (1)
- # om (10)
- # onyx (60)
- # protorepl (2)
- # re-frame (81)
- # reagent (10)
- # ring-swagger (15)
- # rum (6)
- # specter (17)
- # test-check (10)
- # uncomplicate (31)
- # untangled (12)
- # yada (6)
newbie question: I’m using boot inside a CIDER repl session launched with cider-jack-in
. I can call (get-env :boot-class-path)
and see many JARs included there, including the .jar
wherein I know to reside a certain fn
yet, when I call (require ‘[the-fn.namespace :refer [the-fn another-fn]])
I get told NoClassDefFoundError
and I’m just not sure where to look next. Could my CIDER session be messing things up somehow?
@chris_johnson the namespace is in a jar file?
it is
datomic.backup-cli
I am trying to write up an AWS Lambda function to do backups so I don’t have to run a c3.large
instance just to do a nightly cron job
well that part I’m not so worried about, yet
I’m worried about how I’m following other examples (gists and posts) of how to do the thing I want to do at all and …apparently it just doesn’t work when I try it?
oh, I see what’s wrong
so earlier I had just physically cp
’d the jar into my ~/.m2/repository
(since it’s not distributed directly) and then later I thought “well maybe I should mvn install
from the checkout I have just to see if I missed something”
and now instead of the 6MB .jar file, in my ~/.m2/repository
I find a 3.7KB, 7-line-long “.jar file"
so that’s at least something I have to fix before I go looking for problems downstream of it, sorry for bothering the channel
thanks a ton for the
tip though, I didn’t know about that and it helped me just now
<aliens_guy>Maven</aliens_guy>
I’m not …terrible?
I’ve been doing it a long time but I don’t have the urge to learn more about it than I have to
so i have a project with some dependencies, and those have dependencies that will be pulled into my project transitively
if one of those dependencies has a <repositories>
element in the POM with repositories that i have not configured in my pom.xml, is Maven going to add those to my project automatically to resolve the transitive dependencies?
oh wow - I wouldn’t think so but I’d have to gin up a test case to be sure
i made a test today with boot where i modified a pom to add <repositories> and some bogus deps, and sure enough it does add them to my project. but that seems somewhat unsound
so like if you had a transitive dependency on Datomic and wanted to pull it in from
automatically, you mean
and your actual project POM didn’t know anything about
well in my case i have a project that depends on tailrecursion/warp
, which is in my local .m2 cache
mmm, local cache is very different from a separate remote repo from Maven’s perspective though
i modified its pom to include a <repository> that went to like http://example.com
when i resolve deps Aether does try to use a repo at http://example.com
this http://example.com repo is only in the tailrecursion/warp pom, which is the weird part
how did tailrecursion/warp
get into your repo? I understand that you’re using it as a test sled but did you mvn install
it from a local source or pull it from somewhere remote and then start modifying it?
that’s disturbing - I wouldn’t have thought that Maven would do that, though I could see it happening for things you install locally
though I guess the resolver probably shouldn’t care either way
well, that’s beyond my direct knowledge of Maven, sadly - I’d have to gin up some test cases locally to better characterize its behavior
yeah i've seen the <repositories> in the pom.xml files but i always assumed that that was only used at build time, when the jar associated with the pom was built, by maven
I wouldn’t have expected vanilla Maven to do that at all, fwiw
well, I know that that’s probably not true
it's confusing that pom.xml is both the defacto package descriptor and the build tool spec file
for example if you declare a parent POM, Maven will go looking for it and incorporate it into the effective POM for the current task or mojo or whatever
I’m surprised to learn that it will do the same thing for transitive deps just because, as you say, “hey, why is ru.h4xx0r.lulz/r00tk1t
being downloaded!?"
but the machinery for fetching stuff it doesn’t have right now and folding it into the effective environment is definitely there
like i could make a malicious repo, then mirror every jar in clojars, with rootkit modifications
this seems to me to be something that would have been exploited just mercilessly if it were really true, though
I will investigate further and let you know what I find, maybe set up a remote repo that shadows something in clojars or central in S3 and see if I can make it break with vanilla Maven and a couple of pom.xml
s
there is a ticket tracking this issue btw: https://github.com/boot-clj/boot/issues/496
oh man this is getting annoying. I can’t get boot repl
to pull my leiningen creds out of gpg - I get
clojure.lang.ExceptionInfo: Assert failed: gpg: problem with the agent: Inappropriate ioctl for device
gpg: decryption failed: No secret key
(zero? exit)
I fixed this once and now I can neither remember what I had to do nor find the wiki or docs page that told me
there is this wiki page here: https://github.com/boot-clj/boot/wiki/Repository-Credentials-and-Deploying
hm this is probably what you're looking for: https://github.com/boot-clj/boot/wiki/Repository-Credentials-and-Deploying#lein-credentials-file
right, I’ve done all that and had it working
and then I foolishly killed that iterm2 session and now it …doesn’t work again. I know there was a thing I had to do with GPG itself but I can’t remember what - I bet it’s in the leiningen docs linked there though, let me go look again
it does and moreover after I do that then boot repl
works too
so it is something to do with gpg agent caching
where’s the fun in that?
you’ll never learn any ancient history of your toolset by just doing the thing that works right away!
hooray - progress:
1. Unhandled java.lang.NoSuchMethodError
com.fasterxml.jackson.databind.JavaType.isReferenceType()Z
at least I’m finding the thing on the classpath now
oh no, this is past the gpg issue, this is the response to (require ‘[datomic.backup-cli :refer [backup list-backups]])
dropping out of emacs and decrypting the creds file in the shell session was good enough
I did get it to present me the password prompt before but man, it hurt
like, mandatory M-x redraw-display
after successful passphrase input hurt
I’m not …super sad about maybe just having to start off my workday with a quick gpg -d
I like vim a lot, but I like CIDER a lot more
I’m sure it’s just a matter of knowledge investment though, I don’t really think there’s anything either toolchain can do that the other cannot
yeah, but how much of what cider does do I actually …use? a tiny bit more each week as I force myself to learn, I guess
so now what I really want is not (get-env :boot-class-path)
but something very like mvn dependency:tree
because I am pretty sure what’s happening here is a nearest-neighbor is pulling in “the wrong Jackson"
holy crap that’s so fast from inside a repl
yay, I did it! Or at least, some N lines of dependency-graph chirurgery later, I get to an exception coming from the transactor code itself
I never again want to live in a world where I navigate Java dependency graphs without (boot (show “-d”))
and (boot (show “-p”))
, wow
Hi - trying to get uber working... looks like succeeds but no uber is being created
@jonpither: are you having the target task at the end of your pipeline?
I can't get build-docker to work here: https://github.com/adzerk-oss/boot-beanstalk, would this be for the same reason?
@jonpither: not sure what's not working for you but if you expect some files to show up in target or similar and they don't then the target task likely is what you need
what would be the best way to incorporate a (:refer-clojure :exclude [foo])
into my build.boot ? i’m probably missing something obvious ?
(specifically, i’m doing (deftask test [] …)
and want to get rid of the warnings that clojure.core/test is being replaced by boot.user/test
@lmergen there's some solution to this but I usually just use test!
instead of test
not an answer I know 😛
boot.user=> (doc ns-unmap)
-------------------------
clojure.core/ns-unmap
([ns sym])
Removes the mappings for the symbol from the namespace.
once you've unmapped the name you can still access the var via its fully qualified name, ie clojure.core/test
@pvinis this doesn't use compojure-api but plain compojure but I guess the difference isn't that big: https://github.com/Deraen/saapas
@pvinis Yeah, just add dependency to compojure-api, replace defroutes
with defapi
and follow Compojure-api guides, doesn't really differ anything from examples using Lein