Feedback welcome: https://github.com/babashka/babashka/discussions/765#discussioncomment-564820
Just switched portal to using bb as my task runner https://github.com/djblue/portal/commit/39144dbe520783e18ec13440c70844b3c207d9b5. This is so much better than make, thanks @borkdude!
You might be interested in my https://github.com/turtlequeue/setup-babashka
to install babashka in CI.
This supports more platforms, you can pin the babashka version and it uses the github api to cache bb
@nha Just switch to using your github action, thanks! https://github.com/djblue/portal/runs/2265646639
same in Pathom 😁
Happy to hear this! 😄
@nha about it, is there a way to use a development (from a branch) version of babashka? or plans to support it?
I've never used a development branch. How would I do this? I don't see why I could not support it. Feel free to open an issue @wilkerlucio
Maybe you could support setting a custom download link? Then you could get a link from #babashka-circleci-builds to set up a development version. But note that circleci links are only valid for 30 or so days.
I see, I wasn't aware of these CI builds. Yes I can do that.
Awesome :)
It was really nice how I could just directly require my existing scripts and just call them :awesome:
@wilkerlucio let's talk in #babashka-sci-dev as this is currently heavily in progress and not something that's ready yet
Note that portal only uses the bb -m foo/bar
functionality, the :tasks
thing might take longer before it's fully fleshed out
but it's great that you are giving it a thorough try already :)
yeah, sure, that's why WIP 🙂 glad to keep testing it out until its fully shaped
A few remarks:
(require 'tasks)
unfortunately you have to write (require (quote tasks))
because it's EDNand this:
(shell "PATHOM_TEST=true clojure -A:test:test-deps")
doesn't work like you expect, I think you need to prepend bash -c
in front of it, since you are using bash syntax herewe could support (shell {:extra-env {"PATHOM_TEST" "true"}} ...)
gotccha, gonna change the test
about the require, I tested and it does work currently, is that something is going to change?
shell extensions look nice
well, I'm surprised it works, let's put it like that, I'm going to try it myself soon
user=> (edn/read-string "(require '[clojure.set :as set])")
(require ' [clojure.set :as set])
user=> (eval (edn/read-string "(require '[clojure.set :as set])"))
Syntax error compiling at (REPL:1:1).
Unable to resolve symbol: ' in this context
maybe sci accept its by accident
not sure whats different, but I can do:
wilkerlucio@Wilkers-MacBook-Air pathom3 % bb run format-check
=> cljstyle check src test
no errors
(and the log printing means its loading and executing my task fn)
ah, I see yeah, this works by accident, but this might actually be a feature
since what happens: it's parsed as EDN but then it's printed back in an expression which is then evaluated again as code, I think