This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-17
Channels
- # announcements (3)
- # babashka (41)
- # beginners (118)
- # calva (4)
- # cider (22)
- # clj-kondo (4)
- # clj-on-windows (1)
- # cljtogether (1)
- # clojure (164)
- # clojure-europe (46)
- # clojure-filipino (1)
- # clojure-indonesia (1)
- # clojure-my (1)
- # clojure-nl (3)
- # clojure-sg (1)
- # clojure-spec (13)
- # clojure-uk (16)
- # clojurescript (18)
- # cloverage (3)
- # conjure (5)
- # core-async (8)
- # cursive (21)
- # datomic (4)
- # deps-new (15)
- # emacs (12)
- # expound (4)
- # fulcro (45)
- # graalvm (32)
- # jobs (1)
- # malli (5)
- # nextjournal (63)
- # off-topic (27)
- # other-languages (3)
- # pathom (27)
- # proletarian (1)
- # rdf (24)
- # re-frame (10)
- # reagent (9)
- # releases (2)
- # shadow-cljs (72)
- # spacemacs (4)
- # timbre (4)
- # tools-deps (29)
- # xtdb (4)
Pleased to announce an installation script for https://github.com/escherize/quick-question. Run the installation script (or install it on your own). Then you can use those beautiful interactive prompts (my favorites are autocomplete and multi-select) in your scripts. Here’s the installation script: https://asciinema.org/a/w0qaYpsSofJa2FQp21FlgYith?i=1
Thanks to a few of you in here who helped me get this together. @U04V15CAJ of course, and also @U11BV7MTK 😎
Very nice. btw I think the install script need to be changed to
(fs/exists? ".qq") # was (fs/exists? "quick-question")
Concerning Tasks - I don't understand the difference between :init
and :enter
- both seem to be executed before each individual task? How would one do a init-before-all
?
Is there a difference then between tasks that are executed via :depends
and run
?
Ok - but :init should still be called just once? Calling this
{:paths [src]
:tasks {:init (println "INIT")
:enter (let [task-name (:name (current-task))]
(println "Entering:" task-name))
integrate {:depends [jenkins:lovoonl-backend]}
jenkins:lobeda-backend {:task (println "")}
jenkins:lobeda-ui {:task (println "")}
-jenkins:lobeda-ui-and-backend {:depends [jenkins:lobeda-backend jenkins:lobeda-ui]}
-source:lovoonl-frontend {:task (do)}
source:lovoonl-frontend {:task (do
(run '-jenkins:lobeda-ui-and-backend {:parallel true})
(run '-source:lovoonl-frontend))}
jenkins:lovoonl-frontend {:task (do
(run 'source:lovoonl-frontend))}
jenkins:lovoonl-backend {:depends [jenkins:lovoonl-frontend]}}}
via bb --config lovoonl-orch_test.edn integrate
I get
INIT
Entering: jenkins:lovoonl-frontend
INIT
Entering: source:lovoonl-frontend
INIT
Entering: jenkins:lobeda-ui
Entering: jenkins:lobeda-backend
Entering: -jenkins:lobeda-ui-and-backend
INIT
Entering: -source:lovoonl-frontend
Entering: jenkins:lovoonl-backend
Entering: integrate
this has probably been in here for a while but since init usually only contains functions and constants, nobody noticed
Can I use grasp from bb as a library? I guess I would need to use st. instead of clojure.spec.alpha
?
sorry for being so lazy, st. = something
I will use the binary distribution then
Eh, sorry, where do I get the mac graps binary? I expected it here https://app.circleci.com/pipelines/github/borkdude/grasp/44/workflows/1d97b342-64bb-44e2-ade5-9ee24f1a7d90/jobs/161/artifacts
https://app.circleci.com/pipelines/github/borkdude/grasp?branch=master is still showing the latest build as 3 months ago?
https://164-308011504-gh.circle-artifacts.com/0/release/grasp-0.0.1-SNAPSHOT-macos-amd64.zip
i’m having issues with cider-jack-in-clj
and bb.edn
with dependencies defined in a task:
{:paths ["script"]
:tasks
{pre-push
{:extra-deps
{org.clojure/tools.namespace
{:git/url ""
:git/sha "a13b037215e21a2e71aa34b27e1dd52c801a2a7b"}}}}}
when i run cider-jack-in-clj
and choose babashka
it works, but when i’m evaluating a ns with deps from tasks it fails with Could not find namespace
.
moving dependencies from :tasks to the top level :deps works, but i wonder if there’s any other solution?hey! thanks for the quick reply!
i’ve just updated original snippet of bb.edn
. It has everything to reproduce the issue.
I’m evaluating (with cider-eval-buffer
) script/pre-push.cljc
with the following content:
(ns pre-push
(:require
[ :as io]
[clojure.tools.namespace.find :as ns-find]
[clojure.tools.namespace.parse :as ns-parse]))
(defn parse-ns-decl [ns-decl]
{:ns (ns-parse/name-from-ns-decl ns-decl)
:deps (ns-parse/deps-from-ns-decl ns-decl)})
(comment
(->> "./src/backend"
io/file
ns-find/find-ns-decls-in-dir
(map parse-ns-decl))
)
This makes sense. Yeah, you need to either add the deps on the top level, or evaluate (babashka.deps/add-deps '{:deps { ... }})
once in the REPL with the deps
thank you! ps: babashka rocks, it awesome to have running repl in milliseconds! 🙂