This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-22
Channels
- # alda (1)
- # aws-lambda (23)
- # beginners (27)
- # boot (156)
- # business (2)
- # carry (4)
- # cider (1)
- # cljsjs (2)
- # cljsrn (29)
- # clojure (170)
- # clojure-austin (35)
- # clojure-czech (8)
- # clojure-dusseldorf (5)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-quebec (2)
- # clojure-russia (45)
- # clojure-spec (49)
- # clojure-uk (12)
- # clojurescript (81)
- # component (5)
- # datomic (24)
- # devcards (26)
- # emacs (4)
- # hoplon (4)
- # jobs (1)
- # juxt (5)
- # leiningen (6)
- # luminus (14)
- # mount (26)
- # om (27)
- # om-next (2)
- # onyx (22)
- # pedestal (2)
- # planck (3)
- # proton (5)
- # re-frame (19)
- # reagent (2)
- # ring-swagger (60)
- # spacemacs (12)
- # specter (8)
- # untangled (119)
- # vim (61)
- # yada (36)
I'm getting an error boot.user/stop is not resolvable as a var
from cider-refresh
. I swear I used to be able to do this in an old project. Has anyone run into this?
(deftask wait-at-end
"A task that runs all successive tasks and then waits."
[]
(fn middleware [next-task]
(fn handler [fileset]
(next-task fileset)
(wait))))
(comp (next-task) (wait))
This might not be what you want though
@martinklepsch i see you contributed to this task, you didnt have this issue 😉 ?
@kenbier I eventually ended up writing an S3 sync task as well. (not because this one didn't work but because I had some different ideas)
@kenbier I see the issue, I'd suggest that the task actually should be ran after all other tasks but I guess that's outside of your control
not sure if there's a way to make it work with wait
It's part of Confetti 🎉 https://github.com/confetti-clj/confetti
can confirm that confetti
has been successfully used for http://clojurescript.io's assets 😄
@richiardiandrea are you still using it?
well unfortunately once I changed company I could not deploy anymore there, but it was linked to Jenkins so I guess the new maintainer (if any) is still using it yes
I also wanted to create a task for glacier
for backup purposes, and it might become handy again for that
@richiardiandrea wow http://clojurescript.io is super cool
it has been fun and made replumb
possible
Klipse is for instance using replumb
under the hood 😄
but then, well, I joined a product-based project, still maintaining replumb but
got kind of abandoned...the code is still on github: https://github.com/Lambda-X/cljs-repl-web
Still think it's probably one of the better things I've made, but I'm apparently more excited about deploying static web-apps than most others 😄
yes Martin it was is working very smoothly indeed, my current project manager does not want to deploy on S3, this is the only reason why I am not using it anymore...but during the interview, six months+ ago, I showed them how I was deploying http://clojurescript.io and they were all impressed 😄
it is so cool to deploy with a simple boot -e type=dev build deploy-s3
@richiardiandrea what do you deploy to then?
for our first MVP we are on Digital Ocean, nothing fancy, we just need to show things and get feedback/customers
Hi boot friends. I’m running into an issue with leiningen that’s finally sending me to seriously investigate boot. Hooray. Unfortunately, I’m not having much better luck with boot yet.
The underlying problem I’m trying to solve is to be able to cheaply and simply manage a private maven repository. S3 seems to fit the bill nicely.
hello @donaldball, welcome
there are two options described in this wiki page: https://github.com/boot-clj/boot/wiki/S3-Repositories
Unfortunately! We’re using aws-vault to manage our aws credentials, which uses Amazon STS to issue temporary credentials, so we don’t need to trust our tool chain very much or store credentials in configuration files. It’s pretty swank.
Unfortunately, it requires the java sdk to be at least 1.9.x because I don’t know reasons
Unfortunately everyone - leiningen and boot included, seem to depend on 1.7 indirectly because reasons
Neither option on that page work, alas. lein-s3-wagon only likes to use hard-coded credentials, which is a show stopper for us, and the spring boot maven depends on an older version of the amazon sdk.
Some folks have forked the spring boot maven to use a newer version which would be fine, maybe? So I’m trying to use it, but it itself is only hosted in a non-standard public maven repo.
All ears 🙂
I should note that I’m trying this atm:
:wagons (fn [wagons]
(conj wagons
'[fi.yle.tools/aws-maven "1.4.0"
:schemes {"s3" #(fi.yle.tools.aws.maven.SimpleStorageServiceWagon.)}]))
:repositories (fn [repos]
(conj repos
'["fi.yle.tools" {:url ""}]
'["sparkfund-snapshots" {:url ""}]))
jigsaw ftw?
I don’t think it is yet, just guessing
not so much, though having devs have to use a non-standard boot seems fragile in the long run
but there are other ways to safely handle credentials, if that's the problem you want to ultimately solve
That’s all I truly care about, though we’re moderately invested in the aws-vault tool atm
like for instance my workflow uses environment variables in my shell, that's where i have my AWS creds
sorry, didn't mean to go off on a tangent there... what is the issue you're seeing with boot in java 1.9?
No worries, I appreciate alternate angles
I haven’t yet tried boot with java 1.9; what would that change that might help?
If I can, that would solve my problem
Where would I go to learn more about trying this?
Oh, sorry, I think I may have not been very clear
It’s not the Java version that needs to be 1.9, it’s the amazon java library that needs to be 1.9+
So the essential problem as I understand is that the boot dependency resolver is running in a jvm classloader that has the old and sad amazon library
one thing you can try is when you add the :wagons
, you can override the aws sdk version
I’m afraid I don’t know where to find documentation on the syntax of the dependency vectors
are you able to use the AWS SDK (of the correct version) to fetch temporary AWS_ACCESS_KEY_ID etc?
yeah. I even wrote my own lein plugin that works with the right amazon library version, but I ran headlong into essentially this problem with leiningen also 😛
Yeah, that’s the big reason I’m excited about this option
But it’s not at all clear to me how I would do the dependency resolution in that pod
ah, but the crusty old wagon things can’t use the temporary credentials… they just flat out don’t work in older versions of the amazon sdk because… i… can’t even really imagine a good reason, frankly
you do, they just don’t work with old versions of the amazon lib. It’s nuts.
No, this is aws-vault: https://github.com/99designs/aws-vault
(set-env!
:wagons
'[[com.amazonaws/aws-java-sdk "1.9"]
[org.springframework.build/aws-maven "5.0.0.RELEASE"
:schemes {"s3" (fn [] (org.springframework.build.aws.maven.SimpleStorageServiceWagon.))}
:exclusions [com.amazonaws/aws-java-sdk]])
yeah, alas, it seems not to have an effect; the boot process still yields an error that suggests it itself has an old amazon lib
:tears of joy:
But alas, com.amazon isn’t in that list
Which says that you were totally right about boot itself not providing amazon, but the exclusions isn’t having the effect I’d like
(set-env!
:source-paths #{"src"}
:wagons (fn [wagons]
(conj wagons
'[org.springframework.build/aws-maven "5.0.0.RELEASE"
:schemes {"s3" #(org.springframework.build.aws.maven.SimpleStorageServiceWagon.)}
:exclusions [com.amazonaws/aws-java-sdk-core
com.amazonaws/aws-java-sdk-s3]]))
:repositories (fn [repos]
(conj repos
'["sparkfund-snapshots" {:url ""}]))
:dependencies '[[clj-ssh "0.5.14"]
[com.amazonaws/aws-java-sdk-core "1.11.29"]
[com.amazonaws/aws-java-sdk-s3 "1.11.29"]
is the current stanza fwiw
barp $ boot -BPd boot/aether -d org.springframework.build/aws-maven:5.0.0.RELEASE show -d
yeah, that’s the problematic version
it’s implied that it’s a direct dependency of boot/aether, which is surprising, I don’t see that in https://github.com/boot-clj/boot/tree/master/boot/aether anywhere
er, no, I’m misreading the output, it’s from org.springframework.build/aws-maven as expected
I gotta run to a school thing now, I’ll keep fiddling. Thanks @micha, you’ve been more than helpful.
@martinklepsch i want to use sync-bucket
from confetti, and all i want to sync is some dir in target. would calling (sync-bucket “target/foo”)
be sufficient?
that post-task thing is really annoying me from boot-s3 and i had to copy it over to get it to work
good luck @donaldball !
@donaldball there was a bug in my paste above, an extra single quote before the :exclusions
@kenbier have you had a look at boot sync-bucket --help
?
the sync-bucket
task operates on the fileset (by default it just syncs the entire fileset) so you have all regular boot utilities (mostly sift
) to filter and move around files in the fileset
Can modifying dependencies multiple times before a build begins negatively affect dependency resolution? I'd like to have a base list of dependencies and then dynamically add dev/prod deps inside of their respective tasks.
@domkm You can add dev deps as :scope "provided"
and use uber :exclude-scope
to drop them from uberjar. No idea about prod deps, I have never hit a case where I would only use some dep on prod.
Thanks @juhoteperi
You could also use set-env!
on tasks, but I avoid that as it adds unnecessary mutation and I don't see reason to not use Maven features for this
"By default, entries from dependencies with the following scopes will be copied to the fileset: compile, runtime, and provided. The --include-scope and --exclude-scope options may be used to add or remove scope(s) from this set."
Yeah that's what I use for Boot tasks and deps used on tests
But I use provided scope for Cljs deps (compiler and libs)
Could use test but that feels wrong 😄
@juhoteperi Any issue with dynamically setting resource-paths and source-paths?
Should work. I try to avoid it but I guess it can't be helped sometimes.
Usually you can use :source-paths
for tests and test-resources
As they aren't included in jar
It's worth noting that the Clojure AOT will load in everything on the classpath, even if the scope is provided.
aot loads namespaces that your main ns depends (or more specifically, namespaces there the ns you tell aot to complete depend)
@juhoteperi yep. problematic if it's expected that a different dependency version to load in though.
@martinklepsch no ill check it out thanks