This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-27
Channels
- # admin-announcements (1)
- # aws-lambda (2)
- # beginners (48)
- # boot (231)
- # capetown (1)
- # cider (35)
- # cljs-dev (25)
- # cljsrn (74)
- # clojure (273)
- # clojure-austin (2)
- # clojure-berlin (5)
- # clojure-hk (1)
- # clojure-poland (1)
- # clojure-russia (50)
- # clojure-spec (63)
- # clojure-uk (58)
- # clojurescript (51)
- # cursive (5)
- # datomic (39)
- # defnpodcast (3)
- # dirac (13)
- # editors (6)
- # emacs (3)
- # hoplon (86)
- # jobs (2)
- # lein-figwheel (1)
- # liberator (3)
- # off-topic (10)
- # om (113)
- # onyx (34)
- # protorepl (29)
- # re-frame (2)
- # reagent (8)
- # remote-jobs (1)
- # ring (4)
- # test-check (42)
- # untangled (31)
- # yada (2)
@micha, thanks for the pointer, I'll check that out
Yo! Was playing around with using this for compiling my protobuf files, and it seems it needs the protobuf.jar
on boot’s classpath to have javac complete the compilation without errors - whats the correct way to add a .jar to boot’s classpath? I have the protobuf.jar laying around in the same folder as my .proto files, the same folder from which I’m running boot
https://github.com/aJchemist/boot-protobuf
@torgeir: the boot.pod/add-classpath function will do it
is it possible to run a .clj
file with boot, analogous to lein run -m clojure.main script.clj
?
just found this https://github.com/boot-clj/boot/wiki/Boot-for-Leiningen-Users#lein-run
but what if my script doesn’t have a NS declaration?
@anmonteiro: load-file
maybe?
maybe, I’ll try
yeah, just works
much more flexible than Lein, awesome
@oahner: if you put #!/usr/bin/env boot
at the top of the file, say myscript.boot
, you can then do boot ./myscript.boot
the shebang is used internally in boot so it knows thedifference between myscript
the script and myscript
the task name
wouldn't it be possible to ignore the shebang on windows and assume it's a script if the argument is a file?
then you end up with unexpected behavior when you create a file with the same name as a task
then, how about, verify that there's a valid shebang, but don't look it up on the filesystem
my ideal workflow is starting with a repl, coding a something.boot, then when I'm satisfied with it from the repl, have a way to run it from the command line
making the shebang machinery in boot smarter is problematic because there are different limitations on unix platforms
modifying boot.main/shebang? to return true if a) platform is win32 and b) file starts with #! would solve this (on windows)
also another interesting thing is that the last segment of the path, if it contains a dot then it can't be a task
https://www.gnu.org/software/guile/manual/html_node/The-Meta-Switch.html#The-Meta-Switch
but if someone is in cygwin, then they're on windows, but shebang machinery is available
OPTS: -a --asset-paths PATH Add PATH to set of asset directories.
-b --boot-script Print generated boot script for debugging.
-B --no-boot-script Ignore boot script in current directory.
-c --checkouts SYM:VER Add checkout dependency (eg. -c foo/bar:1.2.3).
-C --no-colors Remove ANSI escape codes from printed output.
-d --dependencies SYM:VER Add dependency to project (eg. -d foo/bar:1.2.3).
-e --set-env KEY=VAL Add KEY => VAL to project env map.
-h --help Print basic usage and help info.
-o --offline Don't attempt to access remote repositories.
-P --no-profile Skip loading of profile.boot script.
-r --resource-paths PATH Add PATH to set of resource directories.
-q --quiet Suppress output from boot itself.
-s --source-paths PATH Add PATH to set of source directories.
-t --target-path PATH Set the target directory to PATH.
-T --no-target This option is ignored.
-u --update Update boot to latest release version.
-U --update-snapshot Update boot to latest snapshot version.
-v --verbose More error info (-vv more verbose, etc.)
-V --version Print boot version info.
yeah about the option, there is an issue open
I haven't started working on it yet though, but it would solve a cider
issue as well
checking
uhm, thought I opened one
if you implement the first part of this ticket (execute arbitrary forms), then loading a file is just one load-file away
yes true that
I'll try my best, I have been very busy lately
great that's awesome
well if you have boot.core
on the class path I think you can right Micha?
@micha how does the boot shebang line #!/usr/bin/env boot
work? i assumed it was like running boot /path/to/file.boot
, but when i run that command, it says that /path/to/file.boot
isn't a task
@dave yeah it's convoluted, there are a lot of edge cases that need to be handled with clever hacks
this machinery is needed because you need a mutable place in which to bootstrap yourself
but when you create pods you have a lot more control over the environment when you construct the pod
so you don't need to change things from inside the pod, you can just construct it the way you want it to begin with
the core pod isn't like that because boot neds to create it for you before your code can run
for now I can eval stuff in script.boot via vim-fireplace by doing (use 'boot.core) and then running that file later on with 'boot ./script.boot'
the extraneous (use 'boot.core) doesn't seem to break anything when we're already in boot.user instead of user
it's only when you're evaluating expressions in other pods that you might not be able to do that
yeah it's useful when you're making build tasks, so you can isolate your task's dependencies frorm the project
reason number 328 to use boot: https://github.com/technomancy/leiningen/blob/2.6.1/src/leiningen/test.clj#L76
hehe yes, hooks
The Marke of The LifeCycle
and test.check, it seems https://www.bountysource.com/issues/36003731-leiningen-test-hooks-clash-with-test-check-0-9-0
Oh that's good I am not using lein
...that sounds like my issue with tools.reader
some time ago...classpath clashes all the way coming from I-do-not-remember-which dependency
i work on nodejs stuff at work a lot, and man, maven is way easier to debug than npm for me
yeah pods don't even compare to anything out there, so that's the edge we have 🙂
so, i heard about something that i consider unconventional, that people use boot to launch their applications in production as well. at first i thought that was crazy, but it actually makes a lot of sense -- it brings your production and build environment closer together, and brings a lot of easy flexibility. do people do this a lot ? i don't see a lot of examples of people using boot to handle their production environment as well
@lmergen: we did it a lot when we were deploying to docker containers, but recently have been just making uberjars
@lmergen: did that for a whole week until my server ran low on ram, switched to wildfly and wars
it's nice being able to just drop a jar in a folder and let the application server just reload it
one thing that is nice about using boot as the entry point for the application is that you can use pods in your application
one thing that i would really want is to define my production main function as a task right within my build.boot, just like you define all other tasks.
@oahner: does wildfly help with things that are not HTTP services? (e.g. what's called a worker in Procfiles)
@micha re: color of output in REPL - if it's REPL-y, why don't I see it in lein repl
? still wondering
@martinklepsch: I haven't actually had a need for long running background services yet, but technically it just runs your jar's entry point and manages its lifecycle, it should work the same for non-HTTP processes
https://github.com/boot-clj/boot/blob/master/boot/core/src/boot/task/built_in.clj#L384-L390
that's where the repl
task is figuring out the options to pass to the REPLy nREPL client
@lmergen: thanks to Danielsz, I added that in lambone 😉 https://github.com/Lambda-X/lambone/blob/master/resources/leiningen/new/lambone/common/dev/boot.clj#L104
ignore the <%
part ..it is the selmer template
pretty straightforward I guess