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)
- # clj-together (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)
How do you pass a clojure deps alias in a dir-locals file to a shadow-cljs project. Here is what i'm trying and its not working
((nil . (
(cider-preferred-build-tool . shadow-cljs)
(cider-clojure-cli-aliass . "-A:dev") <-------
(cider-default-cljs-repl . shadow)
(cider-shadow-default-options . "dev")
(cider-shadow-watched-builds . ("dev" "cards"))
)))
@U0DJ4T5U1 cider-clojure-cli-aliass
should be cider-clojure-cli-aliases
and you should also omit the -A
.
So, something like
(cider-clojure-cli-aliases . ":dev")
should do the trick.
And actually, in your case, you probably want to use something like (cider-clojure-cli-global-options . "-A:dev")
since the cider-clojure-cli-aliases apply to my knowledge to starting the repl with clojure-cli
Check this for more info: https://docs.cider.mx/cider/cljs/shadow-cljs.html#using-shadow-cljs-with-deps-edn-and-custom-repl-initialization
Fro reference, there are several variables for Cider shadow-cljs https://practical.li/spacemacs/reference/cider/configuration-variables.html#ciderel
thanks @UFG0HRDC7 and @U05254DQM those suggestions worked, i'm embarrassed i didn't notice the typo in my original attempt.
No worries, not the first nor the last time someone (me included) typos something and wonders why it doesn’t work :)
I need a faster way to understand the code i'm putting in those dir-local files. i spend way to much time messing with them. I need to learn elisp and probably just stop using them in the way I am, or something.
I'm trying to start a cljs node repl and it opens up a cljs repl but fails when it tries to run (cider.piggieback/cljs-repl (cljs.repl.node/repl-env))
, with this stacktrace:
TypeError: Cannot read properties of undefined (reading 'error__GT_str')
at Socket.<anonymous> ([stdin]:89:38)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:285:11)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17)
does cider attempt to launch repls under a different user or in a different environment than the one emacs is running under? (on linux)
emacs does have a different exec-path
from the env of the launching shell, especially when started as a GUI frame not as a child of a terminal
I'm having issues with cider running figwheel-main with npm dependencies coming from webpack. It's not able to find node, installed via nvm. When I run the figwheel-main via clojure -m figwheel.main -b dev -r
it works fine. But running from the major mode in emacs returns
[Figwheel:SEVERE] Bundling command failed /usr/bin/env: 'node': No such file or directory
yeah. i’ve had issues with this in the past. in my init i had to add the nvm location to the exec-path.
you can test out by opening an eshell
buffer and typing which node
. If that doesn’t work no emacs child process will. You’ll need to add to the exec-path
so it can find node
exec-path is a variable defined in 'C source code'.
Its value is
("/Users/dan/.sdkman/candidates/java/current/bin/" "/Users/dan/bin/" "/opt/homebrew/bin/" "/opt/homebrew/sbin/" "/usr/local/bin/" "/usr/bin/" "/bin/" "/usr/sbin/" "/sbin/" "/opt/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3/libexec/emacs/27.2/aarch64-apple-darwin21.2.0/")
[truncated]
Documentation:
List of directories to search programs to run in subprocesses.
Each element is a string (directory name) or nil (try default directory).
By default the last element of this list is 'exec-directory'. The
last element is not always used, for example in shell completion
('shell-dynamic-complete-command').
not sure if nvm does something similar to sdkman there where java/current/bin
is on my exec-path
Thanks.
I remembered that doom actually lets you alter your env. So I ran doom env, but I didnt' realize that it was by frame. Restarting emacs after adding an environment file did the trick!