Closed jethrokuan closed 8 years ago
I've seen this too, and also failed to track down the cause. Fwiw this started happening after CIDER's massive round of refactoring some weeks back.
Do you have a Clojure code that reproduces this?
On Oct 14, 2015, at 05:26, Jethro Kuan Sheng Yuan notifications@github.com wrote:
Hi,
I'm getting this error that's making squiggly unusable as it hangs the window temporarily, and doesn't perform anything useful.
Wrong number of arguments: (4 . 4), 0 Error from syntax checker clojure-cider-eastwood: Done with no errors Debugger entered--Lisp error: (wrong-number-of-arguments (4 . 4) 0)
[1028 "\301\303\304\305\302\300��$\"\207" [clojure-cider-eastwood #[128 "\301\302\300�#\207" [[cl-struct-flycheck-syntax-check #
clojure-cider-eastwood "20"] apply flycheck-report-buffer-checker-status] 5 "\n\n(fn &rest ARGS)"] #[257 "\300\301�\"\207" [format "(do (require 'squiggly-clojure.core) (squiggly-clojure.core/check-ew '%s))"] 4 "\n\n(fn NS)"] errored format "Form %s of checker %s failed: %s"] 11 "\n\n(fn BUFFER EX ROOTEX SESS)"]() [257 "\306�\307\"\306�\310\"\306�\311\"\306�\312\"\306�\313\"\306��\314\"\306��\315\"\316\300!\2036
I can't seem to figure out what's causing the problem. The only issue that suggested loading the clojure buffer didn't seem to resolve the problem.
Other relevant info:
; CIDER 0.10.0snapshot (package: 20151013.1548) (Java 1.8.0_60, Clojure 1.6.0, nREPL 0.2.10) Setup:
(use-package flycheck-clojure :ensure t :config (flycheck-clojure-setup)) profiles.clj:
{:user {:plugins [[cider/cider-nrepl "0.10.0-SNAPSHOT"] [refactor-nrepl "1.1.0"]] :dependencies [[acyclic/squiggly-clojure "0.1.4"] ^:replace [org.clojure/tools.nrepl "0.2.10"]]}} — Reply to this email directly or view it on GitHub.
I did a test compojure app (was really following Living Clojure's example):
lein new compojure cheshire-cat
Both handler/handler_test.clj gave me issues. Basically anything clojure. project.clj had it too, but was less severe for some reason. Same error, just reduced occurrences.
I'm looking at this. For the moment, I'm baffled.
I am having the same issue. It occurs any time I make a change to my file, making it unusable. I am new to clojure and cider, so I assumed my setup was faulty. However, it looks like I am not alone.
If its any consolation I too am baffled. And if it helps I'm running GNU emacs on Ubuntu in case it's an OS thing
On Sun, 18 Oct 2015 10:27 am Michael Vessia notifications@github.com wrote:
I am having the same issue. It occurs any time I make a change to my file, making it unusable. I am new to clojure and cider, so I assumed my setup was faulty. However, it looks like I am not alone.
— Reply to this email directly or view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-148971005 .
I'm not entirely sure what's happening on the emacs side, but I can get the compojure project to behave by upgrading to Clojure 1.7.0, which is a requirement of core.typed, which - for the moment anyway - must at least be available for squiggly, even if you turn it off.
If someone else can reproduce the 1.7 "fix," then I'd like to close this issue and open another to poll for general interest in restoring functionality with 1.6 and/or making the availability of individual linter libraries optional.
I will tentatively ascribe the "wrong number of arguments" error to something in the current snapshot of cider itself.
Ooh okay I'll test that out on Wednesday when I regain access to my computer.
On Mon, 19 Oct 2015 2:11 am pnf notifications@github.com wrote:
I'm not entirely sure what's happening on the emacs side, but I can get the compojure project to behave by upgrading to Clojure 1.7.0, which is a requirement of core.typed, which - for the moment anyway - must at least be available for squiggly, even if you turn it off.
— Reply to this email directly or view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-149036038 .
Hey,
I tested the 1.7.0 "fix", and it seems to mitigate the issue. Now I'm getting a separate error:
(<-
id "13"
ns "user"
session "7eb81c61-5095-4565-8b1f-3614a9eea998"
value "\"[{\\\"msg\\\":\\\"core.typed:java.lang.Exception: namespace 'instaparse.abnf' not found, compiling:(instaparse\\\\/core.clj:1:1)\\\",\\\"column\\\":1,\\\"level\\\":\\\"error\\\",\\\"line\\\":1}]\""
)
Is there a need to explicitly require instaparse?
I get that error just by upgrading to 1.7.0, without any dependency on squiggly.
On Oct 21, 2015, at 5:12 AM, Jethro Kuan Sheng Yuan notifications@github.com wrote:
Hey,
I tested the 1.7.0 "fix", and it seems to mitigate the issue. Now I'm getting a separate error:
(<- id "13" ns "user" session "7eb81c61-5095-4565-8b1f-3614a9eea998" value "\"[{\"msg\":\"core.typed:java.lang.Exception: namespace 'instaparse.abnf' not found, compiling:(instaparse\/core.clj:1:1)\",\"column\":1,\"level\":\"error\",\"line\":1}]\"" ) Is there a need to explicitly require instaparse?
— Reply to this email directly or view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-149829368.
would it not be sufficient to depend on squiggly in the ~/.lein/profiles.clj file?
On Fri, 23 Oct 2015 at 23:41 pnf notifications@github.com wrote:
I get that error just by upgrading to 1.7.0, without any dependency on squiggly.
On Oct 21, 2015, at 5:12 AM, Jethro Kuan Sheng Yuan < notifications@github.com> wrote:
Hey,
I tested the 1.7.0 "fix", and it seems to mitigate the issue. Now I'm getting a separate error:
(<- id "13" ns "user" session "7eb81c61-5095-4565-8b1f-3614a9eea998" value "\"[{\"msg\":\"core.typed:java.lang.Exception: namespace 'instaparse.abnf' not found, compiling:(instaparse\/core.clj:1:1)\",\"column\":1,\"level\":\"error\",\"line\":1}]\"" ) Is there a need to explicitly require instaparse?
— Reply to this email directly or view it on GitHub < https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-149829368 .
— Reply to this email directly or view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-150611755 .
Yes. What I'm saying is that, without squiggly anywhere, I see the instaparse problem just by switching to 1.7.
On Oct 24, 2015, at 01:59, Jethro Kuan Sheng Yuan notifications@github.com wrote:
would it not be sufficient to depend on squiggly in the ~/.lein/profiles.clj file?
On Fri, 23 Oct 2015 at 23:41 pnf notifications@github.com wrote:
I get that error just by upgrading to 1.7.0, without any dependency on squiggly.
On Oct 21, 2015, at 5:12 AM, Jethro Kuan Sheng Yuan < notifications@github.com> wrote:
Hey,
I tested the 1.7.0 "fix", and it seems to mitigate the issue. Now I'm getting a separate error:
(<- id "13" ns "user" session "7eb81c61-5095-4565-8b1f-3614a9eea998" value "\"[{\"msg\":\"core.typed:java.lang.Exception: namespace 'instaparse.abnf' not found, compiling:(instaparse\/core.clj:1:1)\",\"column\":1,\"level\":\"error\",\"line\":1}]\"" ) Is there a need to explicitly require instaparse?
— Reply to this email directly or view it on GitHub < https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-149829368 .
— Reply to this email directly or view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-150611755 .
— Reply to this email directly or view it on GitHub.
Older versions of instaparse was incompatible with 1.7 due to the changes to the reader.
So the bottom line is that squiggly-clojure requires 1.7 and is incompatible with anything that is incompatible with 1.7. I'm going to close this issue.
On Oct 24, 2015, at 08:35, Lars Andersen notifications@github.com wrote:
Older versions of instaparse was incompatible with 1.7 due to the changes to the reader.
— Reply to this email directly or view it on GitHub.
Understood. It works for me now; the project-specific config generated overrode my user config.Thanks for your help!
This bug is still around with Clojure 1.7.0, Cider 0.10.0 (if that matters) and the melpa squiggly package.
The clojure upgrade fixed it for me though, could you post a little more info like the stack trace so we can help you out? On Dec 5, 2015 8:03 AM, "Daniel Ziltener" notifications@github.com wrote:
This bug is still around with Clojure 1.7.0, Cider 0.10.0 (if that matters) and the melpa squiggly package.
— Reply to this email directly or view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-162114057 .
Hmm, how do I get a stacktrace? Because it only shows that one-liner in the minibuffer. There's no (or at least doesn't seem to be any) stacktrace in cider.
Post your output of nrepl-messages
, there should be a buffer identically named when you run cider-jack-in
.
No, I don't have any buffer with that name in my session.
By the way, I also tried to disable Eastwood using the lein-environ method, but it didn't work.
If you don't have an nrepl messages buffer, there are more serious problems. I'm sure you have one. You can so run the check straight from the repl.
On Dec 5, 2015, at 06:14, Daniel Ziltener notifications@github.com wrote:
By the way, I also tried to disable Eastwood using the lein-environ method, but it didn't work.
— Reply to this email directly or view it on GitHub.
No, there's no such buffer. I don't even have a *cider-error*
buffer. cider-visit-error-buffer
gives me the message "No cider-error buffer". Is there a special var I have to set so cider creates those buffers?
I'm getting the same error:
error in process filter: Wrong number of arguments: (4 . 4), 0 [2 times]
Error from syntax checker clojure-cider-eastwood: Done with no errors
...and I have Clojure 1.7 ... The output from my REPL:
; CIDER 0.11.0snapshot (package: 20160104.1114) (Java 1.7.0_45, Clojure 1.7.0, nREPL 0.2.12)
My profiles.clj
is:
{:repl {:plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]
[jonase/eastwood "0.2.3"]
[refactor-nrepl "2.0.0-SNAPSHOT"]
[lein-cljfmt "0.3.0"]]
:dependencies [[org.clojure/clojure "1.7.0"]
[acyclic/squiggly-clojure "0.1.3-SNAPSHOT"]
[org.clojure/tools.nrepl "0.2.12"]]}}
Tried both Eastwood version 0.2.2 and 0.2.3 ... and I've upgraded squiggly-clojure
to 0.1.4
as well.
The output from my *repl-messages*
is quite lengthy, but I can paste it (or part of it), if it would help.
I'm not sure I understand how to apply the fix discussed above if I'm using 1.7? Thanks!
What happens when you run the Eastwood check outside of emacs?
On Jan 7, 2016, at 19:33, Howard Abrams notifications@github.com wrote:
I'm getting this error, and I have Clojure 1.7 ... The output from my REPL:
; CIDER 0.11.0snapshot (package: 20160104.1114) (Java 1.7.0_45, Clojure 1.7.0, nREPL 0.2.12) My profiles.clj is:
{:repl {:plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"] [jonase/eastwood "0.2.3"] [refactor-nrepl "2.0.0-SNAPSHOT"] [lein-cljfmt "0.3.0"]] :dependencies [[org.clojure/clojure "1.7.0"] [acyclic/squiggly-clojure "0.1.3-SNAPSHOT"] [org.clojure/tools.nrepl "0.2.12"]]}} Tried both Eastwood version 0.2.2 and 0.2.3 ...
The output from my repl-messages is quite lengthy, but I can paste it (or part of it), if it would help.
I'm not sure I understand how to apply the fix discussed above if I'm using 1.7? Thanks!
— Reply to this email directly or view it on GitHub.
Good question. It seems that running lein
in the top-level of the project works (although not as many warnings as I had last week), but does states that I'm using 1.6
...
$ lein eastwood
== Eastwood 0.2.3 Clojure 1.6.0 JVM 1.7.0_45
Directories scanned for source files: src test
== Linting cljds.ch1.stats ==
Entering directory `/Users/howard.abrams/Other/clojure-data-science/ch1-statistics'
src/cljds/ch1/stats.clj:9:7: redefd-vars: Var mean def'd 2 times at line:col locations: cljds/ch1/stats.clj:4:7 cljds/ch1/stats.clj:9:7
== Linting cljds.ch1.data ==
== Linting cljds.ch1.examples ==
== Linting cljds.ch1.core ==
== Warnings: 1 (not including reflection warnings) Exceptions thrown: 0
Subprocess failed
My profiles.clj
is specifying 1.7
, but the project.clj
had 1.6
. Changing both files to 1.7
didn't change the problem in Emacs. And running outside of Emacs shows the same basic output, but (as expected) the versions changed to:
== Eastwood 0.2.3 Clojure 1.7.0 JVM 1.7.0_45
Any other tests to try?
I am also experiencing this issue on Clojure 1.7. Running lein eastwood
also reports nothing unusual. A look at the nrepl-messages
buffer shows several occurences of
(--->
op "eval"
session "9ce68d27-45eb-46ff-a9c6-00bb1a2786f9"
code "(do (require 'squiggly-clojure.core) (squiggly-clojure.core/check-ew 'space-game.combat))"
id "13"
)
(<-
ex "class java.io.FileNotFoundException"
id "13"
root-ex "class java.io.FileNotFoundException"
session "9ce68d27-45eb-46ff-a9c6-00bb1a2786f9"
status ("eval-error")
)
(<-
err "FileNotFoundException Could not locate squiggly_clojure/core__init.class or squiggly_clojure/core.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. clojure.lang.RT.load (RT.java:449)\n"
id "13"
session "9ce68d27-45eb-46ff-a9c6-00bb1a2786f9"
)
(<-
id "13"
session "9ce68d27-45eb-46ff-a9c6-00bb1a2786f9"
status ("done")
)
There are no other kinds of errors listed.
I realized that the dependency instructions in the README were a bit dated (and not internally consistent) and pushed an update. In particular, the profile deps were wrong:
- :dependencies [[acyclic/squiggly-clojure "0.1.3-SNAPSHOT"]
- ^:replace [org.clojure/tools.nrepl "0.2.10"]]
+ :dependencies [[acyclic/squiggly-clojure "0.1.4"]
+ ^:replace [org.clojure/tools.nrepl "0.2.12"]]
If these corrections don't work, then could I also get the output of lein deps :tree
?
I had alread made those changes, and have confirmed that they do not work on my setup.
Here is the output of lein deps :tree
:
[clojure-complete "0.2.3" :exclusions [[org.clojure/clojure]]]
[compojure "1.4.0"]
[clout "2.1.2"]
[instaparse "1.4.0" :exclusions [[org.clojure/clojure]]]
[medley "0.6.0"]
[org.clojure/tools.macro "0.1.5"]
[ring/ring-codec "1.0.0"]
[commons-codec "1.6"]
[ring/ring-core "1.4.0"]
[clj-time "0.9.0"]
[joda-time "2.6"]
[commons-fileupload "1.3.1"]
[commons-io "2.4"]
[crypto-equality "1.0.0"]
[crypto-random "1.2.0"]
[org.clojure/tools.reader "0.9.1"]
[javax.servlet/servlet-api "2.5" :scope "test"]
[org.clojure/clojure "1.7.0"]
[org.clojure/tools.nrepl "0.2.10" :exclusions [[org.clojure/clojure]]]
[refactor-nrepl "1.2.0"]
[ring/ring-defaults "0.1.5"]
[ring/ring-anti-forgery "1.0.0"]
[hiccup "1.0.5"]
[ring/ring-headers "0.1.3"]
[ring/ring-ssl "0.2.1"]
[ring/ring-mock "0.3.0" :scope "test"]
Your tools.nrepl version still shows 0.2.10
, could you post your
project.clj
?
On Jan 10, 2016 3:17 AM, "Sean Walker" notifications@github.com wrote:
I had alread made those changes, and have confirmed that they do not work on my setup.
Here is the output of lein deps :tree:
[clojure-complete "0.2.3" :exclusions [[org.clojure/clojure]]] [compojure "1.4.0"] [clout "2.1.2"] [instaparse "1.4.0" :exclusions [[org.clojure/clojure]]] [medley "0.6.0"] [org.clojure/tools.macro "0.1.5"] [ring/ring-codec "1.0.0"] [commons-codec "1.6"] [ring/ring-core "1.4.0"] [clj-time "0.9.0"] [joda-time "2.6"] [commons-fileupload "1.3.1"] [commons-io "2.4"] [crypto-equality "1.0.0"] [crypto-random "1.2.0"] [org.clojure/tools.reader "0.9.1"] [javax.servlet/servlet-api "2.5" :scope "test"] [org.clojure/clojure "1.7.0"] [org.clojure/tools.nrepl "0.2.10" :exclusions [[org.clojure/clojure]]] [refactor-nrepl "1.2.0"] [ring/ring-defaults "0.1.5"] [ring/ring-anti-forgery "1.0.0"] [hiccup "1.0.5"] [ring/ring-headers "0.1.3"] [ring/ring-ssl "0.2.1"] [ring/ring-mock "0.3.0" :scope "test"]
— Reply to this email directly or view it on GitHub https://github.com/clojure-emacs/squiggly-clojure/issues/29#issuecomment-170271808 .
project.clj
:
(defproject space-game "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.7.0"]
[compojure "1.4.0"]
[ring/ring-defaults "0.1.5"]]
:plugins [[lein-ring "0.9.7"]]
:ring {:handler space-game.handler/app}
:profiles
{:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
[ring/ring-mock "0.3.0"]]}})
and profiles.clj
:
{:repl {:plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"]
[refactor-nrepl "1.2.0"]]
:dependencies [[org.clojure/tools.nrepl "0.2.12"]]}
:user {:plugins [[acyclic/squiggly-clojure "0.1.4"]
^:replace [org.clojure/tools.nrepl "0.2.12"]
[org.clojure/core.typed "0.3.19" :exclusions [org.clojure/core.cache org.clojure/tools.reader]]
[jonase/eastwood "0.2.3" :exclusions [org.clojure/clojure]]
[lein-kibit "0.1.2"]
[lein-ancient "0.6.8" :exclusions [org.clojure/core.cache org.clojure/clojure]]]}}
I have no idea why lein deps
reports 0.2.10. The cider repl reports 0.2.12 as expected.
Since you're using a :repl profile, you need to run lein with-profile :repl deps :tree
.
On Jan 9, 2016, at 21:11, Sean Walker notifications@github.com wrote:
project.clj:
(defproject space-game "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :min-lein-version "2.0.0" :dependencies [[org.clojure/clojure "1.7.0"] [compojure "1.4.0"] [ring/ring-defaults "0.1.5"]] :plugins [[lein-ring "0.9.7"]] :ring {:handler space-game.handler/app} :profiles {:dev {:dependencies [[javax.servlet/servlet-api "2.5"] [ring/ring-mock "0.3.0"]]}}) and profiles.clj:
{:repl {:plugins [[cider/cider-nrepl "0.11.0-SNAPSHOT"] [refactor-nrepl "1.2.0"]] :dependencies [[org.clojure/tools.nrepl "0.2.12"]]} :user {:plugins [[acyclic/squiggly-clojure "0.1.4"] ^:replace [org.clojure/tools.nrepl "0.2.12"] [org.clojure/core.typed "0.3.19" :exclusions [org.clojure/core.cache org.clojure/tools.reader]] [jonase/eastwood "0.2.3" :exclusions [org.clojure/clojure]] [lein-kibit "0.1.2"] [lein-ancient "0.6.8" :exclusions [org.clojure/core.cache org.clojure/clojure]]]}} I have no idea why lein deps reports 0.2.10. The cider repl reports 0.2.12 as expected.
— Reply to this email directly or view it on GitHub.
Performing task 'deps' with profile(s): 'repl'
Retrieving cider/cider-nrepl/0.11.0-SNAPSHOT/cider-nrepl-0.11.0-20160109.180233-19.pom from clojars
Retrieving cider/cider-nrepl/0.11.0-SNAPSHOT/cider-nrepl-0.11.0-20160109.180233-19.jar from clojars
[cider/cider-nrepl "0.11.0-20160109.180233-19"]
[org.tcrawley/dynapath "0.2.3" :exclusions [[org.clojure/clojure]]]
[compojure "1.4.0"]
[clout "2.1.2"]
[instaparse "1.4.0" :exclusions [[org.clojure/clojure]]]
[medley "0.6.0"]
[org.clojure/tools.macro "0.1.5"]
[ring/ring-codec "1.0.0"]
[commons-codec "1.6"]
[ring/ring-core "1.4.0"]
[clj-time "0.9.0"]
[joda-time "2.6"]
[commons-fileupload "1.3.1"]
[commons-io "2.4"]
[crypto-equality "1.0.0"]
[crypto-random "1.2.0"]
[org.clojure/tools.reader "0.9.1"]
[org.clojure/clojure "1.7.0"]
[org.clojure/tools.nrepl "0.2.12"]
[refactor-nrepl "1.2.0"]
[ring/ring-defaults "0.1.5"]
[javax.servlet/servlet-api "2.5"]
[ring/ring-anti-forgery "1.0.0"]
[hiccup "1.0.5"]
[ring/ring-headers "0.1.3"]
[ring/ring-ssl "0.2.1"]
I did notice that you were using a later version of cider-nrepl, but I still can't reproduce your problem. At this point, I would need to ask for a complete reproduction, in the form a cloneable github repo, including lein profiles config.
I've got a stripped down example that exhibits the problem behavior at this repo. Just put profiles.clj in .lein, open core.clj, and then call cider-jack-in
. The issue is immediate and persistent after the nRepl server starts.
I'm sure this is frustrating, but I can't reproduce any problem at all. That said, I did notice that you don't actually have squiggly-clojure
as a dependency, but rather as a plugin, which it isn't.
Ah, I seem to have moved it when I was stripping down profiles.clj
. The issue persists after moving it back to dependencies. It's possible the issue is triggered by something in my emacs config, so I'll see if I can replicate it with a minimal emacs -q
environment.
You also have eastwood, and core.typed in the plugin section, and you've specified versions different from those on which squiggly depends.
After a few hours of experimenting, I have absolutely no idea what the issue is. I reset my profiles.clj
to exactly match the versions and locations listed (it would be nice for squiggly docs to show their location as well, since they're required), and ultimately the errors disappeared; flycheck never reported errors coming from any linters, and eldoc also started failing in the clojure buffer (but not repl), but company completions remained, so I'm unsure of what was happening. I couldn't find a way to restore it in the reproduction repo.
I managed to reproduce it in another repo, by starting figwheel and connecting to it, giving me eldoc info as well as the eastwood errors. With this connection, the reproduction repo also got eldoc and eastwood errors, but starting the connection from that repo with cider-jack-in
did not.
Based on this, it seems likely that the issue is ultimately caused by something other than squiggly.
Keep me posted on your progress. For better or worse, squiggly
relies on external tools with their own complex dependencies, and then it invokes them incessantly, rather than in the batch fashion their authors anticipated. The "better" part is that a sliver of glue code brings some very sophisticated tools to bear on your code.
On Jan 17, 2016, at 16:19, Sean Walker notifications@github.com wrote:
After a few hours of experimenting, I have absolutely no idea what the issue is. I reset my profiles.clj to exactly match the versions and locations listed (it would be nice for squiggly docs to show their location as well, since they're required), and ultimately the errors disappeared; flycheck never reported errors coming from any linters, and eldoc also started failing in the clojure buffer (but not repl), but company completions remained, so I'm unsure of what was happening. I couldn't find a way to restore it in the reproduction repo.
I managed to reproduce it in another repo, by starting figwheel and connecting to it, giving me eldoc info as well as the eastwood errors. With this connection, the reproduction repo also got eldoc and eastwood errors, but starting the connection from that repo with cider-jack-in did not.
Based on this, it seems likely that the issue is ultimately caused by something other than squiggly.
— Reply to this email directly or view it on GitHub.
After a lot of testing, I've found that the issue occurs on my machine when squiggly is loaded as a repl dependency, but everything works fine when it is loaded as a user dependency. Since putting it :repl seems to work for other people, I don't know what the cause is, but this might help isolate it in the future.
Seeing something similar to this with cider-jack-in. Not sure if there's any other steps to take other than expecting the dependencies to be auto injected with cider-jack-in.
(use-package flycheck-clojure
:commands (flycheck-clojure-setup)
:init
(add-hook 'clojure-mode-hook
(lambda ()
(eval-after-load 'flycheck
'(flycheck-clojure-setup)))))
This is my debug-on-error trace.
Debugger entered--Lisp error: (wrong-number-of-arguments (4 . 4) 0)
nrepl--dispatch-response((dict "ex" "class java.io.FileNotFoundException" "id" "14" "root-ex" "class java.io.FileNotFoundException" "session" "594f5c99-e505-4ecc-bdab-eb45eb6c78ea" "status" ("eval-error")))
nrepl-client-filter(#
Just a note that I'm having the same issue. Has anyone found a work-around?
Debugger entered--Lisp error: (wrong-number-of-arguments (4 . 4) 0)
#[1028 "\301\303\304\305\302\300$\"\207" [clojure-cider-eastwood #[128 "\301\302\300#\207" [[cl-struct-flycheck-syntax-check #<buffer acedump.clj> clojure-cider-eastwood "20"] apply flycheck-report-buffer-checker-status] 5 "\n\n(fn &rest ARGS)"] #[257 "\300\301\"\207" [format "(do (require 'squiggly-clojure.core) (squiggly-clojure.core/check-ew '%s))"] 4 "\n\n(fn NS)"] errored format "Form %s of checker %s failed: %s"] 11 "\n\n(fn BUFFER EX ROOTEX SESS)"]()
#[257 "\307\310\"\307\311\"\307\312\"\307\313\"\307\314\"\307\315\"\307\316\"\317\300!\2038r\300q\210\2037\320\321!\2047\322!\210)\203I\301\205\303\301\300\"\202\303\203Y\302\205\303\302\300\"\202\303\211\203s\306\203h\306\300\"\202\303\302\205\303\302\300\"\202\303\203\202\303\205\303\303\300\"\202\303\205\303\323\235\203\220\324\325!\210\326\235\203\236\305\206\234 \210\327\235\203\250\324\330!\210\331\235\203\262\332\300!\210\333\235\205\303\334!\210\304\205\303\304\300!\207" [#<buffer acedump.clj> #[514 "\301\302rq\210\303\300\")\"\207" [clojure-cider-eastwood #[128 "\301\302\300#\207" [[cl-struct-flycheck-syntax-check #<buffer acedump.clj> clojure-cider-eastwood "20"] apply flycheck-report-buffer-checker-status] 5 "\n\n(fn &rest ARGS)"] finished flycheck-clojure-parse-cider-errors] 7 "\n\n(fn BUFFER VALUE)"] nil nil #[257 "\300\301\302\"\207" [#[128 "\301\302\300#\207" [[cl-struct-flycheck-syntax-check #<buffer acedump.clj> clojure-cider-eastwood "20"] apply flycheck-report-buffer-checker-status] 5 "\n\n(fn &rest ARGS)"] errored "Done with no errors"] 4 "\n\n(fn _)"] #[1028 "\301\303\304\305\302\300$\"\207" [clojure-cider-eastwood #[128 "\301\302\300#\207" [[cl-struct-flycheck-syntax-check #<buffer acedump.clj> clojure-cider-eastwood "20"] apply flycheck-report-buffer-checker-status] 5 "\n\n(fn &rest ARGS)"] #[257 "\300\301\"\207" [format "(do (require 'squiggly-clojure.core) (squiggly-clojure.core/check-ew '%s))"] 4 "\n\n(fn NS)"] errored format "Form %s of checker %s failed: %s"] 11 "\n\n(fn BUFFER EX ROOTEX SESS)"] nil nrepl-dict-get "value" "ns" "out" "err" "status" "id" "pprint-out" buffer-live-p derived-mode-p clojure-mode cider-set-buffer-ns "interrupted" message "Evaluation interrupted." "eval-error" "namespace-not-found" "Namespace not found." "need-input" cider-need-input "done" nrepl--mark-id-completed nrepl-err-handler] 11 "\n\n(fn RESPONSE)"]((dict "ex" "class java.io.FileNotFoundException" "id" "20" "root-ex" "class java.io.FileNotFoundException" "session" "980aca3b-97d7-49cc-91e3-d45b9c425509" "status" ("eval-error")))
nrepl--dispatch-response((dict "ex" "class java.io.FileNotFoundException" "id" "20" "root-ex" "class java.io.FileNotFoundException" "session" "980aca3b-97d7-49cc-91e3-d45b9c425509" "status" ("eval-error")))
nrepl-client-filter(#<process nrepl-connection> "d2:ex35:class java.io.FileNotFoundException2:id2:207:root-ex35:class java.io.FileNotFoundException7:session36:980aca3b-97d7-49cc-91e3-d45b9c4255096:statusl10:eval-erroreed3:err235:FileNotFoundException Could not locate squiggly_clojure/core__init.class or squiggly_clojure/core.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. clojure.lang.RT.load (RT.java:456)\n2:id2:207:session36:980aca3b-97d7-49cc-91e3-d45b9c425509ed2:id2:207:session36:980aca3b-97d7-49cc-91e3-d45b9c4255096:statusl4:doneee")
I have the following in the global ~/.lein/profiles.clj:
{:user {
:plugin-repositories [["private-plugins" {:url "private repo url"}]]
:dependencies [[cider/cider-nrepl "0.12.0-SNAPSHOT"]
[acyclic/squiggly-clojure "0.1.5"]
^:replace [org.clojure/tools.nrepl "0.2.12"]
]}}}
fwiw I've found that putting the :dependencies
list in a :repl
section "fixes" the issue
This seems to be the fix for most people. If putting the dependencies list under :repl
doesn't affect any other functionality, perhaps it's best to update the README
instructions?
The README
instructions have indicated :repl
for quite a while now, and it is best practice in any event to use that profile for dependencies you don't want pulled in when not using a REPL.
You would definitely have problems if you had both a :user
and :repl
dependences, but some of the dependencies needed for the REPL were placed in :user
, as they'd never be loaded.
The tools.nrepl
exclusion shouldn't be necessary anymore, so I removed that entirely.
The english on the README is a little vague here.
"If you're using a current release of Cider, then this dependency, along with all of Cider's will be injected automatically for you upon cider-jack-in. (Specifically, the dependencies will be added to cider-jack-in-dependencies unless you specifically disable it by setting flycheck-clojure-inject-dependencies-at-jack-in to nil.)"
I'd interpret that this would be okay to use.
(use-package flycheck-clojure
:commands (flycheck-clojure-setup)
:init
(add-hook 'clojure-mode-hook
(lambda ()
(eval-after-load 'flycheck
'(flycheck-clojure-setup)))))
So no additional configuration or messing with profiles.clj (which it seems you need to do if you were connecting to the repl separately from cider-jack-in) but I'm still seeing the issue using cider-jack-in.
fwiw, I have found that with this issue; where I want to use eastwood via a lein command other than repl (test), so I need to list the eastwood dep in :repl and :user, otherwise I either can't use eastwood in non-repl lein commands, or I get the the error above.
@jojojames You can check check cider-jack-in-dependencies
to verify that the dependency is being added properly, and you can verify from the REPL that sqiggly-clojure.core
is available. If it's not, then either you've misconfigured something or there's a bug in cider
(which I doubt).
@mgrbyte Yes, the :repl
profile only affects the REPL, and, if it exists, it will override the :user
setting for REPL sessions. This is just the way lein
works, as far as I know.
Hi,
I'm getting this error that's making squiggly unusable as it hangs the window temporarily, and doesn't perform anything useful.
I can't seem to figure out what's causing the problem. The only issue that suggested loading the clojure buffer didn't seem to resolve the problem.
Other relevant info:
Setup:
profiles.clj: