This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-05
Channels
- # announcements (7)
- # babashka (61)
- # beginners (146)
- # cider (4)
- # clj-kondo (25)
- # cljsrn (29)
- # clojars (30)
- # clojure (30)
- # clojure-australia (17)
- # clojure-europe (43)
- # clojure-italy (16)
- # clojure-nl (2)
- # clojure-spec (13)
- # clojure-sweden (7)
- # clojure-uk (8)
- # clojurescript (38)
- # cursive (12)
- # datomic (42)
- # defnpodcast (2)
- # dirac (1)
- # events (5)
- # fulcro (5)
- # graalvm (43)
- # graphql (11)
- # helix (6)
- # jackdaw (13)
- # jobs (4)
- # lambdaisland (8)
- # malli (12)
- # off-topic (83)
- # pathom (9)
- # podcasts-discuss (2)
- # re-frame (6)
- # reagent (3)
- # reitit (8)
- # remote-jobs (1)
- # shadow-cljs (40)
- # vim (21)
morning
Good morning.
I have a bunch of very very common project-related command lines that I run all the time. Things like start a remote REPL etc etc. I don't want to commit those to git because they're relevant only to my setup. Is this something that babashka tasks would be useful somehow?
@orestis babashka tasks is more like a replacement for makefiles than let's say global bash aliases
My laziness (and part of the reason I use fish) will still probably hit up arrow 10 times 😄
bash has implemented readline which can be set to understand Emacs or Vi bindings, and in emacs, C-r
is incremental search backwards.
On fish you write some characters and then you can: use C-r
for search backwards or simply press the up arrow.
I have thought about global bb tasks, but the problem there might be: - bb tasks are now project/directory specific and they can depend on each other like in make - if we could merge tasks from the home directory, this could result in a weird mix of global and local dependencies? and broken tasks in CI if you forget that something is coming from your home dir?
Can I point bb to a specific tasks file? Or does it always default to the working directory? I could think of a global alias that invokes bb tasks on my home dir.
I like bb tasks mainly for the memory help: afaik, if you invoke it with no args it will show you the available tasks.
Maybe I should just allow bb global tasks and if people depend on their home tasks in a project, they should just deal with it themselves?
@orestis Let me experiment with global tasks. Are you willing to test a version when I have one?
I considered using babashka tasks for building cljs and running a clj server but in the end clj -A:build-client && clj -A:serve
is simpler ... is there a 5 task rule?
One of the points of tasks is that clj -A:build-client && clj -A:serve
is something you have to remember. With bb tasks
you get an overview of tasks + descriptions. So after a month or two when you come back to this project, you see:
$ bb tasks
The following tasks are available:
serve Builds CLJS sources and launches server
instead of reading through your deps.edn
trying to find out what are the valid combinations of aliases, main fns and exec fns.
For this reason people often make Makefiles or shell scripts, but now you can do it with bb
as well.btw @raymcdermott the #defnpodcast is really picking up steam again, I'm happy to see this
@borkdude wow I didn't expect this to turn into a proper project for you! I have to confess I don't even have babashka installed ATM 🙂 I'm keeping my eye on it and continuously assessing the various usefulness, but sitting down and a) making it required installation for devs and CI and b) actually going through our existing bash scripts to convert them isn't high on my priorities right now.
As far as my original question was, pointing to a dedicated bb.edn file is exactly what I want. I can then deal with the fallout myself e.g. if I need to use local directories or relative to the bb.edn file etc I can do that...