This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-28
Channels
- # announcements (5)
- # babashka (7)
- # beginners (101)
- # biff (9)
- # calva (46)
- # cider (6)
- # clj-yaml (2)
- # cljsrn (13)
- # clojure (11)
- # clojure-europe (43)
- # clojure-nl (13)
- # clojure-norway (22)
- # clojurescript (20)
- # conjure (1)
- # cursive (7)
- # data-science (2)
- # datomic (26)
- # emacs (38)
- # graphql (27)
- # gratitude (5)
- # hoplon (8)
- # hugsql (22)
- # humbleui (2)
- # hyperfiddle (6)
- # introduce-yourself (8)
- # joyride (3)
- # lsp (79)
- # malli (6)
- # nbb (67)
- # portal (16)
- # rdf (27)
- # reagent (42)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (36)
- # test-check (17)
- # tools-deps (1)
- # xtdb (15)
hello folks, I’m trying to create a cider addition for clojure-cli to run aliases if present in the deps.edn, pretty much what is already available for shadow-clj builds
(defun cider--deps-parse-aliases (hash)
(let* ((builds (when (hash-table-p hash)
(gethash :aliases hash)))
(build-keys (when (hash-table-p builds)
(hash-table-keys builds))))
(append build-keys '(:none))))
(defun cider--deps-get-aliases ()
(let ((deps-edn (concat (clojure-project-dir) "deps.edn")))
(when (file-exists-p deps-edn)
(with-temp-buffer
(insert-file-contents deps-edn)
(let ((hash (car (parseedn-read '((map . identity))))))
(cider--deps-parse-aliases hash))))))
(defun cider-get-deps-aliases ()
(interactive)
(let ((options (completing-read "Select alias to run: "
(cider--deps-get-aliases))))))
you’ll need to figure out how this fits into the jack in process overall. Presumably you only ever want to do this when its a deps.edn project. Sometimes there can be multiple so you might have to check the var that sets a preferred build tool. What do we do if there is no preferred build tool and a project.clj file and a deps.edn file. If the clojure-cli-aliases
defvar (forget the exact title) is set, do you offer this? Presumably not. But if that is set, can you supply a prefix to override it? If so, do they combine or completely override.
Build this locally, iron out the kinks, and then PR or open an issue with this proposed strategy and iron out the decision points in the issue then implement
all valid points
[5:19 PM] will try to figure out the happy path first, to see If i am capable of building this and then work through the branches
[5:20 PM] I know that leiningen needs the with-profile
args
[5:20 PM] and I now that theres the prefered build tool var
[5:21 PM] And I think before the jack-in process if prefered build tool is nil there’s a selection which kind of process you want so this will be set