This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (5)
- # arachne (2)
- # bangalore-clj (1)
- # beginners (8)
- # boot (195)
- # cider (28)
- # cljs-dev (35)
- # cljsrn (4)
- # clojure (295)
- # clojure-brasil (5)
- # clojure-gamedev (2)
- # clojure-greece (2)
- # clojure-korea (13)
- # clojure-russia (60)
- # clojure-spec (58)
- # clojure-uk (92)
- # clojurescript (31)
- # clojurex (4)
- # css (1)
- # cursive (13)
- # datomic (40)
- # devcards (2)
- # emacs (17)
- # events (1)
- # flambo (3)
- # garden (9)
- # hoplon (31)
- # jobs (3)
- # klipse (1)
- # lein-figwheel (1)
- # london-clojurians (1)
- # luminus (2)
- # mount (36)
- # off-topic (13)
- # onyx (8)
- # pamela (1)
- # pedestal (1)
- # planck (3)
- # proto-repl (16)
- # protorepl (11)
- # re-frame (78)
- # reagent (4)
- # rethinkdb (6)
- # ring-swagger (1)
- # specter (8)
- # untangled (10)
- # vim (1)
I'm a little stuck with my project which is essentially generating a a static website / web app hybrid which can be hosted entirely on a CDN. When I generate pages should I put them into a generated folder straight away or should I be putting them into a folder similar to what this function is doing
(garden :styles-var 'vbn.styles/screen :output-to "css/garden.css") or is there some more trickier stuff I should be doing with filesets?
@grounded_sage generally you would put things in a
(tmp-dir!) then add that to the fileset
@flyboarder ok so I would put it into a
(tmp-dir!) then serve it from there during
dev and drop them into a
target folder when I run
@grounded_sage most people don't serve from one specific temp dir but instead from the classpath (or a subset like
public/) which can consist of multiple directories
I am trying to find a way in boot to write out files with 644 permission instead of 600, is this solvable in boot? My current strategy would be changing all the files in output dir of target with a shell command, is there a better way?
@erwin https://github.com/boot-clj/boot/issues/189 this might be of interest — I think a shell command at the end of the pipeline after putting it somewhere using
target is probably the path of least resistence
@erwin haha 😄 you can use
target and put another task behind it that just does the chmodding stuff in the target directory
Hello, I am building an uberjar just fine except it is missing my
(io/file (io/resources config.edn)) file. It works in dev, and after building
(aot pom uber jar) my config file ends up in
target/config.edn right next to the
target/my-uberjar.jar. What am I missing?
yes, but then I have a bash script that calls boot and I have this problem (thanks to Docker) more than once and it gets anoying to solve everything with another bash script ...
Not sure I understand... I was more thinking along the lines of
boot build && ./bin/fix-permissions
but still, my colleagues will end up saying: "see, leiningen is better", cannot let that happen
(comp (aot) (uber) (pom) (jar :main 'clojure.main) (sift :include [#"project.jar"]) (target))) which works ...
So the order is slightly different, and I don't use
sift. Will try that thanks. What is it for?
@erwin leiningen probably wouldn't be of help with that chmod stuff either (but not sure)
@nicolas the contents of the target directory are cleared before the fileset is written if I'm not mistaken
oh I see. (for sift). Not sure if that would make a difference then, besides not "polluting" my target dir.
(tried cleaning target, still fails:
Exception in thread "main" java.lang.IllegalArgumentException: Not a file: jar:file:/Users/.../target/clojure-backend.jar!/config.edn)
trying your suggestion now erwin
I am trying to clean up my own mess, can tryout a small project after that if you still run into problems
(it is not exactly a small project now - that's why I'd like to understand what happens)
(that's annoying - everything else is there: it prints my startup message, tries to read the file and fails)
(trying to read it with
(io/resources config.edn) now instead of
(io/file (io/resources config.edn)))
Yep I get aURL:
#object[java.net.URL 0x5549c970 "file:/Users/nha/.boot/cache/tmp/.../j97/fwjp2k/config.edn"]
It goes through my
-main, prints "i will read the file" and then dies with
Exception in thread "main" java.lang.IllegalArgumentException: Not a file: jar:file:/Users/.../target/clojure-backend.jar!/config.edn
Hi folks, we have a big mono repo for our backend, frontend and backend services. We’re starting to run into dependency hell, and I’m evaluating migrating to boot as an alternative to using something like https://github.com/jcrossley3/lein-modules I was wondering if there are any examples of something like this, especially setting up pods?
@micha sure, basically we need to define sub-projects that will share a portion of the repo but have isolated dependencies
they’d depend on a small number of core files, the conflicts are at the edges in the different targets
More precisely we just ran into an issue where we want to run a load-testing process that uses aleph, but we also use datomic and they conflict over netty with 2-way breakage depending on which version you use
especially when the conflict is a build or testing component (ie. not part of the production runtime)
like google closure, which depends on like 3 or 4 apache ones that conflict with other things
Would the multi-module setup come down to properly splitting your source-tree and internal deps so that you can add sets of non-conficting sources the class-path in separate tasks that spin their own pod?
"multi module" means a lot of different things, so it's hard to say one optimal way to do it
Makes more sense to hold everything together at the repo level until our deployment situation gets more complicated
Unless we’re able to build a big one that would take args and spin the appropriate module
would it be an option to let boot target task write files with a default permission, such that umask and the likes work?
@micha one thing I don’t get is how does the repl work with multiple pods? Say I want to run a backend and a service worker, both isolated and both with their own repl. Do I start boot multiple times and kick the repl task inside their pods?
the usecase is Jenkins awkwardness with docker. Jenkins (with docker in pipeline) does funky stuff with the users and it is just easier to make sure everything is at least world readable.
i think maybe boot could allow a configurable umask-like setting, but have you tried just chmod -R prior to feeding to jenkins?
Jenkins is a bit akward and I kinda need a workaround. Boot is not really the problem, but would be nice to have a bit of flexibility.
maybe I should just let it be, but I don't like needing different scripts just for Jenkins
@erwin the change would be pretty simple to make in boot, if you want to make a PR we can consider it
yes that would also work, I tried one just jet and Make did not like it (not sure why), as Make did like the
&& chmod -R a+r target
I will try this over the weekend and if it does work I can make a pull request, but I have the feeling I just have obscure requirements ...
the target task has an optimization to use hard links in the target dir when it can do so safely -- if you add the :mode option or whatever you'd want to not make hard links in that case
so if you chmod files in the target dir and those files are links you will be chmodding files in the cache
so there will be world readable files in the cache that you don't necessarily expect or know about
yes, maybe a midway solution that gives you the option to forcibly switch back to hardlinks if you really want it?
@micha Is the boot cache a random dir under $TEMP on a per-run basis? E.g.: is there ever a chance that concurrent Boot builds’ caches might collide?
(We currently orchestrate multiple dependent lein builds via
make -j8 and are migrating to Boot.)
it's $BOOT_HOME/.cache, which befaults to ~/.boot/cache... i don't think there's collision potential tho
@micha This change could be a start for error handling improvements: https://github.com/boot-clj/boot/pull/532