This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-21
Channels
- # adventofcode (27)
- # announcements (2)
- # babashka (1)
- # beginners (111)
- # calva (11)
- # cider (82)
- # clara (6)
- # clojure (44)
- # clojure-dev (5)
- # clojure-europe (27)
- # clojure-nl (5)
- # clojure-spec (3)
- # clojure-uk (3)
- # clojurescript (29)
- # core-async (5)
- # cursive (4)
- # datalevin (1)
- # datomic (39)
- # exercism (4)
- # figwheel-main (1)
- # fulcro (32)
- # graalvm (7)
- # gratitude (1)
- # integrant (4)
- # jobs (1)
- # lein-figwheel (3)
- # leiningen (4)
- # lsp (3)
- # luminus (3)
- # meander (2)
- # nextjournal (1)
- # off-topic (10)
- # other-languages (26)
- # pathom (14)
- # polylith (9)
- # re-frame (16)
- # remote-jobs (1)
- # shadow-cljs (4)
- # specter (2)
- # sql (6)
- # timbre (2)
- # tools-build (12)
- # xtdb (9)
is there a quick way to remove anything that no longer has a definition from the active namespace? I was using the namespace browser and noticed some fn I deleted was still present in the namespace. In the namespace browser, hitting s
takes me to the definition of the absent function which is a blank line now.
cider-undef
function will remove a function definition from the running REPL.
Either call this with the cursor on the function name or if function is already deleted then it prompts for a function name.
If there are lots of deleted functions in the REPL, I usually stop/start the REPL process.
I am wondering if I am missing a workflow step here as well. Typically I write some stuff, and either evaluate the def or defn that I just made ad hoc with C-x C-e
or I periodically do something like C-c C-k
. Am I doing things wrongly?
I don't really need to remove this function that has no definition in the source file of course, but I feel like I should in case it is called accidentally or something
This is the most annoying when you remove a test. But look up remove-ns to clobber a whole namespace and there are some other helpful ones
Thanks I think removing the ns and then just loading the file again should work fine for me at the moment.
Hi there! I have paredit
enabled in my cider buffer, so when I try to enter a form and open a set of parenthesis, the closing paren gets added automatically, which makes it hard for me to write out a more elaborate set of forms since pressing enter
evals the form
yeah that's understandable. What i've done is swap the send form and enter newline keybindings
("RET" . cider-repl-newline-and-indent)
("C-j" . cider-repl-return)
Getting used to this is awesome. return always enters a newline and c-j sends the formanother thing that you could do is get used to using comment forms in your regular text buffers. There are two interactions that make this nice: • eval current form will eval whatever you are editing and show the result in-line • send form to repl will plop that form into the repl buffer just as if you had typed it there. This is my preferred way to work
If that sounds good to you the following customizations are useful
(setq cider-invert-insert-eval-p t)
(setq cider-switch-to-repl-on-insert nil)
(setq clojure-toplevel-inside-comment-form t)
Ensure that sending forms to the repl automatically evaluates them, doesn't put the cursor in the repl buffer, and treats top level forms in comment forms as top level formsThis is the way @U1KFUC2NA - (comment ...)
in your namespace. 👍
Anyone on latest CIDER seeing an issue regarding clojure.instant/thread-local-utc-date-format
? Still in the formative stages of looking at this, so no easy repro yet
Caused by: java.lang.RuntimeException: Unable to resolve var: clojure.instant/thread-local-utc-date-format in this context
Very small repro case can be found here: https://github.com/dpassen/cider-doo-repro
Also getting this
This fixes it for me, can you verify? [mx.cider/enrich-classpath #_"Please add this below the lein-doo vector. Please make sure the version is the same that cider would inject" "1.5.0"] (this works, but it's better to not patch things by hand; simply upgrade cider as mentioned below)
I strongly believe it's that as I was somewhat familiar with the issue and could repro the issue + verify its fix. It's now on cider master https://github.com/clojure-emacs/cider/pull/3105 There will be a MELPA snapshot auto-generated within a few hours. cc @U06BQ07JS @U011T61C1V4
Likewise thanks for the accurate repro, happy to have fixed this fast FYI, what the enrich-classpath plugin does is adding Java sources (for the JDK itself + 3rd party deps) so that cider's ide-like functionality can work for Java too. Would much appreciate if you can give it a spin, try jump-to-definition for a Java class for example
awesome! feel free to keep an eye on it, feedback appreciated I reckon that by keeping a codebase free of reflection warnings you can help these features work
lein update-in :dependencies conj \[nrepl/nrepl\ \"0.9.0\"\] -- update-in :dependencies conj \[cider/piggieback\ \"0.5.2\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.27.4\"\] -- update-in :plugins conj \[mx.cider/enrich-classpath\ \"1.5.1\"\] -- update-in :middleware conj cider.enrich-classpath/middleware -- repl :headless :host localhost
still results in that error in my repro repoThanks, can repro Looks like one of those wicked lein problems. At least we know a workaround: https://clojurians.slack.com/archives/C0617A8PQ/p1640113595395100?thread_ts=1640101913.375900&cid=C0617A8PQ I'll see the best way to fix this, could be https://github.com/bensu/doo/pull/205 , or maybe there's something to be improved in the Fipp library
Fix on its way https://github.com/clojure-emacs/cider/issues/3106, as mentioned the 'manual' fix is ok for now
Is there currently anything in Cider or an emacs package that autogenerates namespace files? I am not talking about the repl, i.e. in-ns
, but rather if I want to create the ns
that it generates the path src/foo/bar/biz.clj
with a file already containing (ns
.
I noticed that when I installed the LSP layer for spacemacs, when I create a new file like src/foo/bar/biz.clj
it would sometimes add the ns
form for me
I'm not sure whether that's the lsp-mode package or something else that is enabled between the interaction of the lip-layer and clojure-layer
LSP does add a namespace by default when creating a new Clojure file. I believe clj-refactor also does this too if it's enabled.
yes clj-refactor.el does it as well https://github.com/clojure-emacs/clj-refactor.el/blob/363b95c5d2855abc93ac011e9adc778cf7a773e5/clj-refactor.el#L55-L59
I mention this conflict https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#refactorings and how to solve it
I'm running into a weird thing - I just restarted my repl and I got a FileNotFound exception while trying to build my classpath. Here's what I've tried in order:
1. deleted .cpcache
and restarted the repl
2. verified that the dependency in question was present in .m2
cache
3. started a clj
repl in the project directory and successfully required
the dep
4. deleted the target
directory out of paranoia
5. completely killed emacs and restarted it
On each step after a cider-jack-in
I get the same classpath exception
#error {
:cause "Could not locate aero/core__init.class, aero/core.clj or aero/core.cljc on classpath."
:via
[{:type clojure.lang.Compiler$CompilerException
:message "Syntax error compiling at (prj/ws_proxy/config.clj:1:1)."
:data #:clojure.error{:phase :compile-syntax-check, :line 1, :column 1, :source "flureehub/ws_proxy/config.clj"}
:at [clojure.lang.Compiler load "Compiler.java" 7652]}
{:type java.io.FileNotFoundException
:message "Could not locate aero/core__init.class, aero/core.clj or aero/core.cljc on classpath."
:at [clojure.lang.RT load "RT.java" 462]}]
:trace
[[clojure.lang.RT load "RT.java" 462],,,]]
Oh, and the dep is definitely present under the :deps
key in my deps.edn
file:
{:deps {aero/aero {:mvn/version "1.1.6"}},,,} ,,,}
/run/current-system/sw/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0-beta4"} refactor-nrepl/refactor-nrepl {:mvn/version "3.1.0"} cider/cider-nrepl {:mvn/version "0.27.2"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:dev:build:cider/nrepl
Ah! New data: when I comment out the usage of the particular dependency, it blows up on the next one. So I don't think it's pulling in any of my deps.
/run/current-system/sw/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0-beta4"} refactor-nrepl/refactor-nrepl {:mvn/version "3.1.0"} cider/cider-nrepl {:mvn/version "0.27.2"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -Spath -P -M:dev:build:cider/nrepl
what does that tell you?that should be the classpath being used
When I run that from the cli it just runs for 2 seconds and then exits with no output
then, get rid of the -P, that might prevent -Spath from working
Alright, that has produced something:
dev:test:src:resources:/home/user/.m2/repository/cider/cider-nrepl/0.27.2/cider-nrepl-0.27.2.jar:/home/user/.gitlibs/libs/io.github.clojure/tools.build/0361ddef468691af4a369fbc5338abf98b2b59ba/src/main/clojure:/home/user/.gitlibs/libs/io.github.clojure/tools.build/0361ddef468691af4a369fbc5338abf98b2b59ba/src/main/resources:/home/user/.gitlibs/libs/io.github.seancorfield/build-clj/9b8e09bf819a0e30b7e972abaafa8ce1a64b9a36/src:/home/user/.m2/repository/nrepl/nrepl/0.9.0-beta4/nrepl-0.9.0-beta4.jar:/home/user/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar:/home/user/.m2/repository/org/clojure/tools.namespace/1.2.0/tools.namespace-1.2.0.jar:/home/user/.m2/repository/refactor-nrepl/refactor-nrepl/3.1.0/refactor-nrepl-3.1.0.jar:/home/user/.m2/repository/org/clojure/tools.deps.alpha/0.12.1090/tools.deps.alpha-0.12.1090.jar:/home/user/.gitlibs/libs/io.github.seancorfield/build-uber-log4j2-handler/8d493a82b91dd32bd35735ad33d76f7c77b1f393/src:/home/user/.m2/repository/slipset/deps-deploy/0.2.0/deps-deploy-0.2.0.jar:/home/user/.m2/repository/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar:/home/user/.m2/repository/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar:/home/user/.m2/repository/org/clojure/java.classpath/1.0.0/java.classpath-1.0.0.jar:/home/user/.m2/repository/org/clojure/tools.reader/1.3.6/tools.reader-1.3.6.jar:/home/user/.m2/repository/com/cognitect/aws/api/0.8.536/api-0.8.536.jar:/home/user/.m2/repository/com/cognitect/aws/endpoints/1.1.12.93/endpoints-1.1.12.93.jar:/home/user/.m2/repository/com/cognitect/aws/s3/814.2.991.0/s3-814.2.991.0.jar:/home/user/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/home/user/.m2/repository/org/apache/maven/maven-core/3.8.3/maven-core-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-resolver-provider/3.8.3/maven-resolver-provider-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.6.3/maven-resolver-api-1.6.3.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-connector-basic/1.6.3/maven-resolver-connector-basic-1.6.3.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-impl/1.6.3/maven-resolver-impl-1.6.3.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-spi/1.6.3/maven-resolver-spi-1.6.3.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-transport-file/1.6.3/maven-resolver-transport-file-1.6.3.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-transport-http/1.6.3/maven-resolver-transport-http-1.6.3.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.6.3/maven-resolver-util-1.6.3.jar:/home/user/.m2/repository/org/clojure/data.xml/0.2.0-alpha6/data.xml-0.2.0-alpha6.jar:/home/user/.m2/repository/org/clojure/tools.cli/1.0.206/tools.cli-1.0.206.jar:/home/user/.m2/repository/org/clojure/tools.gitlibs/2.4.172/tools.gitlibs-2.4.172.jar:/home/user/.m2/repository/org/apache/logging/log4j/log4j-core/2.16.0/log4j-core-2.16.0.jar:/home/user/.m2/repository/clj-commons/pomegranate/1.2.1/pomegranate-1.2.1.jar:/home/user/.m2/repository/org/slf4j/slf4j-nop/2.0.0-alpha5/slf4j-nop-2.0.0-alpha5.jar:/home/user/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar:/home/user/.m2/repository/s3-wagon-private/s3-wagon-private/1.3.4/s3-wagon-private-1.3.4.jar:/home/user/.m2/repository/com/cognitect/http-client/1.0.110/http-client-1.0.110.jar:/home/user/.m2/repository/org/clojure/core.async/1.5.644/core.async-1.5.644.jar:/home/user/.m2/repository/org/clojure/data.json/1.0.0/data.json-1.0.0.jar:/home/user/.m2/repository/org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar:/home/user/.m2/repository/com/google/inject/guice/4.2.2/guice-4.2.2-no_aop.jar:/home/user/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar:/home/user/.m2/repository/org/apache/maven/maven-artifact/3.8.3/maven-artifact-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-builder-support/3.8.3/maven-builder-support-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-model/3.8.3/maven-model-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-model-builder/3.8.3/maven-model-builder-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-plugin-api/3.8.3/maven-plugin-api-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-repository-metadata/3.8.3/maven-repository-metadata-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-settings/3.8.3/maven-settings-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/maven-settings-builder/3.8.3/maven-settings-builder-3.8.3.jar:/home/user/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.jar:/home/user/.m2/repository/org/codehaus/plexus/plexus-classworlds/2.6.0/plexus-classworlds-2.6.0.jar:/home/user/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.1.0/plexus-component-annotations-2.1.0.jar:/home/user/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26.jar:/home/user/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.jar:/home/user/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.plexus/0.3.5/org.eclipse.sisu.plexus-0.3.5.jar:/home/user/.m2/repository/org/apache/httpcomponents/httpclient/4.5.12/httpclient-4.5.12.jar:/home/user/.m2/repository/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar:/home/user/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.30/jcl-over-slf4j-1.7.30.jar:/home/user/.m2/repository/org/clojure/data.codec/0.1.0/data.codec-0.1.0.jar:/home/user/.m2/repository/org/apache/logging/log4j/log4j-api/2.16.0/log4j-api-2.16.0.jar:/home/user/.m2/repository/org/apache/maven/resolver/maven-resolver-transport-wagon/1.3.3/maven-resolver-transport-wagon-1.3.3.jar:/home/user/.m2/repository/org/apache/maven/wagon/wagon-http/3.3.4/wagon-http-3.3.4.jar:/home/user/.m2/repository/org/apache/maven/wagon/wagon-provider-api/3.3.4/wagon-provider-api-3.3.4.jar:/home/user/.m2/repository/org/tcrawley/dynapath/1.0.0/dynapath-1.0.0.jar:/home/user/.m2/repository/org/slf4j/slf4j-api/2.0.0-alpha5/slf4j-api-2.0.0-alpha5.jar:/home/user/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar:/home/user/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.713/aws-java-sdk-s3-1.11.713.jar:/home/user/.m2/repository/com/amazonaws/aws-java-sdk-sts/1.11.713/aws-java-sdk-sts-1.11.713.jar:/home/user/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.10.1/jackson-databind-2.9.10.1.jar:/home/user/.m2/repository/org/springframework/build/aws-maven/4.8.0.RELEASE/aws-maven-4.8.0.RELEASE.jar:/home/user/.m2/repository/org/eclipse/jetty/jetty-client/9.4.44.v20210927/jetty-client-9.4.44.v20210927.jar:/home/user/.m2/repository/org/eclipse/jetty/jetty-http/9.4.44.v20210927/jetty-http-9.4.44.v20210927.jar:/home/user/.m2/repository/org/eclipse/jetty/jetty-util/9.4.44.v20210927/jetty-util-9.4.44.v20210927.jar:/home/user/.m2/repository/org/clojure/tools.analyzer.jvm/1.2.1/tools.analyzer.jvm-1.2.1.jar:/home/user/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/home/user/.m2/repository/com/google/guava/guava/25.1-android/guava-25.1-android.jar:/home/user/.m2/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar:/home/user/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar:/home/user/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar:/home/user/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/home/user/.m2/repository/org/apache/maven/wagon/wagon-http-shared/3.3.4/wagon-http-shared-3.3.4.jar:/home/user/.m2/repository/com/amazonaws/aws-java-sdk-core/1.11.713/aws-java-sdk-core-1.11.713.jar:/home/user/.m2/repository/com/amazonaws/aws-java-sdk-kms/1.11.713/aws-java-sdk-kms-1.11.713.jar:/home/user/.m2/repository/com/amazonaws/jmespath-java/1.11.713/jmespath-java-1.11.713.jar:/home/user/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.10/jackson-annotations-2.9.10.jar:/home/user/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.10/jackson-core-2.9.10.jar:/home/user/.m2/repository/ch/qos/logback/logback-classic/1.0.12/logback-classic-1.0.12.jar:/home/user/.m2/repository/org/eclipse/jetty/jetty-io/9.4.44.v20210927/jetty-io-9.4.44.v20210927.jar:/home/user/.m2/repository/org/clojure/core.memoize/1.0.253/core.memoize-1.0.253.jar:/home/user/.m2/repository/org/clojure/tools.analyzer/1.1.0/tools.analyzer-1.1.0.jar:/home/user/.m2/repository/org/ow2/asm/asm/5.2/asm-5.2.jar:/home/user/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/home/user/.m2/repository/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar:/home/user/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:/home/user/.m2/repository/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar:/home/user/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/home/user/.m2/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar:/home/user/.m2/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar:/home/user/.m2/repository/org/jsoup/jsoup/1.12.1/jsoup-1.12.1.jar:/home/user/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.6.7/jackson-dataformat-cbor-2.6.7.jar:/home/user/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/user/.m2/repository/joda-time/joda-time/2.8.1/joda-time-2.8.1.jar:/home/user/.m2/repository/software/amazon/ion/ion-java/1.0.2/ion-java-1.0.2.jar:/home/user/.m2/repository/ch/qos/logback/logback-core/1.0.12/logback-core-1.0.12.jar:/home/user/.m2/repository/org/clojure/core.cache/1.0.225/core.cache-1.0.225.jar:/home/user/.m2/repository/org/clojure/data.priority-map/1.1.0/data.priority-map-1.1.0.jar
{:deps {org.clojure/clojure {:mvn/version "1.10.3"}
juxt/clip {:mvn/version "0.27.0"}
aero/aero {:mvn/version "1.1.6"}
metosin/malli {:mvn/version "0.7.5"}
hato/hato {:mvn/version "0.8.2"}
;; AWS S3 API
com.cognitect.aws/api {:mvn/version "0.8.539"}
com.cognitect.aws/endpoints {:mvn/version "1.1.12.129"}
;; web server
http-kit/http-kit {:mvn/version "2.5.3"}
metosin/reitit {:mvn/version "0.5.15"}
compojure/compojure {:mvn/version "1.6.2"}
metosin/muuntaja {:mvn/version "0.6.8"}
metosin/jsonista {:mvn/version "0.3.5"}
metosin/ring-http-response {:mvn/version "0.9.3"}
;; logging
ch.qos.logback/logback-classic {:mvn/version "1.2.8"}}
:paths ["src" "resources"]
:aliases
{:dev
{:extra-paths ["dev", "test"]
:extra-deps {org.clojure/tools.namespace {:mvn/version "1.2.0"}}}
:test
{:extra-paths ["test" "test-resources"]
:extra-deps {com.cognitect/test-runner
{:git/url ""
:sha "dd6da11611eeb87f08780a30ac8ea6012d4c05ce"}}
:exec-fn cognitect.test-runner.api/test}
:build
{:deps {io.github.clojure/tools.build {:git/tag "v0.7.2" :git/sha "0361dde"}
io.github.seancorfield/build-clj {:git/tag "v0.6.3" :git/sha "9b8e09b"}}
:ns-default build}
:ancient
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core" "--skip=github-action"]}
:clj-kondo
{:extra-deps {clj-kondo/clj-kondo {:mvn/version "2021.12.19"}}
:main-opts ["-m" "clj-kondo.main" "--lint" "src" "--config" ".clj-kondo/config.edn"]}}}
I'd also look into which directory cider is running the command from. Is this a weird mono repo or have sub projects?
Nope, just a barebones deps.edn prj:
.
├── build.clj
├── deps.edn
├── dev
│ ├── dev.clj
│ └── user.clj
├── README.md
├── resources
│ ├── logback.xml
│ └── system-config.edn
└── src
└── prj
└── ws_proxy
├── api.clj
├── config.clj
├── main.clj
├── proxy.clj
└── server.clj
The weird thing is that clj just does everything fine - I can still build the project, load the project in a cli repl, tinker with it. It just fails to load all the deps when I cider-jack-in
. And that worked this morning!
{:deps {org.clojure/clojure {:mvn/version "1.10.3"}
juxt/clip {:mvn/version "0.27.0"}
aero/aero {:mvn/version "1.1.6"}
metosin/malli {:mvn/version "0.7.5"}
hato/hato {:mvn/version "0.8.2"}
;; AWS S3 API
com.cognitect.aws/api {:mvn/version "0.8.539"}
com.cognitect.aws/endpoints {:mvn/version "1.1.12.129"}
;; web server
http-kit/http-kit {:mvn/version "2.5.3"}
metosin/reitit {:mvn/version "0.5.15"}
compojure/compojure {:mvn/version "1.6.2"}
metosin/muuntaja {:mvn/version "0.6.8"}
metosin/jsonista {:mvn/version "0.3.5"}
metosin/ring-http-response {:mvn/version "0.9.3"}
;; logging
ch.qos.logback/logback-classic {:mvn/version "1.2.8"}}
:paths ["src" "resources"]
:aliases
{:dev
{:extra-paths ["dev", "test"]
:extra-deps {org.clojure/tools.namespace {:mvn/version "1.2.0"}}}
:test
{:extra-paths ["test" "test-resources"]
:extra-deps {com.cognitect/test-runner
{:git/url ""
:sha "dd6da11611eeb87f08780a30ac8ea6012d4c05ce"}}
:exec-fn cognitect.test-runner.api/test}
:build
{:deps {io.github.clojure/tools.build {:git/tag "v0.7.2" :git/sha "0361dde"}
io.github.seancorfield/build-clj {:git/tag "v0.6.3" :git/sha "9b8e09b"}}
:ns-default build}
:ancient
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core" "--skip=github-action"]}
:clj-kondo
{:extra-deps {clj-kondo/clj-kondo {:mvn/version "2021.12.19"}}
:main-opts ["-m" "clj-kondo.main" "--lint" "src" "--config" ".clj-kondo/config.edn"]}}}
Ah, I see - in the :build alias I use the :deps key, which presumably overwrites the top-level deps
It's funny how computers do exactly what you tell them too and yet I'm the one getting upset :p
But in general the build alias removes deps and changes your class path roots. But I thought that was only when run as -T. But I'm not sure. And I'm surprised if using “:deps” will nuke all other deps
I also thought it would only do the whole new classpath if you run it with -T, that's why I thought it was safe. I'm sure the :deps
behavior is documented somewhere, I just pulled it off the example from the tools.build repo, I think
:deps is an alias for :replace-deps in aliases in case that helps clarify
I'm interested in hacking on cider, and wondering if anyone has some recommendations on getting a development environment stood up. I've got a copy of the repo locally, but I'm not sure on how to load this local copy into emacs for development
Ah I've found https://docs.cider.mx/cider/1.1/contributing/hacking.html which I somehow missed earlier